Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Incorrect calculation of the threshold time in the `ThePredicter::makePrediction` and `ScoreBoard::setPrediction` allows predictions to be made at disputed intervals, breaking the principle of the protocol.

**Description** The timelimit set to allow a certain prediction is incorrect.
**Proof of Concept**
**RecommendedMitigation** Use this calculation instead :
```diff
- if (block.timestamp > START_TIME + matchNumber * 68400 - 68400) {
+ if (block.timestamp > START_TIME - 3600 + (matchNumber+1) * 86400 - 86400) {
revert ThePredicter__PredictionsAreClosed();
}
```
Updates

Lead Judging Commences

NightHawK Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Match timestamps are incorrect

In both contracts there is a similar error in the computation of the timestamps of the matches.

Support

FAQs

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