Description:
In Staking::claimRewards()
the staking rewards is calculated as uint256 amountToClaim = userStakes[msg.sender] * timeInWeeksSinceLastClaim
,stakers can call Staking::deposit
to increase their userStakes
just before claiming rewards
Proof of Concept:
Tools Used:
Manual Review
Recommendation:
Staking::claimRewards
should be called on deposit and lastClaim
should be reset
Note this approach prevents stakers from increasing their stake below 1 week intervals because Staking::claimRewards
will revert and it should be the desired approach
High severity, this allows users to claim additional rewards without committing to intended weekly staking period via multi-deposit/deposit right before claiming rewards.
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.