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

Organizer set results should add validaiton

Summary

**As the doc shows as below, but Organizer can set the result in anytime. **

After the end of each match the Organizer will enter the match result.

Vulnerability Details

No time check, no input params check.

If Organizer random set the result in the 9th match, such as before the required time. The attacker will notice this info, if there are potential profit, he will set the results as this result to get max profit.

function setResult(uint256 matchNumber, Result result) public onlyOwner {
results[matchNumber] = result;
}

Impact

The wrong input leads to ununcessary trouble

Tools Used

Recommendations

error ThisMatchedNotEnd();
function setResult(uint256 matchNumber, Result result) public onlyOwner {
if (
block.timestamp <=
START_TIME + matchNumber * MATCH_DURATION
) {
revert ThisMatchedNotEnd();
}
results[matchNumber] = result;
}
Updates

Lead Judging Commences

NightHawK Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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