Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Use of _mint instead of _safeMint

[M-3] Use of _mint instead of _safeMint

Description: The EggstravaganzaNFT contract uses the _mint function to create new ERC721 tokens, which does not check if the recipient is capable of receiving ERC721 tokens.

Impact:

  • If tokens are minted to a contract that does not implement the onERC721Received function, they could become permanently locked, leading to loss of tokens.

  • The ERC721 standard recommends using _safeMint to ensure safe transfers to contracts.

Recommended Mitigation: Replace _mint with _safeMint to include safety checks.

Updates

Lead Judging Commences

m3dython Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Unsafe ERC721 Minting

Protocol doesn't check if recipient contracts can handle ERC721 tokens

Support

FAQs

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