When a user claims staking rewards just shy of 2 weeks, she'll get 1 token and has the surplus time (over 1 week) reset to "0"
The impact of the issue is that users claiming staking rewards just shy of two weeks (or any amount of weeks) will receive only one token, effectively losing the surplus time (over one week) as it resets to "0". This results in a loss of potential rewards for users who stake for periods just under two weeks, which may lead to dissatisfaction among users and impact the overall fairness and attractiveness of the staking mechanism.
Please paste this test at the bottom in StakingTest.t.sol
and run: forge test --mt test_claimingAfter13daysBurns6daysOfStaking -vvvvv
manual review
Update last claim time by adding 1 week for each week staked
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.