In the claimReward()
function of the FjordStaking
contract, a conditional check designed to prevent users from claiming rewards prematurely is structured in a way that renders part of the condition redundant.
If the condition claimReceipts[msg.sender].requestEpoch > 0
is true, the second condition claimReceipts[msg.sender].requestEpoch >= currentEpoch - 1
will always be true, making the second part of the condition redundant:
While this redundancy does not directly introduce a vulnerability, it complicates the code's readability and could mislead developers maintaining the contract.
vscode
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.