In the completeClaimRequest
and claimReward
functions, the userData[msg.sender].lastClaimedEpoch
is not updated, which can lead to inconsistencies in tracking user claim history. This oversight affects the correct recording of the user's last claimed epoch, potentially disrupting reward calculations and claim validations.
In the completeClaimRequest
and claimReward
functions, the userData lastClaimedEpoch
is not updated, leading to incomplete and potentially incorrect tracking of user claims. For completeClaimRequest
, while the function successfully transfers the reward to the user and deletes the claim receipt, it fails to update the lastClaimedEpoch
to the current epoch. Similarly, in the claimReward
function, which handles both early and standard claims, the lastClaimedEpoch
is not updated even though rewards are adjusted. This oversight can result in discrepancies between the actual claim dates and the recorded epoch, disrupting reward calculations and the validation of subsequent claims. Properly updating lastClaimedEpoch
is crucial for accurate tracking of claims and ensuring that reward calculations align with the user's claim history.
The primary impact of not updating userData' lastClaimedEpoch
is:
Inaccurate Claim Tracking: Users may experience inconsistencies in their claim history, which can affect future claims and rewards calculations.
Potential Reward Calculation Issues: The system may incorrectly handle or validate future claims based on outdated or inaccurate epoch information.
Manual Code Review
Ensure that userData[msg.sender].lastClaimedEpoch
is updated to the current epoch in both completeClaimRequest
and claimReward
functions whenever rewards are successfully claimed.
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.