Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

isEligibleForReward_Not_Allign_With_Documentation

Summary

isEligibleForReward() does not align with the documentation which states that, had paid at least one prediction fee., but in the code it checks for at least 2 rediction instead of at least 1 as stated by the documentation.

Vulnerability Details

function isEligibleForReward(address player) public view returns (bool) {
return results[NUM_MATCHES - 1] != Result.Pending &&
playersPredictions[player].predictionsCount > 1;
}

Incorrect Eligibility Check: The function checks if predictionsCount is greater than 1 instead of at least 1.

Impact

Incorrect Eligibility: Players who made only one prediction and paid the fee are incorrectly deemed ineligible for rewards.

Tools Used

Recommendations

Mitigation is to check at least one : playersPredictions[player].predictionsCount > 0;

Updates

Lead Judging Commences

NightHawK Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

The eligibility criteria is wrong

Players with only one prediction cannot withdraw.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.