The concept of Non Fungible Token (NFT) has gained a lot of hype in recent years. Part of it is because of the expectations surrounding Blockchain technology. But more importantly, it is a result of a shift in our digital lifestyles and a desire to own digital assets.
This post covers the concept of NFT from a technical and developer perspective. Part one starts with the definition, building blocks of an NFT hosting stack, and the NFT platform ecosystem, consisting of the popular Blockchain platforms and marketplaces empowering the NFT economy. The second part will cover some emerging use cases and the prevalent development libraries and tools for building an NFT based application.
The foundation of NFT is based on the Blockchain. Therefore before proceeding further, it is assumed that the reader is aware of Blockchain technology and its basic functioning with respect to cryptocurrencies and smart contracts. You can explore more about our coverage of the various use cases powered by Blockchain.
Latest NFT Use Cases
Page [tcb_pagination_current_page] of [tcb_pagination_total_pages]
What is NFT?
Non Fungible Token is a kind of crypto token associated with a unique asset. It is a digital record that represents an asset via its particular properties. Some of the most common examples are digital art, such as images and song clips represented in their original files. These files are stored in a URL. Further, their location and properties are logged in the form of a blockchain transaction, along with the ownership details. That makes it easy to buy or sell such digital artwork online.
NFTs are associated with the asset’s specific properties that make them non fungible. That means the asset has a set of unique visible traits and can be recorded and verified to ascertain its authenticity. This association ensures that the asset cannot be replaced or interchangeable with another asset of a similar kind. For example, an image of a rare 1 dollar currency note having a unique identification number is a possible candidate for NFT. However, if you only consider the currency value, that is fungible since a one dollar bill can be exchanged for another 1 dollar bill. That’s why cryptocurrencies cannot be viewed as NFT. In contrast, any form of digital artwork or physical asset with provable unique traits is a possible candidate for being represented as an NFT.
Components of an NFT Tech Stack
NFTs are similar to any crypto token issued on Blockchain. Therefore NFT is represented as a transaction, batched together with other transactions and registered as a block on the underlying Blockchain network.
However, from a technical standpoint, there are a few differences to be noted.
- Token Standard: NFTs are based on the ERC 721 token standard, which was derived from the EIP 721 specification. It defines some additional interfaces to make it easier to write smart contracts for NFTs.
- Metadata: The NFT’s digital representation has additional metadata that registers the non fungible properties of the asset. The EIP 721 contains the Metadata JSON Schema for representing the unique properties of the NFT.
- Linking: Since NFTs represent a tangible asset, there must be a link between the token representation of the NFT and its actual form. In most digital assets, a unique URL pointing to the asset’s digital file serves as the valid link. For NFTs representing a physical asset, a corresponding digital image representation of the asset accentuating its unique property must be considered while designing the NFT application.
- Minting – Performing transactions on NFT involves a proof-of-stake consensus mechanism wherein a group of validators is used to mint a new NFT token and add that as a new block on the underlying Blockchain network. This is unlike the proof of work consensus protocols, where miners solve a complex mathematical problem to mine a new block to record cryptocurrency transactions. The proof-of-stake mechanism is simpler and more cost-effective in managing non fungible assets, which do not suffer from the problem of double-spending in fungible assets, as in the case of cryptocurrencies.
Let’s start diving into the typical NFT text stack. Here are the standard components involved in designing, minting and selling an NFT.
A node is the computing infrastructure that runs your NFT smart contract and attaches to the underlying Blockchain network. Just like in a centralized client-server architecture, where the server hosts your business logic and the client requests it, a node acts as a server for you and others to carry out buy/sell transactions on the NFT. Of course, the actual decision to approve any transaction on the NFT is a decision that is governed by a consensus protocol across multiple nodes, unlike the client-server model where the server alone decides everything.
In general, there are different types of blockchain nodes. In the case of proof-of stake consensus mechanism, special validating nodes deployed as part of the network are responsible for the consensus to work. The nodes hosting the NFTs attach to the Blockchain network and offer the Validators some stake in crypto currency coins to earn more tokens against the NFTs.
Every NFT requires storage for preserving the digital artifact of its associated asset, and its metadata. It is possible to use conventional storage based on a cloud backed storage service, but these services do not ensure the immutability of the data. On the other hand, it is becoming increasingly popular to use a decentralized storage method. It can be either on-chain or an off-chain service that supports IPFS protocol with a permanent storage solution that divides and accesses the data as shards replicated across multiple peers for redundancy purposes. The on-chain approach leverages Blockchain’s underlying security and immutability features but is expensive. The off-chain IPFS backed approach also preserves the permanence of the data via an IPFS content identifier (CID) and is immutable.
A wallet is a cryptocurrency holder, just like your physical wallet holds currency notes and coins. However, in the case of crypto, a wallet is identified by an address and stores the private key to access the wallet content. In addition, the wallet must also support the cryptocurrency and the blockchain protocol used to trade the NFTs.
Generally speaking, wallets are available as hardware as well as software. In hardware wallets, the private keys are often stored in the protected areas of a microcontroller and cannot be transferred out of the device. That makes it more secure compared to software wallets. On the other hand, software wallets are easy to get started with. These wallets are available either as desktop, mobile, or online wallets.
A marketplace is a portal application that allows users to trade and store the NFT. NFT marketplaces even act as platforms for auctioning and provide end-to-end services for managing ownership rights, immutability, and secured access to the NFT asset holders.
The NFT Marketplaces can be characterized as streamlined or augmented. The streamlined platforms include services such as hosting auctions and hosting fixed-price sales for a wide variety of NFT’s. These marketplaces focus mainly on enabling efficient transactions and providing payment infrastructure for accepting credit-cards and crypto payments. As a result, these marketplaces typically have lower initial and ongoing costs.
The Augmented marketplaces provide more value-added services such as minting, curation, pricing recommendations, portfolio tracking of NFT. However, these marketplaces generally have a higher transaction fee and higher upfront setup costs.
There is also an option of deploying a self-hosted NFT marketplace using various open source platforms if someone wants to host an exclusive NFT marketplace for a niche application.
Dapps or distributed apps are the Web 3 reincarnation of traditional or mobile apps that work on the Web 2.0 client-server model. NFT Dapps interact with the marketplace or the Blockchain node hosting the smart contract. Unlike the traditional client-server model, where the client app’s requests are validated by a server, Ddapp’s requests are validated via multiple nodes executing the smart contract. This mechanism is governed by the consensus protocol of the underlying Blockchain network.
From the user experience point of view, Dapps look and feel the same way as any typical web-based front-end application. However, they are enabled by a Blockchain platform at the backend, and the server-side business logic resides in the smart contracts. In the case of NFT Dapps, the smart contract defines the logic for buying and selling of NFT.
NFT Platform Ecosystem
The NFT ecosystem is flooded with many tech platforms, components, and tools to give you an immediate head start. However, if you are already a Blockchain developer leveraging one of the popular platforms such as Ethereum, you have everything it takes to build an NFT The general interpretation of a use case covers the description of what a system does in a real-world scenario to achieve a set of objectives. Here the system refers to a technology platform, component or tool. Scenario refers to a real-world problem, and the objectives define a solution to the... More.
Here are the most popular Blockchain platforms and marketplaces powering the NFT space.
Popular Blockchain Platforms for NFT
The most crucial platform decisions in launching an NFT revolve around deciding the Blockchain network. Here are some of the popular Blockchain networks to choose from.
Ethereum is a decentralized open-source Blockchain. It is one of the earliest, community-developed platforms after Bitcoin that supports Ether (ETH). It leverages the proof-of-work consensus mechanism to validate and record transactions.
Polygon is a protocol and a framework for building and connecting Ethereum compatible blockchain networks. It solves the problem of slow transaction speeds and high gas fees in Ethereum. It achieves this by adopting a multi-chain architecture, providing better aggregation and scalability support for the Ethereum ecosystem. That’s why it is also sometimes referred to as “Ethereum’s Internet of Blockchain”. The native cryptocurrency of Polygon is MATIC.
NEAR Protocol is a developer-friendly, decentralized proof-of-stake, public Blockchain. NEAR uses a sharding approach to achieve scalability, and it is certified as a carbon-neutral protocol. NEAR defines the token standard NEP-171 for NFT, and the native cryptocurrency is NEAR.
Fantom is a fast, high-throughput open-source smart contract platform for digital assets and Dapps. Lachesis is Fantom’s aBFT consensus algorithm, which claims to be ultra-fast and scalable. Developers can use Lachesis to build peer-to-peer applications without creating their own networking layer. In addition, it supports the Fantom wallet for sending, receiving, and staking FTM, the native cryptocurrency of Fantom.
The Internet Computer was launched and open-source by the DFINITY Foundation. It is designed for scalability through subnet blockchains that run smart contracts on a selection of nodes. It defines the concept of canister, which is an evolution of smart contract. Furthermore, it has adopted Mokoto as the language for smart contracts. The nodes within the subnet Blockchains of the Internet Computer communicate via Internet Computer Protocol (ICP) which also incorporates a novel consensus protocol.
Harmony is an open platform for assets, collectibles, Identity, governance. It aims to build the next generation sharding-based Blockchain that is much more scalable, secure, and energy-efficient. Harmony adopts a PoS based consensus mechanism that adopts a scalable BFT algorithm. Harmony helps businesses build marketplaces of fungible tokens (such as energy credits and loyalty points) and non-fungible assets (such as game collectibles and real estate). Harmony ONE is the native crypto token of this platform.
Algorand is a permissionless, pure PoS, Blockchain protocol designed for the future of finance. Its Blockchain infrastructure offers the interoperability & capability to handle a high volume of transactions needed for decentralized finance (Defi), financial companies & governments to transition into FutureFi ( Future of finance ) smoothly. In Algorand, blocks are constructed into 2 phases (proposal phase & Voting round) through lotteries known as “cryptographic sortition ” enabling fast finality. Algorand Wallet is known as Pera Wallet, and the coin is Algo.
Avalanche is an open, programmable smart contract platform for Dapps, built for fast, low cost, Solidity compatible Dapps. It is designed for high transactional throughput with less than 2sec transactional finality. Avalanche fosters future interoperability of Blockchain network, thereby supporting Avalanche Bridge (AB) that enables easy transfers of Avalanche and Ethereum assets between blockchains. Avalanche has its own Avalanche wallet & AVAX coins.
Chainlink is a Decentralized Oracle Network (DoN). This means that it supports interoperability across different Blockchain networks by enabling the creation of hybrid smart contracts, where on-chain code and off-chain infrastructure are combined to support advanced decentralized applications (dApps) that react to real-world events and interoperate with traditional systems. Chainlink is based on Ethereum but allows smart contracts on Ethereum to securely connect to external data sources, APIs, and payment systems. IIt’stoken is known as LINK.
Polkadots is a true multi-chain application platform where cross-chain computation is possible. Polkadot was founded in 2016 by Gavin Wood, former Co-Founder and CTO of Ethereum. Polkadot enables data across public, open, permissionless Blockchain and private permissioned Blockchain. The Polkadot dev environment is being coded in Rust, C++, and Golang, making Polkadot accessible to a range of developers. IIt’stoken is called DoT.
Popular NFT Marketplaces
NFTs are traded like assets. Therefore they need virtual stores or marketplaces to facilitate the trading process. On top of that, there is a lot of value-added services being provided by various marketplaces to differentiate themselves.
Opensea is one of the first decentralized marketplaces for trading NFT. It supports fixed price listing, English auction listing, and Dutch auction listing (Declining Price Listings) for many cryptocurrencies. It is also the first marketplace to provide cross-blockchain support, starting with gas-free transactions on the Polygon blockchain where neither the seller nor the buyer must pay any gas.
Mintable is also a decentralized marketplace for minting, buying, and selling the NFTs. However, unlike other marketplaces, it offers the users an option to list already minted NFT. Furthermore, it supports only two types of currencies, ETH and IMX, and it supports ETH and USD for transactions.
Rarible supports Rarible protocol, using which the developers can build their NFT and deploy customized NFT storefronts. Some additional features provided by Rarible include timed auctions, royalties, multiple edition NFTs, and messenger.
AlgoMart is an open-source NFT marketplace platform for deploying your own hosted marketplace powered by the Algorand blockchain network. It supports a headless CMS and APIs to launch custom storefronts and comes with Terraform templates for launching on Google Cloud.
Openware offers a proprietary crypto Marketplace SaaS platform to provision trading of collectibles, art, valuables, assets, and securities, backed by NFT tokens.
An NFT is represented by a digital token on the underlying Blockchain platform. That implies the presence of one or more transactions involving the NFT in the ledger. The minting process creates the first entry of the NFT on the ledger. Subsequently, as the NFT is traded and its ownership changes. Additional transaction entries are thus formed on the ledger, represented by the various ‘buy’ and ‘sell’ events on the NFT.
The minting process establishes the NFT’s primacy. However, the first owner of the NFT must perform some groundwork before the NFT shows up on the marketplace and is ready to trade.
The workflow diagram below provides the steps for minting an NFT by the various actors: the developer, the marketplace, and the Blockchain node. In this case, the developer refers to someone who understands the NFT development’s intricacies and represents the original NFT owner. Also, this workflow assumes that the underlying Blockchain is the Ethereum network.
- Step 1- Account Creation: Account Creation: The developer creates a new account on the marketplace. Additionally, a wallet account is also required to be linked to the market to pay the platform and GAS (or equivalent) fees.
- Step 2 – Backend Infrastructure Setup: The marketplace spawns a new Blockchain node to host the NFT’s smart contract. This step is followed by a series of operations to create, host, and confirm the smart contract. This process is mainly templatized for the usual NFT artifacts, such as digital artwork. For custom NFT artifacts, the developer must write a specific smart contract and get it approved. This step is usually taken care of by the marketplace itself. However, developers have to set up their Blockchain node in a self-hosted marketplace or standalone NFT hosting without listing on a marketplace.
- Step 3 – NFT Store Setup: This is mostly configuration stuff where the developer selects from one of the many options provided by the marketplace. These options include setting up the storefront UI themes for the NFT and setting the linked images and metadata. The auctioning parameters, including price ranges, are also part of this step.
- Step 4 – Minting Initiation: Once the NFT owner is happy with the store and auction settings and has uploaded all the metadata associated with the artifact, the developer initiates a request to the marketplace to mint the NFT.
- Step 5 – Minting: This is the step where all behind-the-scenes Blockchain consensus wizardry happens. If all goes well, the newly minted NFT is registered on the ledger, and its hashcode is returned. The success of this step is contingent on the payment clearance for the minting fees to the marketplace and the Blockchain network’s GAS fee.
- Step 6 – Open for Sale: At this point, the NFT is minted, which means that its unique hash is registered and tagged to the corresponding smart contract. This information, along with additional metadata, is made available on the marketplace to facilitate the auction of the NFT.
The result is a newly minted NFT that has its online store front and is publicly tradable on the Blockchain.
Buying / Selling NFT
A person wanting to buy an NFT can do so via the marketplace interface by participating in the bidding process. Alternatively, a seller can directly deal with a buyer to sell the NFT. In both cases, the end result is a transfer of ownership of the NFT.
Considering the same actors involved in the minting of NFT, the sequence of buying that NFT would look somewhat like this.
NFT Libraries and Tools
Of all the wallets, Metamask is the most popular choice for developers. It is a software crypto wallet used to interact with the Ethereum blockchain. It allows users to transact in ETH and supports browser extensions and mobile apps.
There are also platform-associated wallets if the NFT is hosted on a specific platform that supports such wallets. For example, the NEAR wallet complements the NEAR platform to store and stake NEAR tokens securely. There are also aggregated wallets, such as Coinbase, which lets users transact and hold crypto assets and NFTs across multiple platforms. It also supports integrations via browser extensions and mobile SDKs.
For hardware wallets, Ledger is a good option. It is highly secure and comes with a Bluetooth interface to access the wallet balance from an app.
Pinata offers an IPFS storage service for NFT. It has developer-friendly support for integrating APIs and SDKs with any NFT application. As an additional security measure, Pinata offers a Submarining feature that allows users to attach data to an NFT and control who can view it based on ownership of the NFT.
dApps form the basis of the user interface with the NFT workflow. As such, traditional app frameworks can work well as dApp if they interact with a Blockchain node via an API. However, most Blockchain networks do not use the de-facto REST / JSON-based API interface. Therefore, it is better to use one of the client dApp SDKs embedded in the frontend application that interacts with the backend Blockchain.
Ethers.js is also an open-source library that interacts with the Ethereum blockchain and its ecosystem. It is equally popular as web3.js but uses a different architecture to handle the backend Blockchain network connections.
Tatum JS SDK is a good option for supporting multiple Blockchain networks. It also offers a toolchain consisting of a CLI and a key management system for secure handling of private keys.
If you are looking for a PaaS offering that provides the SDKs and the infrastructure for hosting your Blockchain node, Alchemy is a great choice. They support Ethereum, Solana, and a few other networks and have a rich suite of libraries for building NFT and other crypto-centric dApps.
Infura is yet another PaaS offering for building dApps. Besides the SDKs and Node infrastructure, Infura has an advantage for developing NFT dApps since it also provides an IPFS platform for storing NFT artifacts.
Just like dApps, smart contracts also have their own quirks. These are written in different languages, which are not among the mainstream programming languages. Moreover, smart contracts are designed to execute in specific environments, unlike typical program runtimes. Finally, security is a primordial consideration for writing these contracts as we deal with crypto assets that may be worth a lot.
Truffle is one of the popular choices for development frameworks on Ethereum. It offers a suite of tools for compilation, linking, deployment and binary management, and Automated testing of smart contracts. Apart from Ethereum, it also supports Quorum, Tezos, Corda and a few other Blockchain platforms.
If you are looking for security Solidity contracts which are community reviewed, and tested for real-world deployment, OpenZepplin provides a library of such battle-tested contracts.
For Python fans, there is Brownie which is a Python-based development and testing framework for smart contracts for the Ethereum network.
- Mihir Udupa: Blockchain platform research and analysis
- Anwesa Roy: Content preparation and editing