Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 1.25 KB

File metadata and controls

59 lines (36 loc) · 1.25 KB

Neurons

This code is an implementation of neurons from the Neural Quorum Governance. The data computed by this package is uploaded to the voting contract.

This is the source code used to calculate voting powers for each neuron used in NQG mechanism. It also normalized the votes of voters (converts delegations to final votes) for them to be uploaded to the contract.

Inputs

Neurons expect the inputs to be provided in json format. The inputs are loaded from data/ directory.

Outputs

Computed voting powers and normalized votes are written to result/ directory.

Running

cargo run

Neurons

Assigned Reputation Neuron

Assigns voting power based on voter discord rank.

Prior Voting History Neuron

Assigns voting power based on rounds voter previously participated in.

Trust Graph Neuron

Assigns voting power based on trust assigned to voter by other voters. It uses min-max normalized PageRank algorithm to compute the score.

Development

Running Tests

cargo test

Running Lint

cargo lint

This is an alias to cargo clippy with special config. See .cargo/config.toml for more details.

Formatting

cargo fmt