Skip to content

On chain Governance Quick Summary

Prasanna Loganathar edited this page Jan 26, 2023 · 6 revisions

Summary: https://github.com/DeFiCh/pinkpaper/tree/main/governance

Usage Summary

  • defi-cli creategovcfp '{ title, amount, payoutAddress, context: <url>, [contextHash: <hash>], [cycles:1-100] }'
  • defi-cli creategovvoc '{ title, context: <url>, [contextHash: <hash>] }'
  • defi-cli votegov <proposalId> <masternodeId> <yes/no/neutral>
  • listgovproposals/getgovproposal/..

Technical Summary

Base defaults

consensus.props.quorum = COIN / 100; // 1% of the masternodes must vote
consensus.props.feeBurnPct = COIN / 2;
consensus.props.votingPeriod = 130000; // tally votes every 130K blocks

consensus.props.cfp.fee = COIN / 100; // 1%
consensus.props.cfp.minimumFee = 10 * COIN; // 10 DFI
consensus.props.cfp.approvalThreshold = COIN / 2; // vote pass with over 50% majority

consensus.props.voc.fee = 100 * COIN;
consensus.props.voc.emergencyFee = 10000 * COIN;
consensus.props.voc.approvalThreshold = 66670000; // vote pass with over 66.67% majority
consensus.props.emergencyPeriod = 8640;

Setup

defi-cli setgov '{ "ATTRIBUTES": { 
  "v0/gov/proposals/quorum": "1%",
  "v0/gov/proposals/fee_redistribution": "true",
  "v0/gov/proposals/fee_burn_pct": "50%",

  "v0/gov/proposals/voting_period": "130000",

  "v0/gov/proposals/cfp_fee": "1%",
  "v0/gov/proposals/cfp_approval_threshold": "50%",

  "v0/gov/proposals/voc_fee": "100.00000000",
  "v0/gov/proposals/voc_approval_threshold": "66.67%",
  
  "v0/gov/proposals/voc_emergency_period": "8640",
  "v0/gov/proposals/voc_emergency_fee": "10000",
  }}'

Activation

defi-cli setgov '{ "ATTRIBUTES": { 
  "v0/params/feature/gov": "true",
  "v0/params/feature/gov-unset": "true",
  "v0/params/feature/gov-foundation": "true",
  "v0/params/feature/gov-payout": "true"
  }}'

Scenario examples

DFIP rules:
 
  10% quorum
  2/3 to pass, 66.67%

Scenario 1:
  
  1600 total voted
  800 yes votes
  600 no votes
  200 neutral

  Outcome: rejected, it passes rule 1 but fails rule 2 because it's less than 2/3.

Scenario 2:
  
  1000 total voted
  700 yes votes
  200 no votes
  100 neutral
  
  Outcome: rejected, it passes rule 2 but fails rule 1.

Scenario 3:
  
  1600 total voted
  1100 yes votes
  350 no votes
  150 neutral
   
  Outcome: passes, it passes rule 1 and rule 2.

Details

Features

  • v0/params/feature/gov: Global on-chain feature
  • v0/params/feature/gov-unset: unsetgov functionality that removes a gov var entirely
  • v0/params/feature/gov-foundation: Moves management of foundation addresses to on-chain governance based attributes
  • v0/params/feature/gov-payout: Enables automatic on-chain payouts

v0/gov/proposals attributes

  • quorum: Min. percent of quorum required. The number must be > the provided value for votes to be eligible for passing. (Not =)
  • voting_period: Voting period of a regular cycle in no. of blocks. Note: This affects every proposal created after the change. The proposals added before will still continue with the old cycle. Multi-cycle proposals will also continue with the same period on it's creation (bug). This will be fixed later to update itself to newer voting period. All proposals will have to have stayed on chain for atleast the voting period in order to be eligible for the next voting finalization period (This is planned to be improved with it's own parameter in a later upgrade).
  • voc_emergency_period: Same as above. But for special DFIPs only. This takes effect immediately for new incoming DFIPs.
  • ``

Fees

  • voc_fee: Vote of confidence fees in fixed DFI.
  • cfp_fee: CFP request fees in % (Eg: 1%). Has a minimum of 10 DFI. If total fee based on the proposal is below 10 DFI, 10 DFI is charged.
  • voc_emergency_fee: Fee for special vote of confidence (DFIPs) in %.
  • fee_redistribution: Enables or disables fee redistribution to master nodes that had participated in voting.
  • fee_burn_pct: Perfect of the proposal fee that is burnt when fee_redistribution is enabled. Otherwise, the 100% of the fee is burned immediately.