The withdrawEgg
function in the EggVault
contract uses transferFrom
to transfer NFTs, which does not verify if the recipient can safely receive ERC721 tokens. This could result in NFTs being irreversibly locked in contracts that do not support ERC721, leading to asset loss.
This function blindly transfers the NFT to msg.sender
without checking if it’s a contract capable of receiving ERC721 tokens. If the recipient is a contract that does not implement onERC721Received
, the NFT will be permanently stuck.
Using safeTransferFrom
instead adds a safety mechanism: it checks if the recipient (if a contract) correctly implements the ERC721 receiver interface. If not, the transaction reverts, preventing the transfer and loss of the NFT.
NFTs may be sent to contracts that do not handle ERC721 tokens, resulting in permanent loss of ownership.
Manual code review
Replace the current transfer call with:
NFTs are transferred to contracts without onERC721Received implementation.
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.