Description:
Incorrect calculation of time in the time condition of setPrediction
prevents players from calling ThePredicter::makePrediction
for the first round, because it calculates a time that's before the ScoreBoard::START_TIME
.
Impact:
Players won't be able to make predictions for the first round, which makes them lose a point in the game.
Proof of Concept:
Import the following test to ThePredicter.test.sol
:
Recommended Mitigation:
Make the following changes to ScoreBoard::setPrediction
, to be compliant with this phrase of the documentation:
"Every day from 20:00:00 UTC one match is played. Until 19:00:00 UTC on the day of the match, predictions can be made by any approved Player. Players pay prediction fee when making their first prediction for each match."
That's why we're multiplying matchNumber by 86400 (24 hours) and then adding 82800 (23 hours) to the result:
In both contracts there is a similar error in the computation of the timestamps of the matches.
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.