New rewardRate calculation in notifyReward function in BaseGauge is base only on new amount to distribute and it skips past reward rate.
When GaugeController calls notifyRewardAmount function the new rewardRate is calculated inside notifyReward function. The calculations are based on new amount parameter and distribution period. This new rewardRate calculation skips previous rate value which is key part of the new rate as it includes information about previous rate that the users used to claim their rewards.
When we look at Synthetix staking contract, that the logic is used in BaseGauge, we can see that notifyRewardAmount calculates new reward rate based on previous rate. The same thing should be done in BaseGauge so that past rewards can be still claimed by the users.
To calculate new rewardRate the past rewardRate is not used which leads to incorrect rewardRate calculation and prevents users from claiming their REAL rewards.
Manual Review, Hardhat
Consider modifying new rewardRate calculations so that it is also based on past rewardRate to ensure correct 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.