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

Bridge is not in compliance with ERC721 standard

Github
https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/starknet/src/token/erc721_bridgeable.cairo#L29

Summary

The erc721_bridgeable contract is not in compliance with the ERC-721 standard due to missing implementation of the ERC-165 interface, which is a critical requirement for ERC-721 compliance.

Vulnerability Details

According to the ERC-721 specification, every ERC-721 compliant contract must implement both the ERC-721 and ERC-165 interfaces. ERC-165 is used to determine which interfaces a contract supports.

In the erc721_bridgeable contract, although the SRC5 component is declared and included, it is not utilized to register or verify the contract's support for specific interfaces. The contract's implementation omits the necessary steps to declare its compliance with ERC-165, which means it does not meet the ERC-721 standard requirements.

Impact

The lack of ERC-165 compliance in the erc721_bridgeable contract could result in:

  • Interoperability Issues: Other contracts or tools querying the supported interfaces may fail to recognize the contract as compliant with ERC-721, leading to integration and interaction failures.

  • Standard Compliance: The contract's failure to adhere to ERC-165 undermines its adherence to the ERC-721 standard, which could affect its acceptance in marketplaces and other platforms that enforce standard compliance.

Recommendation

To address this issue and ensure compliance with ERC-721 standards, the following actions are recommended:

  1. Implement ERC-165 Interface: Ensure the erc721_bridgeable contract properly implements the ERC-165 interface. This involves defining the supports_interface method, which should be used to declare support for ERC-721 and other relevant interfaces.

  2. Register Interfaces Using SRC5: According to the OpenZeppelin documentation, use the SRC5 component to register support for the interfaces the contract implements. This should be done in the constructor of the contract to ensure that interface support is declared upon deployment.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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