The one-line mental model
On-chain governance is a state machine with explicit transitions and delays, and the design work is choosing parameters â quorum, threshold, delay â so that a small organized minority cannot act while a large disorganized majority can still respond in time.
Prerequisites
- !Proposal and voting lifecycles at a conceptual level
- !How proxies delegate implementation calls to a logic contract
What You'll Learn
- 1Enumerate every state a proposal passes through and what each transition requires
- 2Size a quorum numerically against measured participation rather than intuition
- 3Explain why upgrades must go through the same governance path as other privileged calls
- 4Recognize capture vectors that are economic rather than cryptographic
Proposal states are the real specification
Before choosing a framework, write down the states and the transitions between them, because those transitions are what an attacker probes. A Governor-style system moves a proposal through a predictable sequence, and each edge carries a requirement:
| State | Entered when | Transition requirement |
|---|---|---|
| Pending | Proposal submitted | Proposal threshold met; voting not started |
| Active | Voting delay elapses | Votes cast until the period ends |
| Succeeded | Period ends | For beats against and quorum reached |
| Defeated | Period ends | Quorum missed or against majority |
| Queued | Timelock accepts it | Timelock delay scheduled |
| Executed | Delay elapses | Calldata runs against targets |
| Canceled | Anytime before queue | Proposer or guardian action |
| Expired | Delay window passes unexecuted | Automatic, if not executed in time |
The two transitions most often specified badly are succeeded-to-queued and queued-to-executed. The first should require that quorum and threshold both hold at the moment the period ends, not at some later tally that a delegate could influence by re-delegating. The second should be constrained so that only the timelock itself can execute, and only after its delay, which closes the door on a fast-path execution that skips the waiting period.
The remaining transition worth attention is cancellation. A cancel path that anyone can call turns governance into a veto for every griefing actor on the network; a cancel path that only the proposer can call is nearly useless, because a proposer who wants the proposal dead simply stops talking about it. The workable design is a narrowly defined guardian who can cancel but never execute, with the guardian's identity published and its powers scoped to a documented set of circumstances, so that its authority is visible to everyone it governs.
Sizing a quorum with real numbers
Quorum is usually expressed as a percentage of total supply, but supply is the wrong denominator if much of it is idle, locked, or held by the team. What matters is the fraction of realistic participation that a proposal must clear:
def quorum_reaches_real_support(quorum_pct, circulating_pct, voter_turnout_pct, for_share):
"""
Does a proposal that passes quorum represent real support?
quorum_pct: quorum as fraction of total supply
circulating_pct: fraction of supply realistically votable
voter_turnout: expected turnout among votable supply
for_share: for votes as fraction of turnout
"""
required_turnout = quorum_pct / circulating_pct
if voter_turnout_pct < required_turnout:
return False, required_turnout
effective_support = voter_turnout_pct * for_share
return effective_support, required_turnout
circulating = 0.40 # 40% of supply is votable
quorum = 0.04 # 4% of total supply required
turnout = 0.25 # typical 25% turnout among votable supply
share = 0.55 # 55% of those votes in favor
ok, needed = quorum_reaches_real_support(quorum, circulating, turnout, share)
print(f"turnout needed to clear quorum: {needed:.1%}")
if isinstance(ok, float):
print(f"effective support among votable supply: {ok:.2%}")
else:
print("proposal fails quorum at this turnout")
A four percent quorum sounds conservative until you divide it by a forty percent circulating supply: it requires only ten percent of votable tokens to participate, and a coalition holding six percent of votable supply plus favorable timing can pass anything. The corrective is not simply a higher quorum, which depresses participation further, but a combination of quorum, a threshold above simple majority for sensitive actions, and a longer delay on the actions that matter most.
Timelocks are the exit window
A timelock's purpose is not to make governance annoying; it is to give everyone who disagrees a defined period in which to act without needing permission. That period must cover the time it takes for a human to notice, evaluate, and respond, which on public networks means hours at minimum and days for anything touching funds.
// A governance-controlled timelock with an explicit role split
contract TreasuryTimelock {
uint256 public constant MIN_DELAY = 2 days;
uint256 public constant MAX_DELAY = 30 days;
address public governance; // may queue operations
address public guardian; // may cancel, never execute
mapping(bytes32 => uint256) public etaOf;
event Queued(bytes32 indexed opId, uint256 eta);
event Executed(bytes32 indexed opId);
event Canceled(bytes32 indexed opId);
modifier onlyGovernance() {
require(msg.sender == governance, "not governance");
_;
}
modifier onlyGuardian() {
require(msg.sender == guardian, "not guardian");
_;
}
function queue(bytes32 opId, address target, uint256 value, bytes calldata data)
external
onlyGovernance
returns (uint256 eta)
{
target; value; data; // validated again at execute time
eta = block.timestamp + MIN_DELAY;
require(eta <= block.timestamp + MAX_DELAY, "delay too long");
etaOf[opId] = eta;
emit Queued(opId, eta);
}
function execute(bytes32 opId, address target, uint256 value, bytes calldata data)
external
onlyGovernance
{
require(block.timestamp >= etaOf[opId], "delay not elapsed");
(bool ok, ) = target.call{value: value}(data);
require(ok, "execution failed");
delete etaOf[opId];
emit Executed(opId);
}
function cancel(bytes32 opId) external onlyGuardian {
delete etaOf[opId];
emit Canceled(opId);
}
}
The role split in that sketch is the design point worth carrying away: governance proposes and executes, while the guardian can only stop. Combining cancel and execute in one key invites either an accidental unilateral execution or a guardian who quietly holds veto power forever; separating them makes the guardian's authority visible and bounded.
Upgrades are governance too
When a protocol uses a proxy, the upgrade call rewrites the logic every user is executing, which makes it the single most powerful action in the system. The common failure is leaving upgrade rights with a deployer multisig that governance only nominally controls, so that a vote about a fee switch creates the appearance of community control while the implementation can change at any moment without one.
The correct discipline is routing upgrades through the same timelock and quorum as every other privileged call, publishing the new implementation address with the proposal, and requiring the proposal description to link to the diff. Anything short of that means your governance is a communication channel rather than an authority, and users are trusting a smaller group than they believe.
| Upgrade right holder | What it implies | When it is appropriate |
|---|---|---|
| Deployer key alone | Centralized control | Test networks only |
| Small multisig | Trusted minority can rewrite everything | Early stage, disclosed plainly |
| Timelocked governance | Community-controlled with an exit window | Mature protocol |
| Immutable, no upgrade | No bug fixes possible | Narrow, heavily audited contracts |
Capture vectors that no cryptography fixes
Most governance failures are economic rather than technical, which is why they recur even in well-built systems. Vote buying happens off chain and is invisible on chain; a delegation registry that shows who votes with what power is the practical countermeasure. Low turnout capture happens when quorum is low relative to realistic participation, and it is measured rather than theorized â audit your own participation statistics before setting parameters. And proposal spam, which buries meaningful discussion under noise, is solved by deposit requirements that make each proposal carry a real cost.
The deepest capture vector is the one that looks like success: a token whose governance power is concentrated because the token's liquidity is concentrated. If four wallets can carry a proposal, governance is a coordination layer for those four, and the honest response is to design for that reality with a security council, explicit scope limits, and disclosure, rather than to pretend that a percentage quorum changed the underlying distribution.
A final operational note concerns the communication layer that surrounds the contracts. On-chain state is authoritative, but voters read proposals through forums, delegate threads, and summary sites, and any of those can be compromised or simply mistaken. The countermeasure is boring and effective: link every proposal to a canonical description hash stored in the calldata itself, require voters to verify the hash before signing, and keep the on-chain title short so that the hash, not the prose, is what the Governor enforces.
đĄGovernance needs a dry run
Before handing a protocol to token voting, rehearse the full lifecycle on a test deployment: submit a nontrivial proposal, let it pass, queue it, wait out the delay, execute it, and document how long each step took. Teams that skip the rehearsal routinely discover that their delay is too short or their executor role cannot actually call the target.
Common Mistakes
Setting quorum as a round percentage without checking realistic turnout
Fix: Model quorum against measured votable supply and historical participation, and re-tune as distribution broadens
Allowing the guardian role to execute as well as cancel
Fix: Separate cancel-only guardianship from execute rights so no single key can both delay and force
Leaving upgrade rights outside the timelocked governance path
Fix: Route every implementation change through the same quorum and delay as treasury movements, and publish the diff with the proposal
Assuming a vote result is binding without a rehearsed execution path
Fix: Test the full lifecycle on a fork, including a target contract call, before the first real proposal opens
Best Practices
- Publish participation and quorum statistics alongside every proposal so voters can judge turnout context
- Use different delays for different action classes: short for parameters, long for treasury and upgrades
- Keep the guardian's powers narrowly scoped, publicly known, and time-limited where possible
- Require proposals to include simulated execution results, so calldata behavior is known before voting begins
Interview Questions
Q1: Why separate the guardian's cancel right from the execution right?
Because combining them creates a single key that can both force a proposal through and block any other. Separating them makes the guardian a brake rather than a driver, and the asymmetry is visible to every observer reading the contracts.
Q2: Why does quorum need to be measured against votable supply rather than total supply?
Total supply includes tokens that cannot vote â locked, unallocated, or held by parties who never participate â so a percentage of total supply can correspond to a tiny fraction of realistic participation, letting a small coalition pass proposals.
Q3: What makes an upgrade a governance event rather than a maintenance task?
It rewrites the logic every user is executing, so its power exceeds any parameter change. If upgrades bypass the governance path, then governance controls the appearance of the protocol while a smaller group controls its behavior.
Key Takeaways
- Write the proposal state machine first; parameters come second and exist to guard its transitions
- Quorum and threshold must be sized against measured participation, not against total supply
- Timelocks create the only window in which dissent can act without permission, so delay is a safety property
- Upgrades belong in the same governed path as treasury actions, or governance is decorative
- Capture is usually economic: concentration, turnout, and vote buying, none of which cryptography resolves