ERC-3569 NFT metadata sealing standard (Sealed NFT Metadata Standard)

Stagnant · NFTs & multi-token · created 2021-05-07

An ERC-721/1155 extension standard that permanently seals NFT metadata so it can no longer be changed, and lets anyone verify whether it is sealed and where it is stored.

Why it is needed

The existing metadata extensions for ERC-721 and ERC-1155 only use the tokenURI function to indicate the location of the metadata, and offer no guarantee that the content will not change later. If the metadata resides on a centralized server, the creator can change the image or description at any time, a so-called rug pull, and buyers have no way to detect this in advance. Also, permanently fixing the metadata for many NFTs at once requires sending one transaction per token, so cost scales linearly with the number of tokens. Since a smart contract itself has no way to communicate with an external storage layer, it cannot even prove at the contract level whether the metadata is pinned to decentralized storage.

What to implement

In depth

Behavior rules of the seal function

seal sets a URI for the contiguous token range from fromTokenId to toTokenId. To seal only a single token, fromTokenId and toTokenId must be the same value. This function must fail (throw) if even one token in the specified range is already sealed. seal may be called at NFT creation time or later after creation. It is recommended that calling permission be restricted to the contract creator or the NFT creator, but this is optional and may vary by implementation. On a successful call, a Sealed event must be emitted.

Nature of the URI

The uri argument passed to seal should (SHOULD) point to a JSON file located on a decentralized file system such as IPFS. However, the smart contract itself does not verify whether this URI is actually located on decentralized storage. This verification is the responsibility of the client side, to be performed by the collector or platform themselves.

The sealedURI and isSealed query functions

sealedURI returns a URI where the sealed metadata for a specific token ID can be found, and must fail if the token does not exist or is not sealed. isSealed returns a boolean indicating whether a token ID is sealed, and is specified to fail if the token does not exist.

The Sealed event

The Sealed event is emitted when a range of tokens is sealed and contains fromTokenId, toTokenId, and uri. fromTokenId and toTokenId are indexed fields. Platforms or explorers can use this event to automatically cache the metadata of sealed tokens or update related information.

Sealed metadata JSON format

The top-level keys of the JSON file returned by the URI passed to seal must be the token IDs. Each key's value can be a metadata object containing name, image, description, and so on, or it can be a URI string (e.g. ipfs://SOME_HASH) pointing to another file. When per-token metadata is very large or there are many tokens, the value can be a separate URI to reduce the size of the top-level file.

Why multiple tokens are packed into one file

Packing the metadata or URIs for multiple NFTs into one JSON file removes the need to send a transaction per token to set metadata. Since this file is assumed not to change, platforms or explorers can cache the entire file.

Backwards compatibility and status

This standard provides no backward compatibility with existing standards and is an extension that can be added on top of existing NFT standards such as ERC-721 or ERC-1155. The original text states that there are no security considerations directly related to the implementation of this standard itself. This proposal's current status is Stagnant, meaning it is no longer being actively discussed and has stalled.

Original ERC · ← ERCs