The veRAACToken::withdraw and veRAACToken::emergencyWithdraw functions delete user lock positions but fail to update the LockState::totalLocked value. This stale value propagates to BoostState::totalWeight, causing inaccurate boost multiplier calculations that affect reward distributions.
User creates lock with 1000 RAAC
Protocol shows 1000 RAAC in totalLocked
User waits for lock expiration and withdraws
totalLocked remains at 1000 RAAC despite withdrawal
Boost calculations use incorrect weight values
Relevant code snippets:
Add this test to veRAACToken.test.js:
Medium severity - Causes systematic miscalculations in boost multipliers, leading to incorrect reward distributions. While not directly risking fund loss, this undermines protocol economics and user trust.
Update locked totals on withdrawal:
Apply same fix to emergencyWithdraw
Add validation checks for totalLocked consistency
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.