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

Missing Zero Address Check on feeAddress

Summary

The feeAddress is a crucial parameter for withdrawing fees from the contract. If this address is set to the zero
address, it could result in fees being irretrievably locked within the contract.

Vulnerability Details

The constructor does not currently perform a check to ensure that the feeAddress is not set to the zero address during
initial setup.

Impact

Without a zero address check, there's a risk that the fee collection feature will be rendered non-functional,
potentially leading to lost revenue and a lack of incentive for contract maintainers.

Tools Used

manual review

Recommendations

To mitigate this risk, insert a requirement in the constructor that the feeAddress must not be the zero address:

// add this
require(_feeAddress != address(0), "cannot set zero address");
feeAddress = _feeAddress;
Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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