effectai / effect-network

Smart contracts and documentation for Effect Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rankless Dynamic Vote Weight Based on NFX and Stake Age

jeisses opened this issue · comments

This is the implementation of Proposal-22: https://dashboard.effect.ai/proposals/22

The goal is to create a dynamic vote weight system where your vote weight is determined by EFX Power and staked NFX. Ranks will be removed from EffectDAO and the minimum entry for voting will be lower.

The vote weight formula will become:

vote_weight = min(staked_nfx, efx_power / 20)

A quick overview of the changes that are needed:

  • Update get_vote_power in effect-dao-shared.hpp and remove references to ranks.
  • Updates to the EffectDAO frontend:
    • Replace ranks with the new formula.
    • Solve inefficiencies with fetching votes and calculating results.
    • The frontend will require quite a few layout changes.
  • Compile and deploy effect-proposal and effect-dao contracts.
  • effect-proposals::processcycle will have to be tested and redesigned to support a large number of voters.

New vote distribution

This proposal will make a lot more DAO member eligible to vote but also makes it easier for large token holders to accumulate more vote weight. A quick analysis of the vote distribution looks healthy but we should keep paying attention to keeping the system fair. A quick reference to the current and new vote distributions:

Check method to process cycles

With the new distribution there will be a lot more users in the DAO. It can also grow quicker because of the low entry barrier. The theoretical maximum number of Guardians right now is 1,000 (with a practical limit of around 400). With the new system there can be over a million Guardians.

The process cycle action has to become scalable. We can start by processing each proposal independently in an action, which will make process cycle trivial. Secondly the new process proposal action should be able to work in batches so it can run over several actions.

Testing

The most important component to test is the correctness of fee distribution. This update should be accompanied by extensive e2e tests for a range of scenarios.

Ensuring scalability with a stress test of some sort for the number of voters will be important, we don't want things breaking once the DAO becomes very popular.

I've been working on a test that plays a full scenario using a snapshot of the stakes from mainnet:

https://github.com/effectai/effect-network/blob/p22/tests/e2e/scenario.cljs