MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Risk of Mismanaging the Contest Closure

Summary

The closePot function can be called prematurely, causing unnecessary reverts.

Vulnerability Details

Although the contract checks if 90 days have passed before closing the contest, this check is only done inside the function. A premature call would still consume gas, even if it fails.

Impact

Repeated attempts to close the contest before 90 days will fail and waste gas for the user.

Tools Used

Manual review

Recommendations

Include a more explicit check at the beginning of the function to prevent early execution.

require(block.timestamp >= i_deployedAt + 90 days, "Contest is still open for claims");
Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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