Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 5.07 KB

VIP-241.md

File metadata and controls

67 lines (45 loc) · 5.07 KB
VIP Title Description Author Discussions Category Status CreatedAt
241
ERC Contract Adoption
This Vechain Improvement Proposal (VIP) advocates for the adoption of Ethereum Request for Comment (ERC) standards, aiming to eliminate duplication and enhance interoperability by aligning Vechain contracts with their Ethereum counterparts.
Darren Kelly, [email protected]
Application
Draft
2024-01-05

Overview

Where possible, this VIP proposes the adoption of Ethereum Request for Comment (ERC) standards within the Vechain ecosystem to streamline contract development, reduce duplication, and enhance cross-chain interoperability. By aligning with widely accepted Ethereum standards, this proposal aims to create a more cohesive smart contract ecosystem on Vechain, addressing concerns raised in existing VIPs, such as VIP180, VIP181, and VIP210.

Motivation

The current existence of slightly divergent smart contract standards within Vechain, exemplified by VIP180, VIP181, and VIP210, has led to confusion and challenges for developers. Minor differences between these standards create an environment where code reusability is hindered, and developers must navigate through nuanced variations, causing unnecessary complexities. By adopting Ethereum Request for Comment (ERC) standards, this VIP aims to eliminate these minor discrepancies, reduce confusion, and promote a more streamlined and developer-friendly experience within the Vechain ecosystem. This move towards standardization will not only enhance interoperability but also make the smart contract development process more accessible and comprehensible for the entire Vechain community.

Rationale

The rationale behind this proposal is to align Vechain's smart contract standards with widely accepted Ethereum standards, promoting consistency, collaboration, and compatibility across blockchain platforms.

Specification

To promote alignment with widely accepted Ethereum standards and enhance interoperability, the following actions are recommended:

  1. Supersede VIP180 in favor of ERC20:

    • Developers are strongly encouraged to migrate from VIP180 to the ERC20 standard for fungible token implementations on the VechainThor Network.
    • New projects intending to create fungible tokens should prioritize the use of ERC20 rather than VIP180.
  2. Supersede VIP181 in favor of ERC721:

    • Developers should discontinue the use of VIP181 for non-fungible token (NFT) implementations and adopt the ERC721 standard for improved compatibility and industry-wide conformity.
    • New NFT projects are advised to use ERC721 instead of VIP181.
  3. Supersede VIP210 in favor of ERC1155:

    • VIP210 should not be pursued for projects involving multi-token contracts. Instead, developers are recommended to use the ERC1155 standard, which offers greater flexibility and efficiency.
    • New projects requiring multi-token functionality are encouraged to adopt ERC1155 over VIP210.
  4. Leverage Existing ERC Contracts:

    • Whenever an equivalent ERC standard (e.g., ERC20, ERC721, ERC1155) is available and suitable for the project requirements, developers are strongly encouraged to leverage the existing Ethereum contracts.
    • This approach promotes interoperability, reduces fragmentation, and ensures compatibility with a broader ecosystem.
  5. Create a New VIP Where an Equivalent ERC Does Not Exist:

    • In cases where there is no equivalent ERC standard available for a specific functionality required by the project, developers are encouraged to create a new Vechain Improvement Proposal (VIP) to propose a standard for that functionality.
    • The new VIP should aim for alignment with existing Ethereum standards and provide clear specifications for the proposed functionality.
  6. Documentation Update:

    • The documentation for VIP180, VIP181, and VIP210 should be updated to include clear deprecation notices, guiding developers towards the corresponding ERC standards.
    • Information on migration strategies and compatibility considerations should be provided for a seamless transition.

By adopting these recommendations, the Vechain community can foster a more unified and interoperable blockchain ecosystem, aligning with established industry standards.

Test Cases

N/A

Reference Implementation

N/A

Security Considerations

Developers adopting this proposed VIP and integrating ERC standards into their Vechain smart contracts can benefit from leveraging existing, well-audited implementations and best practices available from reputable providers such as OpenZeppelin. By utilizing established libraries and frameworks, developers can enhance the security posture of their contracts, as these solutions have undergone rigorous testing and scrutiny from the broader blockchain community. Additionally, keeping abreast of updates and security advisories from these providers is crucial to ensuring that the Vechain smart contracts maintain a high level of resilience against potential vulnerabilities and emerging security threats.