Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

ERC-7729 proposes a standardized URI and JSON schema for retrieving descriptive and visual metadata associated with ERC-20 tokens, including names, descriptions, and images.

This article translates, summarizes, and expands on the following proposal.

More EIP, BIP, SLIP, CAIP, ENSIP, RFC, and ACP explainers:

Overview

ERC-7729 extends ERC-20 with a standardized mechanism for associating metadata with a token. It defines a function interface for retrieving the metadata URI and a JSON schema describing the structure of the referenced metadata.

For ERC-20, see the following article.

ERC-20: A guide from first principles

ERC-20 primarily standardizes token transfers, balances, and allowances. Although it also defines optional name, symbol, and decimals functions, it does not establish a common metadata URI for visual and descriptive information such as logos, images, descriptions, and external links.

Projects can publish such information through their own mechanisms. However, differences in retrieval methods and formats make it difficult for wallets and decentralized applications (DApps) to support the information consistently.

ERC-7729 addresses this problem by defining a common metadata retrieval function and JSON structure. Compatible wallets and front ends can use the same procedure to retrieve and display token information without requiring a separate integration for every token.

In short, the proposal adds a standardized descriptive and visual metadata extension to ERC-20.

Motivation

The popularity of meme coins illustrates how tokens can be perceived as digital assets with their own identities and themes rather than merely numerical balances.

Logos, character illustrations, and narrative descriptions can contribute to community identity and make projects easier to recognize.

However, ERC-20 does not standardize where visual metadata should be stored or how it should be retrieved. This can lead to inconsistencies:

  • One wallet displays a token's logo while another does not.
  • Different applications retrieve descriptions for the same token through different mechanisms.

ERC-7729 aims to reduce this fragmentation by standardizing metadata retrieval and its structure.

Compatible implementations can benefit from:

  • Consistent presentation of logos and descriptions across participating wallets and DApps.
  • More consistent representation of a token's identity and branding.
  • Easier integration of community-oriented and interactive experiences.

The proposal applies these concepts to ERC-20 more generally, allowing projects beyond meme coins to associate descriptive and visual information with fungible tokens.

Actual presentation still depends on whether wallets and applications support the extension and how they choose to render the metadata.

Specification

Implementation requirements

A contract implementing ERC-7729 must support the underlying ERC-20 token functionality and the additional metadata interface.

  • ERC-20: Standard token functionality.
  • IERC7729: The metadata extension.

The token continues to operate as an ordinary ERC-20 while exposing an additional metadata retrieval function.

Metadata retrieval interface

The proposal defines the following interface for retrieving the URI associated with the token.

js
pragma solidity ^0.8.0;

interface IERC20Metadata is IERC20 {
    /// @dev Returns the metadata URI associated with the token.
    ///  The URI may point to a JSON file that conforms to the "ERCX Metadata JSON Schema".
    function metadata() external view returns (string memory);
}

The metadata() function returns a string containing the metadata URI.

The URI can identify a JSON resource accessible through schemes such as IPFS, HTTPS, or Arweave, subject to client support.

The important point is that compatible metadata documents follow a common structure, allowing wallets and DApps to interpret their fields consistently. Schema compatibility does not establish that the resource is authentic or safe.

The interface name IERC20Metadata and the placeholder ERCX in this historical code excerpt are preserved from the original article. Developers should distinguish this proposed interface from other interfaces using the IERC20Metadata name, including OpenZeppelin's existing ERC-20 metadata interface.

ERC-7729 metadata JSON schema

The following schema describes the proposed metadata structure.

json
{
    "title": "Token Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset to which this token represents"
        },
        "description": {
            "type": "string",
            "description": "Describes the asset to which this token represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents."
        }
    }
}

It provides a minimal set of properties for describing the asset represented by a token.

