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

withdrawFees function potential exploitation

Summary

withdrawFee function line 156 in puppyRaffle.sol

Vulnerability Details

WithdrawFees function checks that the balance == totalFees before proceeding, if the balance is somehow manipulated (e.g someone manages to send excess ether into the contract) the withdrawFee function will stop working.

Impact

This would effectively leave all fees locked in the contract forever with no way of claiming them.

Tools Used

Manual inspection

Recommendations

Check that the balance is enough to cover paying the totalFees without using ==, as this checks for strict equality.

Updates

Lead Judging Commences

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

weak-randomness

Root cause: bad RNG Impact: manipulate winner

Support

FAQs

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