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.

This article examines ERC-4955, a proposal for extending NFT metadata to support multiple metaverses.

The explanation below translates, summarizes, and expands on the original proposal, with assistance from ChatGPT.

For more on ERC-721, see the following article.

https://chaldene.net/erc721

Overview

This Ethereum Improvement Proposal (EIP) aims to introduce a new namespaces field to the metadata used by Ethereum's ERC-721 and ERC-1155 non-fungible token (NFT) standards.

Motivation

Standardizing NFT metadata can help wallets, marketplaces, metaverses, and other applications interoperate with NFTs. In other words, NFTs can be handled more seamlessly across different platforms and applications. For example, NFT marketplaces and metaverse applications could display NFTs using custom 3D representations and new attributes.

Metadata.png

Projects such as Decentraland, The Sandbox, and CryptoAvatars also need their own 3D models to represent NFTs. These models differ in aesthetic requirements and data formats, however, and are not necessarily compatible today. The proposed namespaces field would allow these projects to provide richer representations of NFTs.

Such standardization is expected to make NFTs more useful across applications and provide more engaging experiences for users.

Specification

Schema

The proposal introduces a new property called namespaces. As shown in the examples below, the property is intended to contain a separate object for each project.

json
{
    "title": "Asset Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset that this NFT represents"
        },
        "description": {
            "type": "string",
            "description": "Describes the asset that this NFT represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime type image/* representing the asset that this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
        },
        "namespaces": {
          "type": "object",
          "description": "Application-specific NFT properties"
        }
    }
}

