Skip to main content
NFT

NFT – the digital ownership

By November 20, 2021August 19th, 2022No Comments9 min read

What is NFT?

NFT tokens have recently taken the headlines of all cryptocurrency portals by storm following the sale of digital images for exorbitant amounts. What sets them apart from other tokens?

NFT stands for a non-fungible token, which distinguishes it from “traditional” tokens underlying most cryptocurrencies. Let’s look at it this way. Say you lose a one-hundred-dollar bill, and someone not so honest finds it. Since the banknote is not assigned to any specific owner, the finder can easily use it as payment at a store. Accordingly, it is a fungible (exchangeable) resource. If an item costs one hundred dollars, we can pay for it using any banknote of equivalent value.

Cryptocurrencies are seen as a technology that stands to challenge the financial world. In modern times, when traditional money is printed (or “clicked”) and duplicating something in the digital world is practically free, Blockchain was introduced to bring back value to virtual resources and, thanks to the cryptographic safeguards embedded in it, prevent cryptocurrencies from being created at will. And it achieved just that. Owing to the consensus algorithm and the Blockchain network structure, every new block must be supported by proof of the work done (Proof-of-Work) or another consensus mechanism.

NFT and cryptocurrencies

Although its concept dates back much earlier, NFTs did not take off until 2017 and the release of CryptoPunks and CryptoKitties, unique collectible avatars whose proof of ownership is stored on an NFT token. The scope of these projects and their token valuations were already staggering back then.

From a technical standpoint, NFT was standardized with the submission of EIP-721, a proposal that resulted in the subsequent implementation and introduction of the ERC-721 standard to the Ethereum network.

What are EIPs and ERCs?

EIP stands for Ethereum Improvement Proposal, which describes proposals for potential updates to the Ethereum platform. EIPs document technical change proposals and serve as the primary source of truth within the community. All changes to Ethereum started as a description within an EIP.

ERC, i.e. an Ethereum Request for Comments, is a type of EIP that defines changes in the Ethereum Blockchain’s operating standards underlying smart contracts, token standards, wallets, name registries, URI schemes and library formats.

ERC-20

Let’s start from the beginning, specifically from ERC-20, which the makers of Ethereum simply call a token standard, i.e. the basis for the operation of the entire network.

ERC-20 is a fungible token standard whereby if the value and type of token are the same for two tokens, the tokens must be identical as in the example with banknotes above.

The standard describes the basic functionalities, such as rules for transferring tokens between accounts, getting the balance of an account and the supply of tokens in the entire network.

If a smart contract implements the methods contained in the interface shown in ERC-20, it may be considered an ERC-20 token contract.

Let’s take a closer look at specific methods found in the documentation:

function name() public view returns (string) 
// returns the token name

function symbol() public view returns (string)
// returns the token type

function decimals() public view returns (uint8)
// returns the number of decimal places supported by the token

function totalSupply() public view returns (uint256)
// returns the supply of tokens in the network

function balanceOf(address _owner) public view returns (uint256 balance)
// returns the balance of the specified account

function transfer(address _to, uint256 _value) public returns (bool success)
// transfer tokens between accounts

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
// different implementation of the above

function approve(address _spender, uint256 _value) public returns (bool success)
// allows the user to spend funds up to a certain amount

function allowance(address _owner, address _spender) public view returns (uint256 remaining)
// returns the remaining number of tokens that can be spent from the given account

As you can see, the interface above defines the very basic functionalities for tokens, so it can be said that everything started with it 🙂

ERC-721

As of ERC-721, NFT has been officially defined and standardized in the Ethereum Blockchain. The most significant change introduced by this ERC is the addition of the tokenId parameter to the interface. This parameter is unique for every token and thus allows to differentiate between them.

Changes to this standard focus on token storage, transfer of token ownership and methods for querying the owner of a specific token (with a given tokenId). Most of the methods are identical to those presented in ERC-20, except for the addition of the tokenId parameter used to specify which token should be transferred from one account to another. It should be noted that ERC-20 used such elements as balance and withdrawal limits akin to a traditional bank account, while ERC-721 defines the transfer of specific tokens with specific addresses between accounts.

