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

DoS Due to Reliance on `address(this).balance` For Accounting

Summary

Require statement in withdrawFees() will lead to a DoS vulnerability.

Vulnerability Details

Any malicious user can DoS this call by sending 1 wei to this contract since the require statement relies on a strict equality between address(this).balance and totalFees.

Impact

The fee collector will be unable to collect its owed fees and leads to a financial loss for the project.

Tools Used

Manual review

Recommendations

Do not rely on address(this).balance being exactly the same as the accounted for fees. Better to use address(this).balance >= totalFees.

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.