In BaseGauge.sol, notifyReward()
function notifies about the new reward amount and recalculates the reward rate. However, the calculation does not account for the current reward rate and instead overwrites the current reward rate entirely.
The notifyReward()
function is called internally from notifyRewardAmount()
as seen above, and is expected to update the reward rate based on the new amount.
In the function above, line 12 calculates the rewardRate based on the amount value and period duration alone. It does not account for any existing rewards that may already be accruing. The reward rate is not accumulated and overwrites the reward rate instead of calculating a new reward rate based on the amount.
Reward rate will be calculated incorrectly and affect distributed rewards. Reward rate can also change and jump drastically instead of smoothly adjusting.
Manual
Ensure that the old reward rate is not overwritten but instead is factored in when recalculating the new reward rate.
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.