The comment on line 672 in FjordStaking.sol as well as the diagrams provided by the Fjord team suggest the user should be able to complete their claim request three epochs after the request is created. However, the contract logic currently allows to complete the request only after a minimum of four epochs.
When completing a claim request, the contract checks whether at least four epochs have elapsed since the request was made. The intended behavior, however, is to be able to complete the request after three epochs.
For instance, if a user requests to claim rewards in epoch 3, they should be able to complete the claim in epoch 6 or later. Currently, the staking contract reverts the request completion if the difference between the current epoch and the epoch when the request was made is less than or equal to claimCycle
(3 epochs or 21 days).
This issue also occurs in the following locations:
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordStaking.sol#L673
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordStaking.sol#L465
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordStaking.sol#L514
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordStaking.sol#L583
See the following PoC which demonstrates the above mentioned scenario
Users are required to wait four weeks before they can complete a claim request, instead of the intended three weeks.
Manual Review, Foundry
Check if the difference between epochs is less than lockCycle
/ claimCycle
in all above mentioned instances of this issue.
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.