Field Type Description
name string A human-readable name for the represented asset.
description string A description of the asset, its purpose, or its background.
image string A URI identifying an image resource with an image/* media type, such as a logo or character illustration.

The structure resembles metadata formats used for ERC-721 and ERC-1155, which may allow developers to reuse existing front-end components.

The example schema does not contain a required array, so the schema itself does not make every listed property mandatory.

Overall structure

The proposed integration works as follows:

  1. The token contract implements ERC-20 functionality.
  2. It additionally exposes the metadata() function.
  3. The function returns a URI identifying the metadata document.
  4. The document follows the proposed schema for names, descriptions, and image URIs.
  5. Compatible wallets and DApps retrieve and display the metadata according to that structure.

ERC-7729 therefore combines a contract interface with a metadata format, bringing an NFT-style metadata discovery mechanism to fungible tokens.

Rationale

The metadata() function and its URI-based design follow conventions already used by token standards, DApps, and wallets.

ERC-721 and ERC-1155 commonly use URIs to reference JSON metadata, and many wallets and marketplaces already have infrastructure for retrieving and displaying these resources.

Applying a similar approach to ERC-20 offers several potential advantages:

  • Avoiding unnecessary project-specific metadata formats.
  • Reusing existing front-end infrastructure.
  • Reducing the integration and learning burden for developers and tool providers.

The proposal therefore uses a simple read-only function returning a URI, with the referenced JSON following a shared schema.

Compatibility

ERC-7729 extends ERC-20 without replacing its existing functions or changing their specified behavior.

  • ERC-7729-compatible tokens retain ordinary ERC-20 functionality.
  • The extension adds the read-only metadata() function.
  • Existing wallets and DApps can continue interacting with the ERC-20 interface even if they do not support ERC-7729.

This additive design allows metadata support to be adopted gradually without requiring every existing ERC-20 integration to change.

Reference implementation

The following example illustrates adding the metadata extension to an OpenZeppelin ERC-20 implementation.

js
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

interface IERC7729 is IERC20 {
    function metadata() external view returns (string memory);
}

contract ERC7729 is ERC20, IERCX {
    string _metadata = "ipfs://QmakTsyRRmvihYwiAstYPYAeHBfaPYz3v9z2mkA1tYLA4w";

    function metadata() external view returns (string memory) {
        return _metadata;
    }
}

The example demonstrates the intended structure:

  1. Create a token contract inheriting from ERC20.
  2. Define the metadata() function in the IERC7729 interface.
  3. Store the metadata URI in the string variable _metadata.
  4. Return that URI from metadata().

The example uses an IPFS URI, which would normally identify a JSON document containing the asset's metadata.

The original sample declares the contract as inheriting from IERCX, although the interface shown above is named IERC7729. The original article identifies the following intended correction.

js
contract ERC7729 is ERC20, IERC7729 {
    ...
}

These excerpts illustrate the design and have been preserved unchanged. A complete implementation must also resolve imports, constructor initialization, and applicable override requirements for the selected OpenZeppelin version. The examples have not been compiled as part of this translation.

Security

Metadata URIs generally reference resources outside the contract's directly stored state. Although this makes the metadata mechanism flexible, clients must consider the security implications of retrieving and rendering external content.

Potentially unsafe resources include:

  • Phishing pages.
  • Content containing malicious scripts.
  • Misleading logos or descriptions that impersonate another asset.

Returning a URI from a contract does not establish the safety or authenticity of the referenced content.

Wallets and indexers retrieving metadata should apply appropriate protections:

  • Validate the document's structure against the expected schema.
  • Restrict unsafe URI schemes and risky destinations.
  • Check against known phishing indicators where appropriate.
  • Validate media types and safely process image and JSON resources.

ERC-7729 standardizes metadata discovery, not the trustworthiness of the content. As with ERC-721 and ERC-1155 metadata, applications are responsible for securely handling the resources they retrieve and display.

For ERC-721, see the following article.

ERC-721: A guide from first principles

For ERC-1155, see the following article.

ERC-1155: A guide from first principles

Citation

msfew (@fewwwww), "ERC-7729: Token with Metadata [DRAFT]," Ethereum Improvement Proposals, no. 7729, June 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7729.

Conclusion

ERC-7729 proposes a common way for ERC-20 tokens to expose descriptive and visual metadata through a URI and shared JSON schema, without replacing ordinary ERC-20 functionality.

Questions are welcome via Twitter @cardene777.

Other publications: