Starknet bridge contract does not check if the collection supports IERC721Metadata interface, so the ones that do not implement it will not be able to bridge NFTs
In the Ethereum bridge, when a user deposits an NFT it is needed to get the name, symbol, baseURI and tokenURIs from the specific collection. To do that, it first checks if the contract collection supports this interface.
As we can see, if the collection does not support this interface it is returned all fields empty. Otherwise, the functions to retrieve all the informations are called.
However, in the Starknet bridge, no interface is checked and the functions to retrieve all these informations are called directly.
This missing check for the interface will make NFT collections that do not implement the IERC721Metadata interface unable to be bridged because these functions will not exist and the transaction will revert.
Note that the IERC721Metadata is an OPTIONAL interface as stated in the EIP:
The metadata extension is OPTIONAL for ERC-721 smart contracts (see “caveats”, below). This allows your smart contract to be interrogated for its name and for details about the assets which your NFTs represent.
That means that a collection will be ERC721 compliant even though it does not implement the IERC721Metadata interface. But will be unable to work with the Starknet bridge.
Medium, collections that do not implement this interface will be unable to be bridge from Starknet to Ethereum
Manual review
Check if the collection supports the interface before calling these methods just as the Ethereum bridge does
URI is not lost on the origin chain and it can be modified with `ERC721UriImpl`. As explained in the TODO below, that’s a design choice and it will be implemented as a future feature. https://github.com/Cyfrin/2024-07-ark-project/blob/main/apps/blockchain/ethereum/src/Bridge.sol#L206 `ERC721Bridgable` is out of scope.
Impact: Medium/High, ERC721 tokens won’t work without the metadata extension (name + symbol), but no tokens are loss. Likelyhood: Low, All tokens not implementing name and symbol will be impacted. This should be pretty rare because the two main "libraries" to create an ERC721, have those function in their main contract and not in the metadata extension. OZ since the version 3.0.0 and Solmate since their first production release. But as anyone can also implement their own ERC721 following the EIP, it deserves a medium.
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.