There are certain smart contracts that do not support ERC721, using transferFrom() , mint() may result in the NFT being sent to such contracts. As per the documentation of EIP-721:
On the cairo side, the bridge uses unsafe method : transfer_from and _mint for ERC721 tokens during the withdrawal process, which could lead to permanent loss if the recipient doesn't support ERC721 tokens.
In the withdraw_auto_from_l1 function of the bridge contract in cairo, the following code is used to transfer NFTs:
This uses the standard transfer_from method instead of the safer safe_transfer_from method recommended when dealing with ERC721 tokens.
If the recipient (to address) is a contract that doesn't implement the ERC721Receiver interface, the NFT could be permanently lost.
Manual review
Implement and use a safe_transfer_from method for ERC721 transfers.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.