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

withdrawFees may never work

Summary

withdrawFees require might never be true

Vulnerability Details

to withdraw fees, the balance of the contract has to be equal to the total fees, otherwise it will revert. this means that the owner can't withdraw fees if there are players in the raffle. why is this the case? when will it ever have 0 players in it? if people can always enter the raffle at any time, it may not be possible to ever withdraw the fees.

Impact

fees might never be able to be withdrawn

Tools Used

VSCode

Recommendations

withdrawFees should be called at the same time the winner is picked, just after the player array is reset,
that is the only time we are guaranteed to have 0 active players

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years 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.

Give us feedback!