The ThePredicter::makePrediction
allows player to make predictions. But it also allows strangers to make predictions without paying the entrance fee because the functions is missing a check if the player is approved.
The following test demonstrates that anyone can make predictions without registering first.
The test should revert because the player is not approved but it doesn't.
Add the following test to the ThePredicter.test.sol
file:
The prize fund that can be won consists of the collected entrance fees. When not-approved users make predictions they get a chance of winning the price fund without paying the entrance fee. If too many players abuse this vulnerability, the prize fund
will be very small.
Manual review and unit testing.
Before making a prediction add a check whether the player is approved.
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.