The contract uses the _mint() function in multiple locations to mint NFTs. However, this can result in NFTs being sent to addresses that do not support ERC721 tokens, causing them to become irretrievable. To prevent this, _safeMint() should be used instead to ensure that the recipient address can safely receive the NFT.
The contract uses the _mint() function in the following locations to mint NFTs:
The use of _mint() directly sends the NFT to the specified address without verifying whether the recipient can receive ERC721 tokens. If the recipient is a contract that does not implement the IERC721Receiver interface, the NFT will be locked in that contract and become irretrievable. This could lead to significant asset loss for users.
Using _safeMint() instead ensures that the recipient address is either an externally owned account (EOA) or a contract that properly implements the ERC721 receiver interface, preventing this kind of issue.
Permanent Loss of NFTs: If an NFT is minted to a contract that does not support ERC721 tokens, it could be permanently lost or locked, with no way to retrieve it.
User Frustration and Financial Loss: Users may lose access to valuable NFTs due to improper handling of the minting process.
Potential Exploitation: An attacker could deliberately target contracts that cannot handle ERC721 tokens to cause NFT losses.
Manual Code Review and Foundry
Use _safeMint() Instead of _mint(): Replace all instances of _mint() with _safeMint() to ensure that the recipient is capable of receiving ERC721 tokens.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.