The time calculations in ThePredicter.sol::makePrediction
and ScoreBoard.sol::setPrediction
for making a prediction are incorrect. As per the documentation, matches occur each day at 20:00:00 UTC, and predictions can be placed until 19:00:00 UTC of that day.
The start time for to protocol is 1723752000
or Thu Aug 15 2024 20:00:00 GMT+0000
Below is the calculations used to see if a prediction can be placed
If it is
matchNumber
1, then this would be the equation:START_TIME + matchNumber * 68400 - 68400
1723752000 + (1 * 68400) - 68400 =
1723752000
This is correct for the first match. However, the true "first" match should be match 0, otherwise the protocol will only have 8 matches.
This is the equation if
matchNumber
is zero1723752000 + (0 * 68400) - 68400 =
1723683600
orThursday, August 15, 2024 1:00:00 AM
This is an incorrect time because predictions should be able to be placed until 19:00:00 UTC
This is the equation if
matchNumber
is two1723752000 + (2 * 68400) - 68400 =
1723810400
orFriday, August 16, 2024 12:13:20 PM
Again this is an incorrect time.
68400 is equal to 19 hours, this is why these time calculations are incorrect, it is allowing predictions for each match in increments of 19 hours after the start time.
This test fails showing that you cannot make a bet at 18:59:59 UTC August 17, 2024 6:59:59 PM
before the second match (matchNumber
is two).
--Foundry
It is recommended to change the time calculations to ensure that predictions can be placed up to 19:00:00 UTC of the day of the match.
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.