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

Dangerous strict equality

Summary

The withdrawFees function in the PuppyRaffle contract contains a strict equality check in a require statement, which may lead to potential issues due to the exactness of the check.

Vulnerability Details

In the withdrawFees function, a strict equality check is used to verify if the balance of the contract (address(this).balance) is equal to the value of totalFees.

Impact

The use of strict equality in the require statement may have the following consequence:

-This strict equality check may not account for minor fluctuations in the balance due to gas fees and other factors.

Tools Used

Slither

Recommendations

Replace the strict equality check with a more permissive comparison. Consider using >= or <= instead of == for such variables depending on the contract logic.

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.