The condition check within the ThePredicter::makePrediction
method is implemented incorrectly, causing predictions to close at a different time than specified in the contract's README.
The README specifies the Predictions closing time as 19:00:00 UTC on the day of the match.
The if
condition within ThePredicter::makePrediction
is incorrect, resulting in an incorrect prediction closing time.
For the first match, the expected closing time is August 15, 2024, 19:00:00 UTC (Unix timestamp: 1723748400). Therefore, the if
condition START_TIME + matchNumber * 68400 - 68400
should evaluate to 1723748400.
the calculations are given below for first match:
Clearly ((1723748400) != (1723752000))
Lets take an example of closing time for 2nd match,
For the second match, the closing time for predictions should indeed be August 16, 2024, 19:00:00 UTC (Unix timestamp: 1723834800).
Now, lets calculate the value given in if
condition within ThePredicter::makePrediction
. i.e START_TIME + matchNumber * 68400 - 68400
.
Expected value : 1723834800 (August 16, 2024, 19:00:00)
calculation value : 1723820400 (August 16, 2024 15:00:00)
The provided examples demonstrate that the if
condition START_TIME + matchNumber * 68400 - 68400
does not accurately calculate the correct closing time for predictions.
Incorrect prediction closing times prevent players from making predictions as intended, compromising fair play and resulting in the loss of prediction fees.
Manual Review
Replace the original condition with the following to correctly determine the prediction closing time:
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.