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

Out of Gas DoS on `enterRaffle()`

Summary

At a certain threshold no more players will be able to join the raffle.

Vulnerability Details

As the array of active players grows, the nested loop within enterRaffle() will be unable to loop through its duplicate address check and cause a DoS.

Impact

Users will be unable to join the raffle which doubles as a DoS and financial losses to the protocol.

Tools Used

manual review

Recommendations

Replace this nested loop duplicate address check with a mapping mapping(address => bool) activePlayer; where address is the user we are checking and it's true if the user is already active in the raffle false if not.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

denial-of-service-in-enter-raffle

Support

FAQs

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

Give us feedback!