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

`ScoreBoard::isEligibleForReward` requires more than 1 prediction, but documentation says only 1 required

Summary

The documentation says:

"Players can receive an amount from the prize fund only if their total number of points is a positive number and if they had paid at least one prediction fee."

But ScoreBoard::isEligibleForRewardrequires the user to have more than 1 prediction.

Recommendations

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

Lead Judging Commences

NightHawK Lead Judge about 1 year 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.