Understanding NFTs

Terminology to get us going

Ethereum

This is the blockchain that we are going to use to launch our NFT collection on. It's the most popular blockchain that is able to execute programs, and the majority of NFT collections have been released here.

Since Ethereum is the most popular blockchain, many new blockchains are "ethereum compatible", meaning that programs written for Ethereum will work on these blockchains without any modification.

Solidity

The programming language for the Ethereum blockchain.

Smart contract

A smart contract is simply a program that is built to run on the Ethereum blockchain.

NFT

Stands for Non Fungible Token. There are two important things to note about NFTs:

  1. They are created by a smart contract that follows a standard set of interfaces (these interfaces are defined as ERC-721)
  2. They contrast to regular tokens (e.g.: Bitcoin) in that they are "Non-Fungible": i.e.: each token can be uniquely identified.

NFT Collection

NFTs are grouped into collections that are defined by the smart contract they are governed by. Broadly speaking, NFTs are from the same collection if they originate from the same smart contract.

NFT Marketplace

Since NFTs follow the ERC-721 standard, tools like marketplaces can be built that allow users to sell and purchase NFTs. OpenSea is one of the most popular marketplaces for NFTs.

The structure of an NFT

Let's use an example to bring this to life: you've likely heard of the Bored Ape Yacht Club (BAYC) collection that has garnered a huge amount of attention over 2022. Let's break it down into it's moving parts.

BAYC is an NFT collection of 10,000 NFTs, meaning:

  • The BAYC smart contract follows the ERC-721 standard.
  • Inside the smart contract, 10,000 tokens are tracked by their ID and importantly link to 10,000 corresponding and unique metadata.json files.
  • Each metadata file contains a link to a unique image, and contains additional attributes about the NFT that describe what makes the image unique.

Many NFT collections have simple smart contracts, with most of the logic being inherited from the popular OpenZeppelin open source libraries. The unique qualities of the NFTs are defined in the metadata.json file, that every NFT must have.

The metadata

For an NFT to be valid, the smart contract must implement a public function (function tokenURI(string tokenID)) that accepts a tokenID and returns a URL that contains that token's metadata.json file (e.g: https://example.org/tokens/{tokenId}).

The metadata.json file contains all the information about an NFT, and most NFT collections follow the metadata standard set by OpenSea:

{
    "name": "BAYC #3",
    "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs", 
    "image": "https://ipfs.io/ipfs/bafybeie5ycnlx5ukzhlecakrbjeqnkpanuolobatuqooaeguptulganq6u/", 
    "attributes": [ ... ], 
}

Data storage

Instead of using traditional file storage services like AWS S3 or Google Cloud Storage, we'll be using IPFS to store our metadata files and our NFT images. This gives the data we upload two important properties: permanence and immutability - two concepts that are important for NFT projects to be deemed as credible.

IPFS is a distributed file storage protocol that allows us to upload data permanently to the internet. You can learn more about how the techonlogy works from their website, but for our purposes it's enough to know the following about files uploaded to IPFS:

  • They are publicly accessible
  • They cannot be edited
  • Services exist to ensure that files won't get deleted (we'll be using one of them)

Using IPFS for our files means that we don't have to worry about maintaining a copy of our files on our own servers.

results matching ""

    No results matching ""