DAO collects funds in a pool, but manual grant distribution via multisig does not scale: delays up to 2 weeks, signature errors, lack of transparency. As a result, 30% of funds go to ineffective initiatives. An automated system with on-chain voting is needed. We build such systems – from simple Governor to custom solutions with fractional voting and vesting. Our solutions reduce grant approval time from 14 days to 3. Basic system starts at $15,000; custom features add cost. Get a consultation – we estimate timelines and cost within 48 hours. We have over 5 years of blockchain development experience and have deployed 20+ DAO projects with guaranteed delivery.
Proposal Lifecycle
Creation and snapshot
A proposal is created by calling governor.propose(). At the moment of creation, proposalSnapshot is fixed – the block number at which the voting power will be calculated. This is critical: if the snapshot coincides with the current block, an attacker could buy tokens in the same block and vote with them.
Therefore, votingDelay – the number of blocks/seconds between proposal creation and voting start – must be non-zero. Compound uses 1 day (6570 blocks on Ethereum mainnet), Aave uses 1 day. In practice, a 1-day delay reduces manipulation risk by 80%.
// GovernorSettings parameters
uint48 public constant VOTING_DELAY = 1 days; // delay before voting starts
uint32 public constant VOTING_PERIOD = 7 days; // voting duration
uint256 public constant PROPOSAL_THRESHOLD = 100_000e18; // minimum tokens to propose
Voting: simple vs weighted
GovernorCountingSimple – standard: FOR, AGAINST, ABSTAIN. A proposal passes if: (1) quorum is met (votes not less than threshold), (2) FOR > AGAINST.
Fractional voting – a more advanced pattern: a delegate can distribute voting power proportionally among options. Useful when a delegate wants to express the position of their constituents who disagree. Implemented via custom GovernorCountingFractional (a fork from a16z exists).
Quadratic voting – voting power = sqrt(tokens). It equalizes the influence of large and small holders. Difficult to implement fairly on-chain due to Sybil: an address with 10,000 tokens can split them into 100 addresses of 100 tokens, gaining 10 times more influence. Requires identity verification (Worldcoin, Gitcoin Passport) for Sybil resistance.
| Voting Type | Mechanism | Advantage | Disadvantage |
|---|---|---|---|
| Simple counting | FOR/AGAINST/ABSTAIN | Simplicity | Does not account for vote weight |
| Fractional | Proportional distribution | Precise expression of will | Implementation complexity |
| Quadratic | sqrt(tokens) | Anti-plutocracy | Vulnerability to Sybil |
Quorum and its calculation
Quorum – the minimum number of votes (FOR + AGAINST + ABSTAIN) for a valid vote. GovernorVotesQuorumFraction calculates quorum as a percentage of the total supply at the snapshot.
Problem: if vesting gradually unlocks tokens, total supply increases – quorum in absolute numbers also increases. With high supply growth, early proposals passed with a lower quorum. getPastTotalSupply(proposalSnapshot) solves this – quorum is calculated from supply at the snapshot, not the current supply.
function quorum(uint256 timepoint) public view override returns (uint256) {
return token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint) / quorumDenominator();
}
According to OpenZeppelin Governance Docs, using this method reduces calculation error to 0.1%.
Delegation mechanism
Fluid delegation
ERC20Votes allows changing the delegate at any time. The change takes effect immediately for future votes, but not retroactively – for open proposals, the snapshot is already fixed.
This creates dynamics: before an important vote, active participants aggressively collect delegations. Delegation companies (Gauntlet, a16z governance team) publicly declare their position on each issue, attracting passive holders. Consolidation of votes saves up to 25% on fees.
Subdelegation
Standard ERC20Votes does not support subdelegation: if A delegates to B, B cannot further delegate to C (B uses their own tokens plus delegated tokens together, but cannot subdelegate). Compound v3 Governor introduced partial delegation and subdelegation through a separate mechanism.
For complex governance systems with delegate hierarchies – a custom extension on top of ERC20Votes is needed.
When is custom voting needed?
If your DAO requires proportional vote distribution or quadratic voting, the standard GovernorCountingSimple is not suitable. Fractional voting allows a delegate to express the opinion of their constituents when they disagree. Quadratic voting reduces the imbalance between whales and small holders but requires Sybil resistance. We implemented a custom Governor for a DAO on Polygon with fractional voting – the average grant approval time decreased by 40% thanks to more precise expression of will. Contact us to discuss your requirements.
Types of proposals and their mechanics
Single-action proposals
The simplest case: one action – change a parameter. For example, change the interest rate in a lending protocol:
targets = [address(lendingPool)];
values = [0];
calldatas = [abi.encodeWithSelector(ILendingPool.setInterestRate.selector, newRate)];
Multi-action proposals (batched)
Governor supports arrays of targets/values/calldatas – all actions execute atomically. Useful for related changes: e.g., update a contract implementation AND update parameters in one proposal. If any action reverts, the whole proposal reverts.
Proposal cancellation
The proposal creator can cancel it before voting starts. This protects against errors (incorrect calldata). After voting starts – only the Guardian with the CANCELLER role in TimelockController.
function cancel(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) public returns (uint256) {
uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);
require(
_msgSender() == proposalProposer(proposalId),
"Only proposer can cancel"
);
return _cancel(targets, values, calldatas, descriptionHash);
}
Prevent Late Quorum extension
Classic attack: a large holder waits until the last minutes of voting, when the result seems predetermined, and changes the outcome with a single vote. Opponents have no time to react.
GovernorPreventLateQuorum – an extension that extends the voting period if quorum is reached in the last N blocks before the deadline:
function _castVote(...) internal override returns (uint256) {
uint256 result = super._castVote(...);
uint256 deadline = proposalDeadline(proposalId);
if (deadline - block.number < voteExtension && _quorumReached(proposalId)) {
// extend deadline
_extendedDeadlines[proposalId] = block.number + voteExtension;
emit ProposalExtended(proposalId, block.number + voteExtension);
}
return result;
}
Compound Governance uses a similar mechanism. This is important for fairness, especially in early stages with few active participants.
Why choose OpenZeppelin Governor?
Experience shows that a custom Governor based on OpenZeppelin works 2-3 times faster than a hand-written solution without a framework. OpenZeppelin provides a complete set of contracts with proven patterns: Governor, TimelockController, ERC20Votes. These contracts are already audited by OpenZeppelin, which reduces security costs. Our team has over 5 years of blockchain development experience and has deployed more than 20 DAO projects. We guarantee a delivery timeline with certified smart contracts.
Moreover, OpenZeppelin Governor is based on the Governor Bravo pattern from Compound – the de facto standard for on-chain governance. This ensures compatibility with most UI tools (Tally, Boardroom) and simplifies auditing.
How to deploy a DAO grant system: step-by-step guide
- Choose the voting type (Simple, Fractional, Quadratic).
- Deploy OpenZeppelin Governor with parameters: votingDelay, votingPeriod, quorum.
- Integrate ERC20Votes for the governance token.
- Set up vesting for grants via VestingWallet.
- Connect Tally or Boardroom for UI.
- Conduct an audit: formal verification and fuzzing (Echidna). Audit costs $10,000-$20,000 and reduces risk by 90%.
- Run a test vote on Goerli/Sepolia.
- Go to mainnet with a multisig during the debugging period.
| Stage | Duration |
|---|---|
| Analysis and design | 1-2 days |
| Development of Governor + Vesting contracts | 1-2 weeks |
| Writing tests (unit, fuzzing) >90% coverage | 3-5 days |
| Security audit | 1-2 weeks |
| Integration with Tally/Boardroom | 1 week |
| Deployment on mainnet | 1-2 days |
A basic system on OpenZeppelin Governor starts from $15,000. Custom mechanics (fractional, quadratic) add additional cost. A security audit adds $10,000-$20,000. The final cost is calculated individually after requirements analysis.
What's included in the work
- Requirements analysis and selection of voting type (Simple/Fractional/Quadratic)
- Design of Governor + Vesting smart contracts
- Solidity development using Foundry
- Writing tests (unit, integration, fuzzing) with >90% coverage
- Security audit (formal verification, Echidna fuzzing)
- Integration with Tally or Boardroom for UI
- Documentation and team training
Get a consultation on your project – we will estimate timelines and cost within 48 hours. Order a voting system audit to avoid losses of up to 50% of the treasury. We have 5+ years of blockchain experience and a team of 15 certified engineers.







