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

Incorrect Eligibility Check Excludes Valid Players from Rewards

Summary

The ScoreBoard::isEligibleForReward function incorrectly checks for player eligibility, excluding players who have made only one prediction.

Vulnerability Details

The isEligibleForReward function uses the condition:

playersPredictions[player].predictionsCount > 1

This check requires players to have made more than one prediction to be eligible for a reward. However, according to the README:

"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."

This discrepancy means players who have made only one prediction are incorrectly excluded from reward eligibility.

Impact

Players who have made a single prediction and paid the corresponding fee are unfairly denied their chance to receive rewards, even if they meet all other criteria (positive point total, etc.).

Tools Used

Manual review

Recommendations

Modify the condition in the isEligibleForReward function to:

- playersPredictions[player].predictionsCount > 1
+ playersPredictions[player].predictionsCount > 0

This change will correctly include all players who have made at least one prediction, aligning the code with the stated rules in the README.

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.