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

feeAddress can be set to address(0)

Summary

The lack of address(0) validation can lead to loss of fees.

Vulnerability Details

Since there is no validation for address(0) in the constructor and in the changeFeeAddress, the feeAddress can be set to address(0) by mistake.

Impact

In withdrawFees we use the feeAddress to send all the fee collected by the smart contract. If it is set to address(0) all these fees will be lost.

Tools Used

Manual Review

Recommendations

Add address(0) checks in the places where we set the feeAddress.

@audit add this in the constructor
require(_feeAddress != address(0), Address 0);
@audit add this in the changeFeeAddress
require(newFeeAddress != address(0), Address 0);
Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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