The makePrediction function in the ThePredicter contract lacks proper access control, allowing unauthorized users to make predictions without having gone through the necessary registration and approval process. This vulnerability can be exploited by anyone who knows the prediction fee, allowing them to make predictions and potentially win part of the tournament pot without paying the entry fee.
Wrong/Missing Access Controls
1) Unapproved Registrations:
• Anyone can call the makePrediction function as long as they pay the correct prediction fee.
• There is no check to ensure that the caller has been approved by the organizer (Ivan), allowing unauthorized users to bypass the entry fee.
2)Registration Bypass:
• Users can register and cancel before approval, which changes their status to Canceled.
• This allows them to evade the entry fee and still make predictions.
The vulnerability has a high likelihood of exploitation. An attacker could:
• Make predictions without paying the entry fee.
• Potentially win part or all of the tournament pot without having followed the required entry process.
• This constitutes theft of user funds, as unauthorized users can access benefits without proper authorization.
Foundry, Manual review
Add a check at the beginning of the makePrediction function to ensure the caller’s status is Approved before allowing them to make predictions.
makePrediction has no access controls and any unapproved user can make predictions causing an incorrect calculation and distribution of rewards.
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.