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

Lack of Address Zero Check in `changeFeeAddress` Function

Vulnerability Details

changeFeeAddress function does not validate the new fee address before updating it. This lack of validation allows the owner to inadvertently or maliciously set the fee address to the zero address (0x0), which could lead to loss of funds or disruption of the contract's fee distribution mechanism.

Relevant code snippet:

function changeFeeAddress(address newFeeAddress) external onlyOwner {
feeAddress = newFeeAddress;
emit FeeAddressChanged(newFeeAddress);
}

Impact

  • Loss of Funds: Any Ether sent to the zero address is irretrievably lost. If the fee address is set to 0x0, fees collected by the contract would be sent to an unrecoverable address.

  • Reduced Contract Credibility: Such a simple oversight might raise concerns about the overall security and reliability of the contract.

Recommendations

  • Implement Address Checks: Add a requirement in the changeFeeAddress function to ensure that the new fee address is not the zero address.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 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.

Give us feedback!