The makePrediction
and setPrediction
functions in the ThePredicter
and ScoreBoard
contracts have identified issues related to incorrect time intervals. These vulnerabilities can disrupt the intended functionality, leading to incorrect timing for predictions.
uint256 private constant START_TIME = 1723752000; // Thu Aug 15 2024 20:00:00 GMT+0000
makePrediction
setPrediction
The incorrect 19-hour interval disrupts the intended schedule, making it difficult for players to submit their predictions within the allowed timeframe. This can lead to missed predictions, resulting in player frustration and reduced engagement. Incorrect start time**, t**he start time is set incorrectly. It should be Thu Aug 15 2024 19:00:00 UTC
.
Manual review
To mitigate the vulnerabilities and ensure the functions correctly enforce the rules, the following changes are recommended:
Correct Time Interval:
Use a 24-hour interval (86400
seconds) for the match timings.
Correct Start time:
Update the start time to Thu Aug 15 2024 19:00:00 UTC
.
uint256 private constant START_TIME = 1723748400; // Thu Aug 15 2024 19:00:00 UTC
if (block.timestamp > START_TIME + matchNumber * 86400 - 86400)
if (block.timestamp <= START_TIME + matchNumber * 86400 - 86400)
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.