GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

[M-1] Use of `_mint` Instead of `_safeMint` for NFT Minting, causing loss of funds and NFT for users which cannot receive ERC721's

summary

The protocol mints the NFT's via _mint instead of safeMint function. The _mint function does not check weather or not the recipient can actually receive ERC721 token.

note ERC-721 tokens are minted via the _mint function
rather than the _safeMint function. The _safeMint function includes a necessary safety
check that validates a recipient contract’s ability to receive and handle ERC-721 tokens.
Without this safeguard, tokens can inadvertently be sent to an incompatible contract,
causing them, and any assets they hold, to become irretrievable.

impact

Using _mint instead of _safeMint could impact the user's experience, if users mistakenly use an incompatible contract, then they will not have access to the NFT, leading to user dissatisfaction, or users with a limited knowledge about nft's might event think this project is a scam.

tools used

manual review

Recommendations

Use _safeMint Instead of _mint:

- _mint(msg.sender, tokenCounter);
+ _safeMint(msg.sender,tokenCounter);
Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

jumpupjoran Submitter
7 months ago
n0kto Lead Judge
7 months ago
n0kto Lead Judge 7 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.