June 29, 2023 - 5 min read
Metadata is simply data that describes other data. NFT metadata is the sum of all data that describes an NFT, typically including its name, traits, trait rarity, link to the hosted image, total supply, transaction history, and other essential data. Each NFT also has its own unique ID number, which is also considered part of the NFT’s metadata.
Since metadata is within the NFT itself, it alleviates the need to store NFT files directly on-chain, which can be incredibly slow, expensive, and inefficient. Storing data on a blockchain like Ethereum can get incredibly expensive, with some estimates suggesting that storing just 1 GB of data on-chain can cost tens of millions of dollars.
Instead of hosting files on-chain, NFT smart contracts reference files (such as images or videos) existing elsewhere online, typically a website that hosts the NFT. For instance, ERC-721 NFTs (currently the most popular NFT standard) store metadata in the JSON (JavaScript Object Notation) format. In addition to accessing external files, ERC-721 smart contract keeps a record of all changes of ownership. This is one reason why NFT gas fees are often significantly higher than other transactions on the Ethereum network.
While JSON metadata does reduce costs for NFT users on the Ethereum network, it only provides a limited amount of information. Plus, it is not readable or searchable by other smart contracts, which remains a significant limitation. In addition, NFT metadata for ERC-721 NFTs cannot update data.
For instance, if a website hosting an NFT image file goes down, the NFT cannot be updated to reflect a new hosting address, which could cause serious and expensive problems. However, if NFT metadata could be manually updated, the data could be compromised by bad actors, which could potentially change or remove image files or other essential metadata. Due to this, striking a balance between security and data flexibility is one of the biggest challenges of NFT development.
The Ethereum ERC-1155 token standard, which allows for batch minting and dynamic NFTs, is based heavily on the ERC-721 standard. However, since the elements of NFT can change over time, ERC-1155 tokens provide additional metadata flexibility when compared to ERC-721 standards.
NFT metadata on Ethereum Layer-2s and other EVM-compatible chains generally works much the same as Ethereum NFT metadata, with minor exceptions here and there.
For example, BNB Chain has almost identical NFT standards to the Ethereum mainnet, offering BEP-721 and BEP-1155 NFTs, which operate much like their Ethereum cousins. In contrast, Solana uses the Metaplex standard. Getting NFT metadata from Solana Metaplex NFTs is slightly more complicated but is still relatively straightforward.
As previously mentioned, one major limitation of NFT metadata, particularly for ERC-721 NFTs, is the inability to update web addresses to link to essential files, such as images or videos. This can cause a disaster if a website is compromised or goes offline for some reason. However, IPFS (Interplanetary File System), a decentralized, peer-to-peer file-sharing network, can help secure NFT files, preventing issues that arise from centralized sites. Therefore, it can be highly beneficial for NFT developers to store their digital assets on IFPS and use a Uniform Resource Identifier (URI) as a file reference.
IPFS users can retrieve their stored content (and store new content) using a CID, a form of cryptographic hash), which is distributed across a variety of independent storage providers in the IPFS ecosystem.
While most NFT metadata only includes image or video files, NFT ID, NFT transaction history, and a few other pieces of core information. However, adding additional metadata to NFTs can be highly beneficial. For example, top NFT marketplace OpenSea recommends adding metadata that describes the unique attributes of the NFT, including things like clothing and gear (for PFP NFTs) NFTs, background colors, and other data. This data can then be easily displayed on marketplaces, which can provide buyers and sellers with additional data. For dynamic NFTs, like ERC-1155 NFTs, additional data can be highly useful when programming an NFT’s dynamic traits. For instance, in a combat game, metadata could help program an in-game NFT sword or shield that gets more powerful over time or changes power based on other player behaviors.
NFT metadata on Etherscan for a recently traded Bored Ape Yacht Club (BAYC) NFT.
Fortunately, finding NFT metadata is quite easy. One simply has to use a blockchain explorer, which can provide information including transaction history, wallet addresses, and a variety of other on-chain data. For Ethereum, the most popular blockchain explorer is Etherscan, which is a great way to check out ERC-721 and ERC-1155 metadata.
If you’re a developer looking to create NFTs on Ethereum or most EVM-compatible chains, here is a great guide from NFT School that explains exactly how to incorporate metadata into NFTs.
For non-coders, there are also no-code NFT minting tools, like Rarity, that allow users to incorporate metadata into their NFTs without writing a single line of code.
Without metadata, NFTs would not exist as we know them. As discussed, NFT metadata allows NFT creators to host files and data off-chain, especially in situations when hosting data on-chain would be financially or logistically impossible. In its current form, however, NFT metadata does suffer from some limitations, including the impossibility of changing metadata after an NFT is created, which must be weighed with the potential security risks of allowing NFT metadata to be altered after creation.
NFT metadata increases efficiency for NFT collectors and NFT marketplaces, as it allows for the easy identification of NFT traits, trait rarity, and transaction history. Overall, we can continue to expect metadata to play a large role in NFT development, particularly as new standards are developed and NFTs keep expanding to a variety of non-Ethereum Layer-1 blockchains.
RECENT POSTS
Sign up for the Supra newsletter for news, updates, industry insights, and more.
©2024 Supra | Entropy Foundation (Switzerland: CHE.383.364.961). All Rights Reserved