The EggstravaganzaNFT contract uses the unsafe _mint instead of _safeMint when creating new eggs. If a contract without any function execution capabilities (like a basic storage contract) plays the game and finds an egg, the NFT will be permanently locked in that contract with no possibility of recovery.
When a player finds an egg in searchForEgg, the minting process uses the unsafe _mint:
A basic contract without any function execution capabilities can play the game.
If such a contract finds an egg, the NFT will be minted to its address
and without any functions to execute transfers or make external calls, the NFT will be permanently locked,
there would be no way to recover it.
MEDIUM severity because it can result in permanent and irreversible loss of NFTs, but only for a specific group of users.
Manual code review
Replace _mint with _safeMint in the mintEgg function. This change ensures that only contracts that explicitly support NFTs (by implementing onERC721Received) can receive them.
Protocol doesn't check if recipient contracts can handle 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.