Verification Checklist: Proposer Voting Power & Cancel Exposure
- ✓ Dynamic Voting Power Tracking: Verify that the proposer's delegated voting power remains strictly greater than
proposalThresholdacross Active voting and Queued timelock stages. - ✓ Lending & Staking Isolation: Ensure the proposer address interacts with zero liquidity pools, money markets (Aave/Compound), or wrappers that trigger underlying token transfers.
- ✓ Delegation Source Stability: When relying on third-party delegations to satisfy threshold, confirm that whale delegators have timelocked or multisig cooldowns against re-delegation.
- ✓ Cancellation Vulnerability Window: Determine whether the contract is native GovernorBravo or OpenZeppelin v4.9+, checking whether cancel is open or restricted to whitelisted accounts.
1. Design Philosophy of GovernorBravo Thresholds: Why Anti-Spam Spans the Lifecycle
In Ethereum decentralized governance, Compound's GovernorAlpha and GovernorBravo frameworks established the blueprint for on-chain proposals. To protect DAOs from spam and frivolous governance actions that burden community attention and gas, frameworks enforce a proposalThreshold. On Uniswap, submitting a proposal mandates at least 2.5 million UNI in delegated voting weight; on Compound, this threshold is historically calibrated around 65,000 COMP.
The core objective is ensuring skin in the game: the entity initiating the proposal must possess a substantial economic stake in protocol health. However, game theory and smart contract security dictate that verifying threshold solely at the moment of propose() is fundamentally incomplete. If a proposer could submit an action and immediately offload tokens on secondary markets, transfer them to a fresh address, or borrow stablecoins against them, the proposer would no longer face the economic consequences of malicious or poorly audited execution.
To seal this vulnerability, Compound's GovernorBravo introduces an uncompromising invariant: the proposer must maintain delegated voting power at or above proposalThreshold continuously until the proposal reaches executed finality. If votes dip below threshold for even a single block, any external entity—arbitrageur, automated bot, or competitor—gains permissionless authority to invoke cancel(), rendering the proposal irreversibly dead.
2. Mathematical Mechanics & Solidity Analysis of cancel(proposalId)
To identify exact execution boundaries, we examine the canonical Compound GovernorBravo implementation in GovernorBravoDelegate.sol:
function cancel(uint proposalId) external {
require(state(proposalId) != ProposalState.Executed, "GovernorBravo::cancel: cannot cancel executed proposal");
Proposal storage proposal = proposals[proposalId];
require(
msg.sender == proposal.proposer ||
comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposal.proposalThreshold,
"GovernorBravo::cancel: proposer above threshold"
);
proposal.canceled = true;
timelock.cancelTransaction(
proposal.targets[i],
proposal.values[i],
proposal.signatures[i],
proposal.calldatas[i],
proposal.eta
);
emit ProposalCanceled(proposalId);
}
Analyzing this contract logic reveals a strict assertion tree:
- State Pre-condition: As long as the proposal state is not
ProposalState.Executed, cancellation is permissible. This leaves proposals inPending,Active,Succeeded, andQueuedfully vulnerable. - Dual-Branch Authorization: The transaction succeeds if either of the following conditions holds:
msg.sender == proposal.proposer: Voluntary cancellation by the author;comp.getPriorVotes(proposal.proposer, block.number - 1) < proposal.proposalThreshold: The proposer's historical delegated votes at blockB-1fell below threshold.
Under the second branch, msg.sender is unrestricted. If at block height B, the proposer's voting power V_p(B) < T where T is the proposal threshold, then in block B+1, any caller worldwide can invoke cancel(proposalId). Even if the proposer deposits tokens back at block B+2 restoring V_p(B+2) ≥ T, an interim cancellation locks the proposal permanently into Canceled. There is no appeal, re-opening, or retroactive restoration.
3. Operational Pitfalls: Staking Into Lending Pools Erases Delegated Checkpoints
In practice, governance failures rarely result from short-sellers; rather, they stem from proposers misunderstanding ERC20Votes checkpoint architecture. The most common catastrophic error involves yield optimization and lending collateral deposits.
Real-World Case Study: Collateral Deposit Derails Key DAO Upgrade
A core contributor proposed a vital fee-sharing parameter modification requiring 100,000 governance tokens. The author controlled 105,000 tokens, self-delegated, and submitted the proposal. On Day 3 of the 5-day voting window, aiming to maximize capital efficiency, the author supplied 10,000 tokens to Aave as collateral to borrow stablecoins.
Supplying tokens transferred them from the author's wallet to the Aave pool contract. The underlying ERC20Votes._transferTokens hook immediately fired: the author's checkpointed balance dropped from 105,000 to 95,000. Because 95,000 is less than the 100,000 threshold, the proposal became immediately cancelable. Within two minutes, an automated keeper script dispatched cancel() to the Governor contract, aborting the upgrade on the verge of passage.
Why do lending deposits destroy voting power? Major governance tokens (COMP, UNI, AAVE) utilize checkpointed historical ledger arrays checkpoints[account]. When tokens transfer—regardless of whether the recipient is an EOA or a smart contract vault—the sender's voting power is deducted. Lending protocols do not re-delegate incoming tokens back to the depositor, resulting in an immediate net voting deficit.
4. Front-Running Cancellation Vectors & Bot Exploitation
Governance votes determine key economic allocations, such as treasury grants, collateral onboarding, and debt ceiling adjustments. For competing entities, aborting an opponent's proposal generates direct financial advantages.
When a proposer maintains only a paper-thin margin above threshold (e.g., <1%), monitoring bots can target multiple execution vectors:
| Trigger Event | Token Movement | Voting Power Impact | Bot Exploit Vector |
|---|---|---|---|
| Routine Transfers | Proposer moves tokens to cold storage | Direct deduction from self-delegated power | Monitor Transfer event, trigger cancel next block |
| Re-delegation | Whale delegator switches proxy to another address | Proposer's external delegated power vanishes | Execute cancel within the same or subsequent block |
| Liquidity Provision | Proposer deposits tokens into AMM pool | Transfer to pool drops wallet voting balance | Backrun AMM mint transaction with cancel |
| Lending Liquidation | Market volatility triggers collateral liquidation | Liquidator seizes tokens out of account | Bundle liquidation and proposal cancel atomically |
On Ethereum and major Layer 2 networks, automated MEV searchers and governance bots continuously scan pending transactions. If a proposer's voting power dips below threshold, searchers submit cancel(proposalId) within milliseconds, leaving zero window for remedial deposits.
5. On-Chain Lifecycle Verification: From Creation to Timelock Finality
To safeguard critical upgrades across the 7- to 14-day voting and execution window, security teams must deploy real-time monitoring and defensive hygiene:
// On-chain proposer safety verification logic
function verifyProposerSafety(address governor, uint proposalId) view returns (bool isAtRisk, uint256 margin) {
IGovernor gov = IGovernor(governor);
Proposal memory p = gov.proposals(proposalId);
uint256 threshold = gov.proposalThreshold();
uint256 currentVotes = gov.token().getPriorVotes(p.proposer, block.number - 1);
if (currentVotes < threshold) {
return (true, 0); // Active cancellation exposure!
}
margin = currentVotes - threshold;
isAtRisk = (margin * 100 / threshold) < 10; // Alert if safety buffer < 10%
}
Essential operational rules include:
- Safety Buffer Maintenance: Proposers should maintain a minimum 15%–20% buffer above
proposalThresholdto cushion against accidental delegation withdrawals. - Dedicated Cold Wallet Isolation: The proposing address should serve strictly as an isolated governance multisig. Once
propose()is executed, the address must halt all external contract calls until final on-chain execution. - Delegation Binding Commitments: When relying on external whale delegations, formal timelock commitments should ensure the delegator cannot modify
delegate()before execution. - Queued State Active Defense: Even after a proposal achieves unanimous approval and enters the Timelock queue, the proposal remains vulnerable to cancellation until
execute()completes.
6. Framework Distinctions: OpenZeppelin Governor vs GovernorBravo
Developers frequently conflate OpenZeppelin Governor with Compound GovernorBravo. In reality, their cancellation logic reflects divergent architectural paradigms:
In modern OpenZeppelin Contracts (v4.9+), cancellation rights can be configured through modular extensions such as GovernorPreventLateQuorum and role-based permissions. By default, cancellations can be restricted to the proposer or dedicated administrative guardians, preventing open public cancellations during timelock queues.
However, in forks and deployments derived directly from Compound GovernorBravo (including Uniswap and Compound themselves), permissionless open cancellation is hardcoded into the immutable state machine. Proposers must treat their tokens not as liquid discretionary capital, but as an active on-chain security deposit securing the proposal until execution.
Frequently Asked Questions (FAQ)
Why does GovernorBravo allow any external address to call cancel?
This is a core anti-spam and game-theoretic defense. If proposers could dump, transfer, or lend their tokens after proposing without consequence, they would lose skin in the game. Open permissionless cancellation allows the community to prune proposals whose sponsors have relinquished their stake.
Can a proposal be canceled after winning the vote and entering the Timelock queue?
Yes. In Compound GovernorBravo and Uniswap Governor, as long as a proposal has not reached the final Executed state, any dip in the proposer's voting power below proposalThreshold allows anyone to execute cancel, aborting the proposal permanently.
Why does depositing tokens into Aave or Compound reduce delegated voting power?
Because ERC20Votes checkpoints track balances transferred out of the account. Depositing tokens into a lending pool transfers ownership to the pool contract, resetting the user's checkpoints downward unless the pool supports specialized voting pass-through.