START_TIME + matchNumber * 68400 - 68400
is used to set prediction deadline in the setPrediction
and makePrediction
functions. This actually sets prediction deadline to a PREMATURE time for all matches except the 1st match. the 1st match deadline is set forward to the START_TIME
. This prevents players
from placing their bets even when it's not 19:00UTC
(which is the deadline) on the matchDay
Based on the formular START_TIME + matchNumber * 68400 - 68400
, below is the deadline of the first 4 matches, which are all wrong deadlines;
proposed dealine is the Protocol corect time
Dapp deadline is the wrong deadline calculated by the contract
NB: we assume matchNumber ranges from 1-9
Proposed deadline | Dapp deadline | |
---|---|---|
match-1 | 15-08-2024 19:00:00 UTC (1723748400) | 15-08-2024 20:00:00 UTC (1723957200) |
match-2 | 16-08-2024 19:00:00 UTC (1723834800) | 16-08-2024 15:00:00 UTC (1723820400) |
match-3 | 17-08-2024 19:00:00 UTC (1723921200) | 17-08-2024 10:00:00 UTC (1723888800) |
match-4 | 18-08-2024 19:00:00 UTC (1723921200) | 18-08-2024 05:00:00 UTC (1723888800) |
low predictionFee
generated for the protocol
poor user experience leading to low predictions
Foundry chisel
A more viable formular to use in the makePrediction
and setPrediction
is START_TIME + numOfdays days - 3600
where numOfdays = matchNumber - 1
. below is the implementation in makePrediction
function . the same changes should be made in setPrediction
;
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.