NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Inconsistent Handling of URI Storage for ERC721 Tokens

Description:

The Bridge.sol::withdrawTokens function currently lacks a mechanism to manage the URI (Uniform Resource Identifier) for ERC721 tokens during the minting process. If the ERC721 implementation on Layer 1 (L1) supports URI storage, the URI should be set appropriately when the token is minted after being bridged from Layer 2 (L2). Without handling URIs, the newly minted tokens on L1 might miss critical metadata that is essential for their representation and usability.

Impact:

  • Missing or Incorrect Metadata: Users may encounter issues with missing or incorrect token metadata, which can reduce the utility and perceived value of the bridged ERC721 tokens.

  • Inconsistency Between Layers: The discrepancy in token metadata between L2 and L1 could lead to a lack of synchronization and trust in the bridging process, potentially affecting user confidence.

  • User Experience: A lack of proper metadata handling could result in a suboptimal user experience, particularly if the URI contains important information that users rely on to understand or trade the tokens.

Recommended Mitigation:

To address the inconsistency in URI handling, consider implementing the following mitigations:

  • Fetch the URI from L2: During the withdrawTokens process, implement a mechanism to fetch the token's URI from L2. This ensures that the metadata is preserved and correctly applied when the token is minted on L1.

  • Modify the Minting Process: Update the minting process on L1 to include the URI for ERC721 tokens. This will maintain metadata consistency across both layers.

  • Support for URI Setting: Ensure that the ERC721 contract on L1 has a method for setting the URI. If such a method is not already supported, consider adding one to allow URIs to be assigned during the minting process.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

invalid-NFT-minted-without-baseURI-URIs-or-bridge-with-no-metadata

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.