NFT Metadata

What is NFT Metadata?

Metadata is information about other data. A non-fungible token, which is a unique digital asset secured by blockchains and stored in a digital wallet, has unique metadata, which defines what the digital asset actually is. The data is created by the token minter who owns the contract, and can help expand possible use cases for NFTs. The metadata of an NFT describes its features: name, description, visual traits and trait types, and anything else the author deems important, as well as connections to the visual or auditory file associated with the NFT. NFTs can range from digital art to game items and anything in between.

Large files can't be hosted natively on-chain, as this is technically and financially impossible. As an example, all Ethereum related matters, DeFi, NFTs, and dApps make up just under 1,100 GB. If images, which can easily reach over 20MB, were stored on the Ethereum blockchain, it would be much too data-consuming. If you wanted to run an ETH node, you'd have to download the 1,100 GB: can you imagine downloading it if it contained all the NFT images as well?

As the file the NFT represents (for example a jpeg or png) can't be hosted on the blockchain itself, it is hosted off-chain. The NFT metadata reduces the burden on the blockchain, and specifies what that data is. In short, the NFT lives on the blockchain, but the asset itself lives off-chain.

Whatever the blockchain, whether on Solana, on Ethereum with the ERC-1155 and ERC-721 token standards or on Stacks with the SIP-009 standard, the token's metadata is permanent and unalterable, describes what the token represents, and its ownership and transaction history.

How does NFT metadata work?

Each NFT references a file (it could be a JPG, MP4, etc) that exists online somewhere. Some creators opt to store their metadata on centralized services such as Amazon Web Services (AWS), but most often than not, the data usually points to a decentralized storage server like IPFS (InterPlanetary File System), or a URL to somewhere on the web. This "somewhere" is usually hosted by the platform, or NFT marketplace, that hosts the NFT project.

The NFT metadata is specified in a standardized JSON format (JavaScript Object Notation). The JSON metadata typically only identifies the asset and doesn't provide much in-depth information, depending on how granular the information provided by the author is.

The information is stored as a URI (Uniform Resource Identifier) inside the blockchain contract. The token URI string points to a location where the user can find the token's metadata (think NFT image), which is stored in a JSON file. An IPFS URI is just the string ipfs:// followed by an IPFS CID.

An NFT smart contract defines the parameters that allow access to the metadata for a given token ID. The connection between the token ID and the contract address is unique. Blockchain explorers such as Etherscan on Ethereum are tools that allow users to locate and confirm NFTs.

Gas fees (or transaction fees) paid in cryptocurrency are generally higher for trading or minting NFTs compared to sending crypto tokens on the network, because the token standard smart contracts record transfers and changes of ownership for each NFT, which requires more computation power.

IPFS launched the NFT.Storage provider this year, to help users store NFTs for free via IPFS and Filecoin, in a decentralized way. The platform is trusted by many NFT marketplaces including OpenSea.

To ensure that your NFTs are compatible with as much of the ecosystem as possible, it is recommended to use an existing metadata standard and schemas.

NFT Metadata on Gamma

Intro to Stacks and Gamma

Gamma is an NFT marketplace built on Stacks, launched in 2018. In early 2021, Stacks 2.0 main net went live. The Stacks blockchain leverages Bitcoin as a secure medium for storing and broadcasting and is enabling the creation of many projects and applications. The most notable examples are Stacks-based NFTs (non-fungible tokens) and DeFis. Stacks using the Clarity programming language which is decidable and human-readable, making Stacks a sort of github for smart contracts.

Gamma has its own creator launchpad, which allows non-technical artists and creators to launch their own NFT collections in minutes, no-code needed. The Gamma platform supports launching and trading Stacks NFTs as well as Ordinal NFTs, which are Bitcoin-native and where unlike traditional NFTs, the metadata lives on-chain.

Users can also connect their Ethereum wallet (for example Metamask) to view their ETH NFTs on their Gamma profile. Although ETH NFTs cannot be traded directly on Gamma, the platform offers a showcase of all NFTs held in one's wallets, as those accounts can be linked to one another.

We'd love to see you join the ecosystem, and as always, we're here to help!

Metadata on Gamma

Creators deploying their NFT projects using the Gamma Creator Portal have the option to upload a custom file containing custom metadata. It is optional, but can help set collections apart from others and provide added benefits.

The NFT metadata CSV file is fully dependent on your specific collection requirements, and there is no single correct method of entering values. That said, there is a format required for the system to correctly read and interpret your metadata in the way you intend. For this, we've put together a visual tutorial to help explain how to correctly input and format your file.

When it comes to Ordinals collections, new developments are ever-arising. Creators can upload Metadata to their Ordinals collections, in the form of a JSON file. For more information on the requirements, feel free to visit this article.

Related articles: