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

withdrawFees function can be called by anyone

Summary

withdrawFees function should be called by owner and not by anyone , this may cause problems

Vulnerability Details

function withdrawFees() external {
//@audit If this got force sent ether, than you can never withdraw, balance will be != than totalFees
require(address(this).balance == uint256(totalFees), "PuppyRaffle: There are currently players active!");
uint256 feesToWithdraw = totalFees;
totalFees = 0;
(bool success,) = feeAddress.call{value: feesToWithdraw}("");
require(success, "PuppyRaffle: Failed to withdraw fees");
}

Impact

Low

Tools Used

Manual review

Recommendations

Implement onlyowner modifier.

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!