The individual properties are as follows.

  • title
    • The title of the object.
  • type
    • Indicates that the value is a JSON object.
  • properties
    • Defines the properties of the object.
  • name
    • A string identifying the asset represented by the NFT.
    • It stores a name describing what the NFT represents.
  • description
    • A string containing a detailed description of the represented asset.
  • image
    • A string containing a URI pointing to a resource representing the asset.
    • Its MIME type is specified as image/*.
    • This allows the asset represented by the NFT to be displayed as an image.
    • The recommended image width is between 320 and 1080 pixels, with an aspect ratio between 1.91:1 and 4:5, inclusive.
  • namespaces
    • An object containing application-specific NFT properties.
    • Each project can include the additional information it requires in this property.

This makes it possible to add application-specific information to NFT metadata. Projects can define their own NFT properties within namespaces and use them to provide richer representations.

Examples

json
{
  "name": "My NFT",
  "description": "NFT description",
  "image": "ipfs://QmZfmRZHuawJDtDVMaEaPWfgWFV9iXoS9SzLvwX76wm6pa",
  "namespaces": {
    "myAwesomeCompany": {
      "prop1": "value1",
      "prop2": "value2",
    },
    "myAwesomeCompany2": {
      "prop3": "value3",
      "prop4": "value4",
    },
  }
}

// Or by simply using a `URI` to reduce the size of the JSON response.

{
  "name": "My NFT",
  "description": "NFT description",
  "image": "ipfs://QmZfmRZHuawJDtDVMaEaPWfgWFV9iXoS9SzLvwX76wm6pa",
  "namespaces": {
    "myAwesomeCompany": "URI",
    "myAwesomeCompany2": "URI",
  }
}

Rationale

The proposal notes that projects rendering NFTs have different requirements and aesthetics. Metaverses such as Decentraland and The Sandbox, in particular, have distinct visions and engines, and need to render NFTs accordingly. Each metaverse may also use a different armature, the skeletal structure of a 3D model. Although standards exist for humanoid models, not every metaverse adopts the same standard.

Because of these differences, each metaverse needs to render NFTs in ways that meet its own requirements. For example, the visual style of Decentraland differs from that of Cryptovoxels and The Sandbox, so a 3D model must be designed to display appropriately in those environments. Different armatures also need to be taken into account even if two models use the same file extension, such as GLB or GLTF.

Armatures

To meet these requirements, NFT projects need to create suitable 3D models and asset information for their target metaverses. Some NFT projects, including CryptoPunks and Bored Apes, directly support 3D models for different metaverses, making it easier to render their NFTs across projects.

This allows each project to display NFTs according to its own identity and goals, giving users a richer experience. Custom properties and armatures make it possible to use NFTs effectively in different projects and metaverses while supporting creative forms of expression.

different-renders.jpeg Source: https://eips.ethereum.org/EIPS/eip-4955

Metadata (representation files)

For example, metaverses use their own metadata representation files so that assets work within their engines according to the needs of the game.

The following JSON fragment describes a wearable item in Decentraland.

json
"data": {
  "replaces": [],
  "hides": [],
  "tags": [],
  "category": "upper_body",
  "representations": [
    {
      "bodyShapes": [
        "urn:decentraland:off-chain:base-avatars:BaseMale"
      ],
      "mainFile": "male/Look6_Tshirt_A.glb",
      "contents": [
        {
          "key": "male/Look6_Tshirt_A.glb",
          "url": "https://peer-ec2.decentraland.org/content/contents/QmX3yMhmx4AvGmyF3CM5ycSQB4F99zXh9rL5GvdxTTcoCR"
        }
      ],
      "overrideHides": [],
      "overrideReplaces": []
    },
    {
      "bodyShapes": [
        "urn:decentraland:off-chain:base-avatars:BaseFemale"
      ],
      "mainFile": "female/Look6_Tshirt_B (1).glb",
      "contents": [
        {
          "key": "female/Look6_Tshirt_B (1).glb",
          "url": "https://peer-ec2.decentraland.org/content/contents/QmcgddP4L8CEKfpJ4cSZhswKownnYnpwEP4eYgTxmFdav8"
        }
      ],
      "overrideHides": [],
      "overrideReplaces": []
    }
  ]
},
"image": "https://peer-ec2.decentraland.org/content/contents/QmPnzQZWAMP4Grnq6phVteLzHeNxdmbRhKuFKqhHyVMqrK",
"thumbnail": "https://peer-ec2.decentraland.org/content/contents/QmcnBFjhyFShGo9gWk2ETbMRDudiX7yjn282djYCAjoMuL",
"metrics": {
  "triangles": 3400,
  "materials": 2,
  "textures": 2,
  "meshes": 2,
  "bodies": 2,
  "entities": 1
}

The wearable item's metadata includes the following fields.

  • replaces
  • hides
  • tags
  • category
  • representations
  • image
  • thumbnail
  • metrics

Each element in representations contains information for a particular body shape or asset variant. The metadata also contains information such as replaces, overrides, and hides that is needed to render different body shapes correctly. Together, these settings allow 3D assets to be displayed appropriately in metaverses such as Decentraland.

Existing metadata representations do not provide a standardized way to describe the style in which an asset should be rendered. Each metaverse uses its own armatures and aesthetics. There is consequently no common style field for that purpose.

The proposal extends the existing ERC-721 metadata schema while maintaining compatibility, allowing each project to supply the information needed to render its NFTs through namespaces. Namespaces make it easier for vendors and third parties to access and index the models they need.

Specifically, namespaces is an object containing application-specific NFT properties. Each project can include its own NFT information in this field. This provides a place for additional information required by applications.

Suppose a vendor or third party needs a 3D model to render an NFT in Decentraland. The vendor can retrieve the NFT metadata and inspect namespaces to locate the information associated with its target project.

The steps are as follows.

  1. The vendor or third party retrieves the NFT metadata.
  2. It inspects the namespaces field.
  3. The field may contain information for several different projects.
  4. It identifies the information associated with the project it needs, such as Decentraland.
  5. It retrieves the required 3D model URI and other asset information from namespaces and prepares to render the NFT using those resources.

This allows vendors and third parties to access the information they need for a particular project. By including their own information in namespaces, projects can improve interoperability and make NFTs more useful across applications and metaverses.

Using the existing ERC-721 metadata fields makes it possible to introduce this mechanism without modifying existing contracts. Avoiding contract changes or redeployment saves time and costs. The proposal also notes that JSON metadata already contains a field for an image, making it reasonable to keep asset rendering information together.

Backward compatibility

Existing projects that cannot change their metadata responses or schemas may be able to deploy a new smart contract that returns updated metadata based on the tokenId. Other projects may, of course, need to recognize these linked smart contracts as valid. This approach would allow the updated metadata schema to be retrieved for a given tokenId.

Security considerations

The same security considerations as ERC-721 apply when HTTP gateways or IPFS are used to resolve the tokenURI method. Appropriate precautions are needed when using these mechanisms. For example, applications should use HTTPS and verify relevant signatures or hashes to establish the integrity of data retrieved from IPFS.

Security is an important part of the NFT ecosystem, and applications should take adequate precautions to protect users' assets. NFT metadata may contain important information associated with an asset and its ownership, so it should be handled securely. Implementations and extensions of ERC-721 should follow applicable security best practices.

Citation

Ignacio Mazzara (@nachomazzara), "ERC-4955: Vendor Metadata Extension for NFTs," Ethereum Improvement Proposals, no. 4955, March 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-4955.

Thoughts

I find the idea of NFTs that can be used in multiple metaverses interesting. Supporting several metaverses rather than just one gives users more choices and makes the experience more exciting. Being able to take a favorite NFT into different virtual worlds opens up new possibilities. I do wonder, however, how many users actually spend time in multiple metaverses. A more likely use case may be to offer an NFT that supports several metaverses and let each buyer choose the one they prefer. Supporting more metaverses could also expand the pool of potential buyers.

Conclusion

This article covered ERC-4955, a proposal for extending NFT metadata to support multiple metaverses.

If you have questions, feel free to reach out via Twitter DM.

Twitter @cardene777