Skip to content

On chain Governance Quick Summary

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

On-chain Governance

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"
  }}'

Clone this wiki locally