dao-contracts
dao-contracts copied to clipboard
Implement Staked Native Token Voting module
Related to #65.
This is the simple version. Basically, we just implement the VotingPowerAtHeight
query by querying a user's staked balance. AND THAT'S IT!
Now querying a user's staked balance might be a bit tricky, but the AllDelagations
query should return a list of the user's delegations and you can sum them up.
Is this implementation secure though? There's no way to query staked native token by height no?
Is this implementation secure though? There's no way to query staked native token by height no?
Should be fine actually! Remember the tokens are bonded and can't be transferred.
Yeah, you're totally right! Wondering how we should implement the TotalVotingPowerAHeight
. We should also put a cap on proposal length then maybe? i.e. what if i create a proposal length of 29 days! (Unlikely but maybe worth considering? Thoughts)
Yeah, you're totally right! Wondering how we should implement the
TotalVotingPowerAHeight
. We should also put a cap on proposal length then maybe? i.e. what if i create a proposal length of 29 days! (Unlikely but maybe worth considering? Thoughts)
This would be the one edge case to worry about... if voting period is longer than unbonding period. Could enforce this via the UI?
ION DAO has done this here: https://github.com/many-things/ion-dao-contracts/blob/dev/contracts/stake/src/contract.rs
ION DAO has done this here: https://github.com/many-things/ion-dao-contracts/blob/dev/contracts/stake/src/contract.rs
My main concern here say if someone wanted to use JUNO for a DAO is that we would need to support a mechanism so said user's do not lose their rewards and keep track of staked balances
Believe this is done right?