HomeWikiNFT Standards, Metadata and the Web3

NFT Standards, Metadata and the Web3

Understanding the NFT standards, the metadata they are made up of and the technology behind the web3, helps us to better understand the ecosystem as a whole.

It is undeniable that NFTs have helped to bring blockchain and crypto to the mainstream, bringing a whole new audience that has primarily found NFTs and digital art to be a great opportunity to enrich themselves. 

More and more users have become interested in Non-Fungible Tokens, driving an untapped market to impressive performance in a very short time. In the near future, NFTs will change the way we create, consume and distribute digital content, opening up new use-cases never seen before.

For these reasons, understanding the standards behind this phenomenon also helps us understand the technology and usability of each NFT and the various blockchain protocols involved.

Non-Fungible Tokens (NFTs)

Thanks to the blockchain, we have been able to make a digital object unique for the first time in history, allowing us to acquire and own files, resources and digital properties. These properties, which come in the form of digital tokens, can be traded and sold just like any other asset. 

Non-fungible tokens are unique and distinguishable from other tokens, but most importantly, they cannot be divided or fractionalized, setting them apart from all other tokens.

NFTs therefore mark an evolution of blockchain-based assets, providing users with a digital token different from cryptocurrencies that gives possession of an indivisible and non-duplicable digital object.

Since the inception of the CryptoKitties in 2017, which put Ethereum’s network to the test, the NFT market has grown by leaps and bounds, setting new records not only in growth but also in sales and volumes, even landing in the world’s most prominent auction houses.

nft market size

Monetized Graphic, CryptoPunks and BAYC

Many of us are part of a fledgling technology that could change the future of finance and everything around us. Defining rules and sticking to them is the basis for standardization leading to the design of new paradigms.

monetized graphics
Monetized Graphic, the first NFT

Ethereum is the main blockchain for minting, storing and exchanging NFTs and it is here that the first NFT was born. 

At a conference for tech and art enthusiasts, Kevin McCoy and Anil Dash, made the first transaction of a digital image on blockchain. It was 2014 and they were unaware that Non-Fungible Tokens would explode disruptively within a few years, bringing projects like CryptoPunks and BAYC into the media, breaking all sales records for digital art. 

In March 2021, an artwork called “Everydays: The First 5000 Days” sold for $69 million at Christie’s Auction House.

bayc nft
Bored Ape Yacht Club, BAYC
bayc nft
CryptoPunks by LarvaLabs

How is an NFT made?

In this article, we will look at what an NFT consists of, its token standards and how to upload it online.

An NFT is made up of 3 objects:

    • Token Identifier (or ID)
  • Token Owner
  • Metadata associated with the token

data nft

The ID is simply a numeric representation associated with the NFT and its owner, making it distinguishable from others. The Owner is the address associated with the owner’s wallet, and finally the Metadata, the true content of our Non-Fungible Tokens.

Metadata, the heart of NFTs

Storing data within a blockchain is a very expensive practice. Block size, mempool size, and transaction costs make it an unsuitable medium. On Ethereum, for example, there is not enough space on the blockchain to store an image (unless in the form of a small SVG, in vector graphics). Mass storage of images, videos, gifs or any other digital media must therefore be stored elsewhere online. Precisely for this reason, technologies such as IPFS or Arweave and dedicated services play a key role in decentralized storage. It is for this reason that it was decided to put only the data related to the NFT in the blockchain and not the image itself, thus saving a lot of space and saving costs. But what specifically does this metadata consist of?

A metadata is basically a JSON file that contains:

  • Description
  • Link to the digital media (gif, jpeg, …)
  • Characteristics (traits, attributes, …)

metadata opensea

ERC stands for Ethereum Request (for) Comments, it outlines the set of rules and instructions that developers must follow to implement all new features. ERCs are essentially EIPs (Ethereum Internal Proposals) mainly dedicated to decentralized applications.

As can be seen from the image released by OpenSea, a well-known NFT marketplace, the smart contract, in this case based on ERC-721, contains the Owner‘s address and the TokenURI, a special option that contains the “place” where the Metadata containing the characteristics of the NFT, including an external Http URL or on IPFS or ArWeave, reside. More information on Metadata on Opensea docs. 

