sherlock-audit / 2024-06-velocimeter-judging

11 stars 7 forks source link

Mammoth Powder Moose - activeGaugeNumber will not be incremented #702

Closed sherlock-admin4 closed 4 months ago

sherlock-admin4 commented 4 months ago

Mammoth Powder Moose

Low/Info

activeGaugeNumber will not be incremented

Summary

activeGaugeNumber will not be incremented if the multiplication between _claimable * 1e18 overflows

Vulnerability Detail

activeGaugeNumber will not be incremented

Impact

Considering that activeGaugeNumber is incremented to know how many are active, in this logic, this count would be wrong. Considering _claimable “uint256.max” * 1e18, and currentEpochRewardAmount “uint256.max”. the result will be 0. Therefore, activeGaugeNumber will not be incremented.

Code Snippet

https://github.com/sherlock-audit/2024-06-velocimeter/blob/main/v4-contracts/contracts/Voter.sol#L555-L556

Tool used

Manual Review

Recommendation