DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

safeMint should be used in place of mint.

Summary

This report highlights the critical security implications of using the standard mint function in Solidity contracts for token creation. By contrast, it emphasizes the enhanced security and error handling provided by the safeMint function. The report focuses on the prevention of token loss due to minting to the zero address and the secure transfer of NFTs to contracts equipped to handle them.

Vulnerability Details

The primary vulnerability addressed is the accidental minting of tokens to the zero address. This occurs when the mint function lacks sufficient checks to validate the recipient address. As a result, tokens become irretrievable, leading to significant financial loss.

Additionally, the report identifies the risk of transferring NFTs to contracts that are not designed to handle ERC721 tokens. This can result in the loss of NFTs if the recipient contract does not implement the onERC721Received function correctly.

Impact

Tokens minted to the zero address are permanently lost, resulting in substantial financial damage for token holders and project owners.

Tools Used

Recommendations

To mitigate the risks associated with token creation, it is strongly recommended to adopt the safeMint function in Solidity contracts

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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