In GaugeController
, users vote on gauge allocations using their veRAAC balance. However, since veRAAC balances fluctuate over time, the system does not correctly account for past votes when a user re-votes for the same gauge. This leads to incorrect gauge weight calculations, causing potential inflation or under-accounting of the total voting power.
Users vote for a gauge with a specified weight:
When a user votes, the gauge's total weight is updated as follows:
The issue arises because the old weight calculation uses the user’s current voting power rather than the voting power they had when they initially voted.
If a user’s voting power decreases between two votes, the old weight is subtracted with a smaller voting power, leading to inflated gauge weights.
If a user’s voting power increases, the old weight is subtracted with a larger voting power, leading to unexpectedly lower gauge weights.
This distorts the gauge voting system, potentially leading to misallocated rewards.
A user with 1000 veRAAC votes for a gauge with a 50% weight allocation.
Later, their veRAAC balance drops to 500, and they re-vote with a different weight.
The contract subtracts their old vote using their new lower balance, meaning the gauge weight does not decrease enough.
The system now overestimates total gauge weight, leading to incorrect distribution of incentives.
Gauge weights become inaccurate, leading to unfair allocation of emissions/rewards.
Users can unintentionally inflate weights by voting multiple times after their voting power decreases.
Governance and reward distributions become unreliable, reducing the integrity of the staking mechanism.
N/A
Implement an epoch-based voting system, where votes are locked in for a set period before they can be modified.
Store historical voting power snapshots to accurately calculate old weight removal.
Use well-established voting mechanisms, such as those used in Velodrome Finance (Reference), which prevents weight inflation by ensuring consistent voting power during each epoch.
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.