A reward miscalculation vulnerability exists in the GaugeController.sol and related gauge contracts (BaseGauge.sol, RAACGauge.sol, RWAGauge.sol). The issue arises when reward emissions are paused and restarted, leading to inaccurate reward calculations for stakers.
This issue allows users to accumulate extra rewards, even for periods where no active reward emissions occurred
The functions getRewardPerToken and earned depend on the difference between lastUpdateTime and the current timestamp.
When a new reward distribution period starts, the function does not properly reset or account for any inactive time gap between the previous reward end and the new start.
As a result, extra rewards are accumulated for liquidity providers, which can be exploited for excessive claims.
This vulnerability in BaseGauge.sol introduces a critical flaw in reward distribution, leading to unfair token emissions and potential financial losses for the protocol.
** Misallocation of Rewards**
Users receive rewards for inactive time periods, meaning they earn rewards even when no emissions are active.
This leads to inflationary pressure on the reward token, depleting the reward pool faster than expected.
Severity: High
Potential fund loss for the protocol.
Excessive inflation of the reward token.
Exploitable by attackers to drain emissions funds.
Manual Review
Modify notifyRewardAmount to correctly reset the timestamp:
Ensures rewards only start accumulating from the new distribution period.
Prevents inactive time from being included in calculations.
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.