perodFinish() has incorrect logic and should be:
This is because lastUpdateTime
can easily get updated if a function like notifyRewardAmount()
is called:
Or via stake() --> updateReward() modifier --> _updateReward() --> lastTimeRewardApplicable()
which returns:
Since lastTimeRewardApplicable()
is internally called by both getRewardPerToken()
and _udpate()
, it can result in exceeding the period-end timestamp due to this faulty logic. Every time rewards are updated, it would extend the period-end time.
Reward Period Extension
Incorrect reward distribution among users
Manipulation potential where users could time their interactions to exploit the extending periods
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.