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

The players with 1 prediction will be ineligible to withdraw rewards

Summary

Method isEligibleForReward() check if the player is eligible for rewards. But it checks playersPredictions[player].predictionsCount > 1. So players with 1 prediction will be ineligible for rewards even though they should be.

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

Vulnerability Details

The isEligibleForReward() will return false even if the users gave 1 prediction.

Impact

The players will not get the rewards even if they are eligible for rewards if they only did 1 prediction.

Tools Used

VS Code

Recommendations

The prediction count check should be playersPredictions[player].predictionsCount >= 1;

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.