The EggVault::withdrawEgg
calls the ERC721::transferFrom
function, not ERC721::safeTransferFrom
. This does not check whether the to
address is capable of receiving the NFT, in this case msg.sender
, which may lead to loss of the NFT.
The following function uses transferFrom
, which does not check whether the target is able to receive the NFT:
Whereas, the safeTransferFrom
, as described in EIP-721:
When transfer is complete, this function checks if
_to
is a smart contract (code size > 0). If so, it callsonERC721Received
on_to
and throws if the return value is not >bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))
This could lead to the permanent loss of the NFT if the transfer is unsuccessful.
Manual review.
Replace the use of transferFrom
with safeTransferFrom
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.