On chain voting Sytem for the Kadena Communitiy DAO
- Multi-chain. People can vote on the chain of their choice (maybe limited to 0 , 1 ,2).
- Holders only need to lock their KDA during at the Voting date
- Viters can withdraw / change their vote before the freeze
- Team can propose incetive to be shared by the voters
- Proposals have a title and linked document (ideally immutable link IPFS, or GH Hash pin)
: : :
: PRE-VOTE PHASE : POST VOTE PHASE : ENDED PHASE
: : :
REGISTER VOTES : Team Can retrieve
PROPOSAL Team can add incentives FROZEN : unclaimed incentives
| | | | : |
| v v v : v
|-----------------------------------------|-------------------------------------|------------------------------->
^ ^ ^ ^
| | | |
Voters can deposit Voters can withdraw Voters can withdraw Voters can withdraw
to vote and cancel their vote their KDA + incentives their KDA but incetives
art lost
proposal-id:string → object{proposal}
Return the details of a proposal
(defschema proposal
id:string ; ID of the proposal
title:string ; The title of the proposal
external-urls:[string] ; A list ox external URL or documents
vote-yes:decimal ; Number of Kadena put on YES
vote-neutral:decimal ; Number of Kadena put on NEUTRAL
vote-no:decimal ; Number of Kadena put on NO
total-incentive:decimal ; Total incentive allocated to this proposal
voting-date:time ; Time when the voting is validated
next-id:string ; Previous Proposal in list
)account:string proposal-id:string → object{proposal}
Return the details of an account vote
(defschema vote
@doc "Represents a vote by a given account and for a given proposal"
deposit:decimal ; How much KDA is allocated by the user to this vote
choice:string ; YES, NEUTRAL or NO
)start-id:string count:integer → [object{proposal}]
Return tha list of last proposals in paginated way. Returns next proposals after start-id, up to count proposals
start-id may be a proposal ID or "LATEST" to return the first element of the list.
acount:string start-id:string count:integer → [object{proposal}]
Return tha list of last votes for a given account in paginated way. Returns next proposals after start-id, up to count votes
start-id may be a proposal ID or "LATEST" to return the first element of the list.
→ bool
Capability to create a proposal. Must be signed by an admin key.
→ bool
Capability to withdraw unclaimed inventives. Must be signed by an admin key.
title:string external-urls:[string] voting-date:time → string
Create a proposal with a given title, set of external urls, and a voting date. The CREATE-PROPOSAL cap must be signed by the team
proposal-id:string from:string amount:decimal → bool
Deposit an amount for incentive from account from for rewarding voters.
proposal-id:string to:string → bool
Allow the team to withdraw unclaimed incentive after the voting is defintively ended
proposal-id:string account:string → bool
Allow an user to vote
proposal-id:string account:string → bool
Allow an user to vote
proposal-id:string account:string amount:decimal → bool
Deposit an ammount of KDA for voting. The vote is set initially to NEUTRAL.
The coin.TRANSFER cap must be installed with to (voting-account)
proposal-id:string account:string choice:string → bool
Set the voting choice for an user: choice being "YES", "NEUTRAL" or "NO"
The cap VOTE must be installed and signed
proposal-id:string account:string amount:decimal → bool
Allow an user to withdraw a previously deposited amount. After the vote, the whole amount must be withdrawn.
The cap WITHDRAW must be installed and signed