A Player can call ScoreBoard.setPrediction()
to set the prediction of another Player.
This denies other Players from making valid predictions and receiving their prize while they still pay their prediction fee.
Add the following getter at the end of ScoreBoard.sol
:
Add the following function at the end of the test file and run it :
forge test --mt test_playerCanChangeOtherPlayerPrediction
Add the following require
(or equivalent revert) at the beginning of the setPrediction
function of the ScoreBoard.sol
file :
require(msg.sender == thePredicter || msg.sender == player);
This forces the caller of this function to be either ThePredicter
(trusted) or the same person changing the prediction, preventing the caller from changing another Player prediction.
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.