An illustration of the implementation of an ERC-721. The contract is available here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol

ERC-1155

ERC-1155 was proposed by a group of Enjin engineers who decided to combine the two previous standards into one and expand them with a few new features.

According to ERC-721, each new type of NFT token must have a separate definition and instructions for operation within the Blockchain, which causes its various implementations to only have slight differences as a majority of their code is copied and pasted. As a result, every single token must be transferred as part of a separate transaction.

Imagine that we emptied our entire shopping cart at a store checkout and have to pay separately for each item before the cashier can scan the next one.

This will not present any issues in the case of collectible NFT tokens representing digital art as such transactions are less common and typically are not used to make multiple trades between the same two accounts in short intervals. Now, let’s imagine a multiplayer game with hundreds of thousands of concurrent users.

Say, for example, that players roaming the virtual world have such items as weapons, ammunition, first aid kits, custom outfits and virtual currency. Players all over the world are constantly fighting one another, trading items or simply talking. If one player defeats the other, a portion of the losing player’s virtual money is transferred to the winner’s account, which is a perfect example of an ERC-20 fungible token. However, if players exchange personalized weapons or outfits, this is more within the realm of the ERC-721 standard. ERC-1155 takes the best of both worlds, adding the possibility of effecting many transactions at once and verifying them only at the end of a series.

A great benefit that comes from combining fungible and non-fungible tokens into one standard is that exchangeability can be rendered contingent on the context. Imagine a movie ticket for a screening with 300 seats. The cinema attendant doesn’t care about the ticket ID. The only thing he checks is whether we came to see the right movie at the right time. Accordingly, in this context, the ticket is a fungible token because each of the 300 tickets will grant entrance to the screening room. However, showing the same ticket at another cinema will not allow us to see the movie. This requires tickets with the correct cinema ID.

NFT boom

Recently, NFTs have surged in popularity following the sale of Everydays: the First 5000 Days (a compilation of works by Beeple, a digital artist) for USD 69 million, an event that made global headlines.

Everydays: the First 5000 Days

NFTs from the CryptoPunks universe are in second and third place with a supply of exactly 10,000 tokens. CryptoPunks is a collection of unique avatars featuring pixelated characters on a variety of backgrounds.

The most expensive one was punk id #3100, which sold for USD 7.58 million, making it the second most expensive NFT in the world.

CryptoPunk #3100

In third place was CryptoPunk id #7804, which set the buyer back USD 7.57 million.

CryptoPunk #7804

Other use cases

The examples given are related to digital art, but do NFTs have other applications?Of course. This process is already well underway.

One example is domain registration and assignment. Traditional domains allow for the assignment of human-readable addresses to IP addresses, which can be entered in the browser, e.g. the address of your favorite Blockchain blog is 104.18.129.189 and its domain is chainkraft.com. The two are linked together by the DNS (Domain Name System).

In the case of Blockchain-based domains, a human-readable name can be assigned to any address in the network. Let’s take a specific wallet address in the Ethereum Registry: 0xd8da6bf26964af9d7eed9e03e53415d37aa96045. A bit hard to read, isn’t it? However, Vitalik Buterin, one of the creators of Ethereum, assigned a domain to this wallet: vitalik.eth, which makes it much easier to link to the wallet in applications. The organizations responsible for managing domain addresses in the Blockchain are CNS (Crypto Name Service) and ENS (Ethereum Name Service).

Each domain registered in CNS is represented by a token based on the ERC-721 standard. The two main components of the system are the Registry, a map that points to the domain owner’s address, and the address of the Resolver of the given domain. The Resolver is responsible for assigning the domain to a specific address in the Blockchain (e.g. cryptocurrency wallet address).

CNS mechanism (source: unstoppabledomains.com)