Community voting on update of system contract
- Anyone can propose a new system contract.
- Deposit of 1,000 EOS tokens is required. Get back 90% if & when it passes.
- Proposal is a binary of the new system contract plus a Proposed Tx to install it; up to the proposer to validate and/or prove to voters that the binary comes from valid source code; will probably want to publish their toolchain so others can verify it. Verification is a social activity.
- Identity contract can be used to create an identity for the proposal and make attestations about it.
- It's large but the RAM will be covered by the system or referendum contract.
- Voting will be open for up to 90 days.
- Voter can vote YES or NO or withdraw their vote entirely (which reduces 'voter turnout').
- Voter pays the RAM to store their vote; erase votes after voting ends.
- Proposed new system contract is adopted once it meets these criteria:
- Maintains a margin of 10% more YES than NO votes (55%+ in favor).
- Maintains a minimum 10% "voter turnout" (10% of circulating tokens have been voted).
- Maintains the above two criteria for 30 days continuously within the 90 day window. (Obviously if they are below 55% YES or 10% turnout at any point with less than 30 days remaining in the 90 day window, the proposal dies on the spot.)
- Having passed, the Proposed Tx to install the new system contract is signed by the BPs; it takes immediately after 15 BPs have signed it.
- The Emergency Upgrade process is different and not covered in this issue.
@gleehokie @thomasbcox @bytemaster Here are some questions about voting on system contract upgrades:
- who and how initiates the voting?
- how long is the voting process should last? do we limit voting period in time? or users keep voting until certain amount of stake voted?
- can we have more than one proposal up for voting simultaneously ?
- do we count only votes for, or both votes for and against? how we make a decision if the upgrade should happen? (do we care about turnout?)
- after a proposal won the election, how we enforce the decision? i.e. how we make producers to upgrade the contract ? how we make them to upgrade to exact version that won the election?
I've updated the Description with the code requirements.
Most of the above questions are answered in the spec.
Other comments and implications of the requirements:
- Anyone who pays the fee and invokes the Referendum contract can propose an upgrade
- We can have any number of proposals open for voting. If multiple pass, they should be implemented in the sequence in which they passed.
- BPs are expected by the BP Agreement to perform upgrades; failure to do so would be a violation of their agreement and would subject them to Disputes, loss of reputation, loss of votes, etc.
- It should be publicly inspectable that the system contract proposed, and the Proposed Tx to install it, is the one signed by the BPs.
- Both YES and NO votes should be possible, on an unlimited number of proposals.
Open question for @bytemaster - do we want to set the threshold at 10% voter turnout as measured against all tokens issued or 10% of tokens staked for voting?
In the case where only a few tokens are staked for voting, the former may be unreachable and thus the chain may be impossible to upgrade.
On the other hand, the latter may be too low a bar.
One compromise may be "the lesser of 10% of issued tokens or 20% of staked-for-voting tokens"
seems like we are not going to do it