Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

Missing Zero Check on raffleDuration

Summary

The raffleDuration parameter acts as a waiting period for the game. However, if the duration is set to zero, the game
could be started at any time without any waiting period, which may not be the intended behavior.

Vulnerability Details

The constructor currently lacks a check to ensure that raffleDuration is set to a value greater than zero, potentially
allowing for the creation of a raffle with no time constraints.

Impact

The absence of a duration check could lead to immediate raffle turnovers, which might disrupt the game's mechanics and
expected user experience. This could also be abused to gain an unfair advantage in the game.

Tools Used

Manual Review

Recommendations

To enforce the intended game mechanics, a non-zero check for raffleDuration should be implemented in the constructor:

require(raffleDuration > 0, "cannot set zero");
raffleDuration = _raffleDuration;
Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Admin Input/call validation

Support

FAQs

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