To better understand what they look like, these are the Metadata from LarvaLabs’ famous Meebits:

`{ “name”: “Meebit #12347”, “description”: “Meebit #12347”, “image”: “http://meebits.larvalabs.com/meebitimages/characterimage?index\u003d12347\u0026type\u003dfull\u0026imageType\u003djpg”, “attributes”: [ { “trait_type”: “Type”, “value”: “Human” }, { “trait_type”: “Hair Style”, “value”: “Ponytail” }, { “trait_type”: “Hair Color”, “value”: “Dark” }, { “trait_type”: “Glasses”, “value”: “Aviators” }, { “trait_type”: “Shirt”, “value”: “Tube Top” }, { “trait_type”: “Shirt Color”, “value”: “Green” }, { “trait_type”: “Pants”, “value”: “Leggings” }, { “trait_type”: “Pants Color”, “value”: “Blue Camo” }, { “trait_type”: “Shoes”, “value”: “Canvas” }, { “trait_type”: “Shoes Color”, “value”: “Gray” } ] }

The idea behind Metadata is to find a solution to describe the characteristics of NFTs also to a non-specialist audience like artists and not only to developers, who can simply follow a set of instructions to create their collection. The things an artist needs are:

  • Create their own collection or NFT individually (images, gifs, videos)
  • Upload the media online (AWS, cloud, IPFS, …) and get a URL associated with each of them which will then be included in the Metadata
  • Generate a unique JSON file for each media that will contain metadata as in the standard shown above (image URL, attributes/traits, name, etc.)
  • Upload all JSON files to the desired online media (AWS, cloud, IPFS, …) and obtain a URL associated with each of these JSON files.

Centralized services such as AWS or Cloud suffer from two problems related to the objective we want to achieve:

  • Centralization: if the server is hacked or goes down even temporarily our file will be lost with it or will be inaccessible.
  • Location Based: this type of server indexes files by name, which means that if we upload two different files with the same name (three.png) and overwrite them, they will look different from the previous one, which is what NFT tries to avoid by giving a univocal digital object.

The IPFS (Interplanetary File System) solves this problem by giving us a CID (Content Identifier) as the product of this procedure, which will not only be our IPFS address, but will also depend on the content of its metadata. 

If the metadata changes, the URL will also change with it, thus returning completely different files. In the system adopted by IPFS, it is in fact impossible to return two different images from the same URL.

Furthermore, the IPFS system is a decentralized mechanism that allows files to be distributed across the network without having a specific server. This makes the data highly resilient to the problems encountered by a centralized system such as AWS or similar.

Although all this can be complex, for the geeky ones it is possible to experiment with the repository provided by Yomi for the generation of Smart Contracts for the deployment of NFTs:

smart contract nft

Thanks to YOMI, we have created a tool to allow the reader to try his hand at creating Metadata on ERC-721 standards. At the link of the related GitHub page it will be possible to:

  • Upload: We will be able to upload the file to be made into NFT. It will be uploaded via IPFS and the link will be inserted in the TokenURI of the metadata.
  • Description: we will be able to insert the description that we like best.
  • Traits: it will be possible to insert the attributes that describe the image. This information, as we have seen, is important for the rarity of the collections.
  • Traits Value: additional information on the type of attribute (Yes/No, More, Poor, 30, etc).

Once these characteristics have been set, the display on the right will show the Metadata in JSON format that can be inserted in the Smart Contract written in Solidity.

By clicking on “Upload Metadata to IPFS” it will be possible to upload both the JSON and the chosen file directly to IPFS and mint the NFT you are creating by signing it directly with your MetaMask on OpenSea!

smart contract metadata

The most common standards

As we have already mentioned, EIPs (Ethereum Internal Proposals) related to NFTs soon turned into operational standards called ERCs (Ethereum Request for Comments) becoming token protocols that follow certain requirements. 

These standards are fundamental for interacting with Smart Contracts and creating new operating logics in the market, allowing:

  • A single language for easy integration between the various platforms
  • Interoperability between different chains that can “read” the same protocols.

Below are the most common standards with a brief description:

ERC-721

Created in January 2018, it allows the implementation of APIs for smart contracts of NFTs, introducing a whole series of information (events) such as the ownership of the NFT, the balance of the address, the various approvals and the TokenURI in order to have the already mentioned Metadata.

ERC-721R

Recently introduced, it is a version of the previous 720 but with features in the smart-contract that enable the user to be reimbursed for a pre-determined period of time. This standard has been discussed in detail in a separate article.

ERC-1155

Introduced by the Enjin team, it allows multiple tokens to be configured in a single smart contract, saving on gas fees and opening up new features such as the ability to combine Non-Fungible Tokens with Fungible Tokens.

ERC-994

This is an extension of ERC-721 that introduced DNFTs, i.e. Delegated-Non-Fungible-Tokens, which are used in physical property. It aims to solve problems such as the conflict of geographical spaces, the legal validity and physical sovereignty of property, and finally compatibility with financial contracts.

ERC-809

This standard is designed to rent NFTs through an API that allows the rental of any “rival good”, i.e. any asset whose use by one user is not simultaneously possible by another.

ERC-1201

Similar to ERC-809, ERC-1201 proposes to tokenize rental rights rather than simply allowing them. In this way it is possible to sub-rent the asset simply by exchanging the token.

ERC-998

This is a standard that allows the transfer of either an NFT such as ERC-721 or fungible ERC-20. Transferring an ERC-998 token means transferring the entire hierarchy of items attached to it. Think of the NFT of a character in a P2E video game which, when sold, transfers all the other items to the new owner: armour, helmet, weapons etc.

What happens is that an ERC-998 token can be combined with an ERC-721, in a series of extensions which have been specially specified below:

  • ERC998ERC721 composable top-down that receive, hold and transfer ERC721 tokens
  • ERC998ERC20 composable top-down that receive, store and transfer ERC20 tokens
  • ERC998ERC721 composable bottom-up that link to other ERC721 tokens
  • ERC998ERC20 composable bottom-up that link to ERC721 tokens but with an ERC-20 token

dNFT: Dynamic NFT

We have seen how the primary characteristic of NFTs lies in the static nature of its data which makes its content unique and immutable, opening up contexts and markets that we have discussed at length. Although such characteristics represent a strong point in the digital world for having created “scarcity” and “uniqueness” where there was none, they could represent a limitation for anyone who wants to mint NFTs and make them mutable in time instead of immutable, suggesting new logics of functioning.

If it is true that modifying the URI linked to the IPFS link within the metadata of an NFT could in fact change the visual appearance of the NFT (and that this is therefore already possible with standards such as ERC-721), it is equally true that such a modification would be the prerogative of developers only, who could thus change the traits at will, invalidating the trustless characteristic that a decentralized system aims at. What is needed, therefore, is a protocol that keeps the trustless characteristic unchanged but makes the data within the NFT mutable.

GameFi, for example, needs very high interactivity. Here NFTs prevent the improvement of weapons, characters or objects for example, binding the player to minting them and re-selling them in the secondary market. But if we wanted to progress through the game with our items, perhaps reselling what we have carefully improved during the game, we would be prevented from doing so. This is where dNFTs, or dynamic NFTs, come in.

dNFTs introduce dynamic mutability of metadata based on conditions outside the metadata, changing the code in the smart contract and implementing automatic changes in what changes to apply to the metadata and when to apply them. These external conditions can be provided by Oracles, third party feeders, which connect the blockchain to external systems, providing new information and allowing dynamic NFTs to constantly change. Among the most famous are Chainlink.

30

NFTs and the future of the web3

The succession of NFT-related implementations has churned out hundreds of EIPs and ERCs in recent years, introducing innovative use-cases. This progress has not stagnated, frantically projecting itself towards the IRL (In Real Life) and Phygital, trying to impose itself in the real world by overcoming the current limitations and using the technology we have been talking about. 

It is hard to believe that such a technology would remain confined to digitizing works of art or gaming, but would indeed find fertile ground in applications and services not yet fully explored.

The innovation and progress of NFTs is likely to sweep several markets, unlocking the potential of the web3. Connecting digital creators and users without the need for other intermediaries is what the new internet aims at.

NFT will allow new forms of property to be created and built in the future, but this has both rights and obligations.

Property is the pivot of civilization.

(Leon Samson)

RELATED ARTICLES

MOST POPULARS

GoldBrick