When a user claims rewards for the first time, Staking::claimRewards
uses the idToCreationTimestamp
value from the Soulmate
contract, the staking period is then ignored, allowing the user to stake and claim rewards the same day.
Copy the function to the StakingTest.t.sol
file, then run forge test --mt test_StakeAndClaimFirstRewardsTheSameDay -vv
in the terminal
POC
Users claiming rewards for the first time will receive rewards without needing to stake during the minimum staking period.
Manual review
Consider tracking user deposit timestamps instead of idToCreationTimestamp
timestamps for first-time rewards
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.