A critical timing-based vulnerability exists in governance.sol system that allows malicious actors to manipulate voting quorums through coordinated token withdrawals.
It allows malicious actors to manipulate the quorum requirements for proposal voting. The vulnerability stems from the dynamic calculation of quorum based on total voting power, combined with the ability to coordinate token withdrawals after lock expiry. This enables attackers to artificially lower the quorum threshold during an active proposal's voting period, potentially allowing minority stakeholders to pass malicious proposals without true majority support.
The attack exploits the interaction between the veRAACToken's withdrawal mechanism and the Governance.sol quorum calculation, demonstrating how governance systems with dynamic quorum requirements can be vulnerable to timing-based manipulation attacks.
The vulnerability stems from three key design choices:
Dynamic quorum calculation based on total voting power
Ability to withdraw locked tokens after expiry
No quorum freezing mechanism during active proposals
Through detailed testing (testTimingAttackOnQuorum), i have dome my best to demonstrat how attackers can artificially lower the quorum requirement mid-proposal by coordinating withdrawals after lock expiry. This enables a minority stakeholder to pass proposals that would otherwise require significantly more support.
The proof of concept shows an attack reducing the quorum from 14,000e18 to 6,000e18 tokens, allowing a proposal to pass with just 99,726e18 votes - far less than what would have been required under the initial quorum.
Quorum Calculation: https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/proposals/Governance.sol#L353
Multiple coordinating attacker token holders
Patience to wait for lock expiry
Sufficient initial voting power to meet reduced quorum
Timing coordination for withdrawals
Proof of code;
Initial State Setup:
Initial State:
Total Voting Power: 350,000e18
Quorum Requirement (4%): 14,000e18
Attacker Voting Power: ~100,000e18
Attack Execution Flow:
Final State:
Reduced Total Voting Power: 150,000e18
New Quorum Requirement: 6,000e18
Attacker's Votes: 99,726e18 (Now sufficient to pass)
A malicious actor can unilaterally pass governance proposals by coordinating token withdrawals to artificially lower the quorum from 14,000e18 to 6,000e18 tokens, and complete governance control with only ~100k votes instead of the intended higher threshold.
Take control of governance
Bypass intended democratic processes
Achieve this with far fewer votes than should be required
Freeze Quorum at Proposal Creation
Implement Withdrawal Restrictions
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.