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

Missing checks for address(0) when assigning values to address state variables resulting in a lost of fund

Summary

The createEstateNFT function does not check for address(0) when assigning values to the assetToPay state variable, which can lead to loss of funds or unintended behavior.

Vulnerability Details

In the createEstateNFT function, _asset is assigned to assetToPay without verifying whether _asset is a valid address. If _asset is set to address(0), the contract might incorrectly store an invalid payment asset, leading to failed transactions or loss of assets when beneficiaries attempt to pay for the estate NFT.

Impact

The payments related to the NFT may fail or be sent to an unintended destination, leading to loss of funds.

Tools Used

Aderyn

Recommendations

Add a validation check to ensure _asset is a valid address before assigning it to assetToPay :

require(_asset != address(0), "Invalid asset address");
Updates

Lead Judging Commences

0xtimefliez Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!