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

enterRaffle unable to know when vote duration has been reached so people will still be able to enter even past the deadline if winner hasn’t been selected yet

Summary

The enterRaffle function shouldn't allow anyone to enter the raffle after the vote duration has been reached. Otherwise if selectWinner hasn't been called yet people will still be able to enter the current raffle regardless.

Vulnerability Details

enterRaffle doesn't take into account when vote duration has been reached.

Impact

enterRaffle will allow people to enter raffle that is running even when the vote has ended.

Tools Used

Manual Review

Recommendations

function enterRaffle(address[] memory newPlayers) public payable {
+ require(block.timestamp < raffleStartTime + raffleDuration, "PuppyRaffle: Raffle is over");
// rest of the code
}
Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: User experience and design improvement

Support

FAQs

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

Give us feedback!