In the governance.sol
system's voting mechanism there is a flaw that allows attackers to manipulate their voting power during active proposal periods. The vulnerability stems from the interaction between the veRAACToken's lock duration extension feature extend
function and the Governance.sol
contract's voting power calculation timing.
The core issue is that voting power can be significantly amplified during the voting period by extending lock durations. An attacker can initially lock tokens for a minimum duration (365 days), wait to see how a proposal is trending, then extend their lock duration to the maximum (1460 days) just before voting. This creates a timing attack vector where users can strategically multiply their voting power by up to 4x after a proposal is already in progress.
My proof of concept demonstrates how multiple accounts can coordinate to amplify their collective voting power from an initial ~500k votes to over 3.3M votes (a 6x increase) by manipulating lock durations during the voting period. This undermines the democratic nature of the governance system and allows minority token holders to potentially control voting outcomes.
The vulnerability exists in the interaction between three key functions:
Initial Lock Setup: In veRAACToken.sol
contract, the lock
fucntion : https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/veRAACToken.sol#L212
Lock Duration Extension: https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/veRAACToken.sol#L280
Attack Path:
Attacker creates multiple accounts and locks tokens with minimum duration (365 days)
Proposal is created and voting begins
Attackers monitor voting trends
Just before voting, attackers extend their lock durations to maximum (1460 days)
Voting power is amplified due to longer lock duration
Attackers cast votes with artificially inflated power
Proof of Code: Add this code to your test file and run it.
Proof of Concept Results:
The vulnerability has severe implications for the governance system:
Vote Manipulation
Attackers can amplify voting power by up to 6x during voting
Minority token holders can potentially control governance decisions
Democratic nature of governance is undermined
Strategic Exploitation
Attackers wait to see voting trends before amplifying power
Allows for strategic manipulation of close votes
Creates unfair advantage for coordinated groups
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.