How a decision travels from idea to action
What the contracts do, in the order a proposal lives it.
1. The life of a proposal
- 1
Published
Model, period, quorum, threshold and action are fixed.
- 2
Voting open
The tally is public and live.
- 3
Closed
The contract computes the result at the deadline.
- 4
Passed or defeated
Quorum met and enough For: passed.
- 5
Executed
Anyone can run the action, exactly as written.
The author or an admin can cancel before it closes. It never executes.
2. Quorum and threshold
Quorum: did enough take part? Threshold: did enough say For?
Worked example
38,350 tGOV of voting power, 20% quorum: 7,670 tGOV must vote.
- 17,950 tGOV vote, of 7,670 needed: quorum reached.
- 25,050 For ÷ 6,850 sided = 73.7%: passed.
- 3Without the last 1,250 tGOV ballot: no quorum, defeated.
Quorum 20%
3. Three voting models, one set of ballots
The demo-day venue ballots, counted three ways.
| Model | For | Against | Result |
|---|---|---|---|
| One wallet, one vote | 9 wallets | 11 wallets | Defeated |
| Token-weighted | 27,750 tGOV | 10,600 tGOV | Passed |
| Token-weighted with delegation | 31,650 tGOV | 6,700 tGOV | Passed |
No model is neutral: pick one per proposal, and write it down.
4. Delegation
Lend your voting power, keep your tokens, take it back anytime.
- One delegate at a time, never a chain.
- Delegates show a pitch and their turnout.
- Only proposals using delegation count it.
5. Roles and permissions
The contract enforces them; the app explains every lock.
| Action | Admin | Proposer | Voter |
|---|---|---|---|
| Vote and delegate | Yes | Yes | Yes |
| Publish a proposal | Yes | Yes | With 2,000 tGOV |
| Cancel an open proposal | Any | Their own | No |
| Execute a passed proposal | Yes | Yes | Yes |
6. On-chain or off-chain votes
On-chain
Each ballot is a transaction: verifiable, but costs gas. The demo simulates this.
Off-chain, signed
Each ballot is a free signed message; execution needs a relayer.
7. For developers
The demo's data layer mirrors a Governor contract with an ERC20Votes token.
Show the contract calls
propose(targets, values, calldatas, description)createProposal()castVoteWithReason(proposalId, support, reason)castVote()delegate(delegatee)setDelegate()execute(targets, values, calldatas, descriptionHash)executeProposal()cancel(…)cancelProposal()state(proposalId), proposalVotes(proposalId)statusOf(), tally()