Eggstravaganza

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

Use safeMint instead of mint for ERC721

Summary:

Use safeMint instead of mint for ERC721

Vulnerability Details:

A player will be minted a NFT when gameContract calls the function `mintEgg`.

However you are using _mint(); instead of mint, so you don't check whether you are minting NFT to an address that supports ERC721 or not.

This means if `address to` is an address that does not support ERC721, the NFT will be stuck in the contract.

Impact:

Users possibly lose their NFTs

Tools Used:

Manual review

Recommendations:

Use safeMint instead of mint

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.