Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Incorrectly defined tournament start time `START_TIME` in both smart contracts (`ScoreBoard.sol` and `ThePredicter.sol`).

Summary

In Solidity, time is usually represented as seconds since the Unix epoch (January 1, 1970, 00:00:00 UTC). The start of the tournament is fixed and defined in the variable START_TIME. Namely, the value to which this variable is initialized is:

uint256 private constant START_TIME = 1723752000; // Thu Aug 15 2024 20:00:00 GMT+0000

The time defined in this way does not represent the desired date -> Thu Aug 15 2024 20:00:00 GMT+0000, but rather Thu Aug 15 2024 00:00:00 GMT+0000, which is a full 20 hours earlier.

Impact

Since many conditions related to the timing of certain actions, such as registration or prediction, are defined based on this variable, we will have a discrepancy of a full 20 hours, which will cause improper functioning of the given protocol.

Recommendations

Change the value of the variable START_TIME to:

uint256 private constant START_TIME = 1723831200;
Updates

Lead Judging Commences

NightHawK Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Appeal created

elprofesor Submitter
about 1 year ago
NightHawK Lead Judge
about 1 year ago
NightHawK Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.