periodFinish should be a fixed value rather moving in to future with updating the lastUpdateTime. Here periodFinish is never ending due to updating the lastUpdateTime.
When user stake _updateReward is called and there assume lastUpdateTime is update to current timestamp.
Implementation of periodFinish is this. You can see due to updating the lastUpdateTime , periodFinish is move ahead. Due to that again lastUpdateTime is possible to update via lastTimeRewardApplicable. This looping caused each other variables to update so periodFinish never ending.
The periodFinish value never ends, allowing users to continuously earn rewards by staking beyond the intended 7-day period. This could lead to excessive reward distribution and potential depletion of the reward pool.
Manual Review
Use another variable to lastUpdateTime in periodFinish so that periodFinish is fixed.
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.