The documentation says:
"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."
However, the ThePredicter::makePrediction
function checks the prediction time window like this:
if (block.timestamp > START_TIME + matchNumber * 68400 - 68400) {
revert ThePredicter__PredictionsAreClosed();
}
I guess the intention here is to make it 1 hour before the match start time. In that case there are multiple flaws here:
68400 that matchNumber is multiplied with is 19 hours and not 24 hours
The 68400 that it subtracts with, should be 1 hour
Happens often, but low impact
Code inspection
Change the code that checks the date to:
This way, if it is for example the 2nd match, which would be matchNumber=1... It would lead to 23 hours after Thu Aug 15 2024 20:00:00, which is Thu Aug 16 2024 19:00:00.
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.