After a player makes a prediction for a match and pays the corresponding fee, they can update any paid prediction they made by calling ScoreBoard.setPrediction without paying an extra fee. However, the lack of input validation allows anyone to call ScoreBoard.setPrediction and update an existing player's prediction.
According to the docs: "setPrediction ... can be called again by the Players to alter their predictions ...". However, anyone can call ScoreBoard.setPrediction and change the prediction made by an existing player. If this function is not called by ThePredicter.makePrediction but directly by another user, there is no check to validate that the msg.sender matches the player whose prediction is updated.
This issue breaks a critical functionality of the game, preventing players from winning rewards even if they make the correct prediction.
Add the following function to the unit-test ThePredicter.test.sol
Manual code review.
Check the msg.sender when calling ScoreBoard.setPrediction
setPrediction has no access control and allows manipulation to Players' predictions.
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.