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

While the raffle is ongoing/continuous, the `withdrawFees()` function will be DoS'ed.

Summary

While the raffle is ongoing/continuous, the withdrawFees() function will be DoS'ed.

Vulnerability Details

The raffle will need to be paused to call this function successfully, due to the following line, which effectively makes it impossible to call because address(this).balance == uint256(totalFees) can only ever be true between the end of current raffle, i.e. at end of winner selection function, and before the start of the next raffle, but the next raffle starts as soon as the winner selection function ends. So it effectively DoS the withdrawFees() function.

require(address(this).balance == uint256(totalFees), "PuppyRaffle: There are currently players active!");

Impact

Cant withdraw fees while raffles are ongoing.

Tools Used

VSC.

Recommendations

Add a function(s) to pause/unpause the raffle train...

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

greifers-send-money-to-contract-to-block-withdrawfees

Support

FAQs

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