Skip to content
GovChain

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. 1

    Published

    Model, period, quorum, threshold and action are fixed.

  2. 2

    Voting open

    The tally is public and live.

  3. 3

    Closed

    The contract computes the result at the deadline.

  4. 4

    Passed or defeated

    Quorum met and enough For: passed.

  5. 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.

  1. 17,950 tGOV vote, of 7,670 needed: quorum reached.
  2. 25,050 For ÷ 6,850 sided = 73.7%: passed.
  3. 3Without the last 1,250 tGOV ballot: no quorum, defeated.
For 5,050 tGOVAgainst 1,800 tGOV
73.7% ForNeeds more than 50% For
Quorum reachedParticipation 7,950 tGOV of 38,350 tGOV

Quorum 20%

3. Three voting models, one set of ballots

The demo-day venue ballots, counted three ways.

ModelForAgainstResult
One wallet, one vote9 wallets11 walletsDefeated
Token-weighted27,750 tGOV10,600 tGOVPassed
Token-weighted with delegation31,650 tGOV6,700 tGOVPassed

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.

ActionAdminProposerVoter
Vote and delegateYesYesYes
Publish a proposalYesYesWith 2,000 tGOV
Cancel an open proposalAnyTheir ownNo
Execute a passed proposalYesYesYes

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
The contract calls the demo simulates
  • 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()
Read the source on GitHub

See it with real ballots

Launch the demo