A critical vulnerability has been identified in the increase() function in the VeRAACToken contract where the lock amount is double-counted during voting power calculation. This occurs because the amount being locked is added twice: once during the lock state update and again during the power calculation.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol
The vulnerability occurs in the following sequence:
The function first updates the lock state:
Then retrieves the updated lock (which now includes the amount):
Finally, incorrectly adds the amount again during power calculation:
Inflated voting power calculation where users receive approximately double their intended voting power
Potential manipulation of governance decisions due to incorrectly calculated voting weights
manual review
Remove the additional amount in the power calculation:
Alternatively, retrieve the lock state before increasing it:
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.