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

Potential DoS vulnerability in the `PuppyRaffle::enterRaffle` function

Summary

Potential DoS vulnerability in the PuppyRaffle::enterRaffle function

Vulnerability Details

The logic that is inside the enterRaffle() function is checking if a player has already entered the raffle. The problem is that it uses a nested for loop in order to achieve the desired result. Also, the logic that checks if a given player entered the raffle should happen before we add the player to the players array.

Impact

This nested loop can cause a DoS vulnerability. This will happen if a lot of players are passed to the array.

Tools Used

Manual Review

Recommendations

One way to solve this is to create a mapping that keeps track of the players that have entered the raffle.

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year 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.