-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
Governance mechanism allowing token holders to vote on proposals (e.g. detokenization, asset sale) with votes weighted by token balance.
Requirements
cast_vote(env, asset_id, proposal_id, voter):
- Voter must authenticate
- Voter must hold tokens and not have already voted
- Adds the voter's token balance to the proposal's running tally
- Marks voter as having voted (prevents double voting)
- Emits a
vote_castevent
get_vote_tally(env, asset_id, proposal_id) — Returns cumulative votes cast
has_voted(env, asset_id, proposal_id, voter) — Read-only
proposal_passed(env, asset_id, proposal_id):
- Passes if tally ≥
min_voting_threshold(set during tokenization)
Acceptance Criteria
- Double voting returns
Error::AlreadyVoted - Vote weight equals voter's token balance at time of voting
-
proposal_passedrespects themin_voting_threshold
Reactions are currently unavailable