The veRAACToken contract contains a critical state management flaw where boost parameters are updated before completing dependent voting power calculations and token minting operations. This incorrect execution sequence in the veRAACToken.increase
function causes boost calculations to use stale voting power data and pre-mint token supply values. The resulting miscalculations propagate to all boost-dependent systems including gauge weight distributions and reward allocations, creating protocol-wide inaccuracies in governance power tracking and incentive distributions until the next update cycle.
The vulnerability arises from incorrect state update sequencing in the veRAACToken increase lock mechanism. The veRAACToken.increase
function (veRAACToken.sol#L254) updates boost state parameters before completing critical voting power calculations and token minting operations:
Premature Boost State Update _updateBoostState()
is called before:
Voting power calculation via _votingState.calculateAndUpdatePower()
veToken minting operation _mint()
Stale Data Dependency
The boost calculation in _updateBoostState()
depends on:
_votingState.points[user]
updated by _votingState.calculateAndUpdatePower()
totalSupply()
value changed by _mint()
This results in boost calculations being based on pre-operation state values, systematically underreporting the user's actual voting power during the lock creation transaction.
This sequencing error creates systemic inaccuracies in three critical protocol mechanisms:
Reward Miscalculations
Boost-dependent reward distributions (in gauges and pools) will use stale voting power data, leading to:
Under-allocation of rewards for new locks
Disproportionate rewards for existing positions
Cumulative errors in long-term reward accounting
Protocol Parameter Inaccuracies
Key system metrics relying on boost calculations will be compromised:
Total voting power tracking
Gauge weight distributions
These effects compound over time, creating growing discrepancies between actual and recorded protocol states, ultimately undermining core protocol functionality and user trust in the RAAC governance system.
Manual Review
Move _updateBoostState()
call after voting power calculation and token minting in veRAACToken.increase
:
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.