ThePredicter::makePrediction
function or its subsequent external calls have no implemented checks for msg.sender
to be an approved user to make a prediction as the protocol intended. Additionally, due to the function's public
visibility, it could be called externally by anyone making them eligible for reward, even without paying entranceFee
, which forms the prize pool - a core functionallity of the protocol.
Due to the lack of check for player
(i.e. approved user), anyone can make predictions calling ThePredicter::makePrediction
without paying entrance fee.
Paste the following code in the test suite:
... and the following getter function in ScoreBoard.sol
Making predictions without paying entranceFee
by malicious users enables them to participate in the reward distribution and could lead to collecting a part or the whole prize pool without actually participating in the forming of the prize pool, breaking the core logic of the betting protocol.
Foundry, Manual review
Add a check to the ThePredicter::makePrediction
function for approved status of the msg.sender
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.