This function fails to store the staking amount along with its timestamp, conducting all calculations based on the previous call of claimRewards rather than considering the timestamp associated with the staking amount.
This function fails to store the staking amount along with its timestamp, conducting all calculations based on the previous call of claimRewards rather than considering the timestamp associated with the staking amount.
On testing the Staking::claimRewards function, which is designed to manage the claiming of staking rewards. The PoC reveals an issue with the tracking of staking amounts and their associated timestamps within the current implementation. Specifically, the function fails to correctly handle scenarios where the staking amount timestamp is nearing one week and additional staking occurs before this threshold. As a result, the calculation includes all previously staked amounts along with the recent stake amount, which introduces an unfairness in the staking process.
keeping no track of the timestamp for all stanking amount
which cause the over rewarding to the user.
Manual Review
we can introduce mapping which keep track of the amount deposit with the block.timestamp.
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.