In GaugeController voting is based on user voting power and weight provided by user. When the gauge weight is updated, incorrected value is subtracted which can cause underflow revert blocking user from voting.
User can vote using vote function in GaugeController.
_updateGaugeWeight is an internal function responsible for GaugeWeight calculations. The issue with that function is that during the newGaugeWeight calculation it uses CURRENT user's voting power multiplied by oldWeight which is later subtracted from oldGaugeWeight.
This is an issue because user's voting power could increase since first voting and this function should consider user's past voting power multiplied by oldWeight and subtract it from the oldGaugeWeight.
Let's look at this example where user is only voter.
User votes 100 weight with 100 voting power
Gauge weight is equal to 10000
After some time user wants to vote again because he has higher voting power
User votes again but with 100 weight and 150 voting power
Now the _updateGaugeWeight will revert because it will try to calculate newGaugeWeight like this -> 10000 - (100 (newWeight) * 150 (votingPower)) = 10000 - 15000
_updateGaugeWeight should use user's past voting power that was used during first vote to calcualte the weight that is going to be subtracted from the total gauge weight.
_updateGaugeWeight can underflow leading to DoS of voting mechansim for some users.
Manual Review, Hardhat
Calculate user's old vote using past voting power not the current.
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.