The periodFinish function in the BaseGuage.sol is supposed to help the reward calculation by returning the time at which the period will end. But it is incorrect and keeps on adding the periodDuration to the lastUpdateTime variable. This is wrong.
The lastUpdateTime is not just the startTime of the reward distribution period, but it is updated everytime someone stakes/withdraws etc.
This causes the reward Distribution to be messed up and give incorrect values. Also the period never ends.
Never ending reward period
manual review
Update the periodFinish to
return periodState.periodStartTime + getPeriodDuration();
Note: also in the notifyRewarAmount you may have to update the periodState.periodStartTime = block.Timestamp
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.