Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update learn-nft.md. New content propopsal. #6538

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
146 changes: 76 additions & 70 deletions docs/learn/learn-nft.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,108 @@
---
id: learn-nft
title: NFTs
sidebar_label: Introduction to NFTs
description: The NFT Landscape of the Polkadot Ecosystem.
keywords: [NFT, non-fungible token, NFT 2.0]
slug: ../learn-nft
---
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

This page is a high-level overview of NFTs in the blockchain space and the various approaches to
NFTs within the Polkadot ecosystem.

This page is a high-level overview of NFTs in the blockchain space and the various approaches to NFTs within the Polkadot ecosystem.

## Fungibility

NFT stands for _non-fungible token_. Fungibility means interchangeability inside of a group. In
theory, a $20 bill is always worth $20 in a store and identical in value to any other $20 bill. It
is not, however, fungible with a $1 or $100 dollar bill (outside its group).
NFT stands for non-fungible token. Fungibility is defined as interchangeability inside of a group. All valid issued $1 notes are a group to itself. A $1 note is always interchangeable with any other $1 note. It is not, however, interchangeable with $20, $50 or $100 dollar notes (these are separate note groups).

A fungible item may be unique. In the currency note example, each issued note has a serial number making it a unique member of the group

![one dollar](https://www.investopedia.com/thmb/Nr-RLORu5CX_lIWZfLmV5X0eIrc=/613x345/smart/filters:no_upscale%28%29/Clipboard01-d20f6eb9351e4f36a46e11fd87b53b2d.jpg)

A case where a fungible item is not unique is a simple plastic betting chip. Each chip in its pristine state is indistinguishable from any other chip and each is interchangeable within its own group.

Each NFT is a unique item attributed with an identity.
FFilipUnique marked this conversation as resolved.
Show resolved Hide resolved

## NFT Anatomy

Every NFT has three common components irrespective of the chain it belongs to or originates from that make it unique.

A Pokemon™ trading card of a Charizard is non-fungible with a card of Squirtle, whereas editions of
Charizard are fungible with each other.
- Identity
- Ownership
- Metadata

Fungibility is a spectrum - what is fungible to some might not be fungible to others. In reality,
Pokemon™ cards, the canonical example of non-fungible assets are more fungible than US dollar
bills, each of which has a unique serial number that may be important to a government agency. The
cards have no serial numbers [1].
Ownership is determined via a contract or a wallet address.

![one dollar](<https://www.investopedia.com/thmb/Nr-RLORu5CX_lIWZfLmV5X0eIrc=/613x345/smart/filters:no_upscale()/Clipboard01-d20f6eb9351e4f36a46e11fd87b53b2d.jpg>)
Identity can be defined via a property, address or a contract.

Additionally, a digital item like a "purple magic sword" in a game may be fungible with another
visually identical sword if all the player cares about is the looks of their character. But if the
other sword has a different function, and that function influences the outcome of an adventure the
player is about to embark on, then visually identical swords are absolutely non-fungible.
Metadata can be a single reference to an off-chain object (digital asset or contract) or, in case of advanced NFTs, an elaborate data structure containing both on-chain data and off-chain references.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

Bearing that in mind, the simplest explanation of NFTs is that **NFTs are rows of arbitrary,
project-specific, and non-interchangeable data that can be cryptographically proven to "belong" to
someone**. This data can be anything - concert tickets, attendance badges, simple words, avatars,
plots of land in a metaverse, audio clips, house deeds, mortgages, and more.
## NFT Purpose

What purpose does a unique digital asset provide? The answer to this question lies in the two distinct ways an NFT is utilized.

The first is use of NFTs as a speculative store of value derived from its uniqueness (rarity, implied or intrinsic worth). This is the initial novelty aspect of NFTs that initiated an era of collectibles, tradeables and instantiated the appearance of the mass markets where NFTs were traded as a commodity. This is also recognised as the era of the simple NFT or otherwise known as static NFT. The Uniques pallet was created to facilitate this implementation of the NFT.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

The second implementation is as a utility. As mentioned when we defined an NFT, it can store data on-chain. By convention we call this NFT component the NFT’s _metadata_. In the most general sense an NFT is an independent, sovereign data record. This is wherein the utility aspect of an NFT lies. An NFT can be a digital key, a collection of documents, an atomic data fragment or a unique personal set of related assets and information that can be owned.
FFilipUnique marked this conversation as resolved.
Show resolved Hide resolved

These two roles are not mutually exclusive. An NFT can be a store of value only, a value-less utility token exclusively or both at the same time if it has a worth on a market as a utility token, or inversely if it is primarily a token of worth with additional utility.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

It is the utility aspect of the NFTs that has been the driving force behind the development of and transition to the advanced NFT concept central to Polkadot’s NFTs pallet development.

## NFT Standards

A general-purpose blockchain is not built to natively understand the concept of NFTs. It is only
natively aware and optimized for its own native tokens, but implementations built on such a chain
are essentially "hacks".
Due to its heterogeneous nature, the Polkadot ecosystem supports differing implementations of NFTs. Polkadot’s core blockchain technology is based on Substrate. Accordingly, NFTs created in substrate-based context are called “native” NFTs. Native NFTs are created through dedicated methods available in pallets, collections of functions written as Wasm code. Polkadot Uniques and NFTs pallets and Unique Network’s NFT utility pallet bundle provide a way to do this. Here a common standard for metadata may provide direct interoperability and efforts in that direction are being made through the XCM initiative ([RFC-0125: XCM Asset Metadata](https://polkadot-fellows.github.io/RFCs/approved/0125-xcm-asset-metadata.html#rfc-0125-xcm-asset-metadata)).

Polkadot’s Ink! language for writing contracts in Substrate provides a separate mechanism for creating NFTs. Astar has been spearheading this effort and one example of this is their [PSP34](https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md) (Polkadot Standards Proposals) initiative for standardizing NFTs using the Contracts pallet.

For example, Ethereum is a general-purpose blockchain that does not have the concept of "tokens"
(fungible or not) built-in. Tokens in Ethereum are essentially spreadsheets of information to be
interpreted and read in a certain way by various user interfaces. This _way_ in which they should
read them is called a _standard_.
The availability of Ethereum Virtual Machines (EVM) in the Polkadot ecosystem provides yet another way to create and manage NFTs using Solidity contracts just like on the Ethereum network. Such NFTs are built in adherence to the corresponding ERC standards adopted from the Ethereum network.

The most widespread fungible token standard you may have heard of is ERC20, while the most
widespread NFT standard is ERC721, followed closely by ERC1155. The downside of having to define
these standards is that they are always instructions for how to read a spreadsheet pretending to
serve information in a certain way, which by definition cannot be optimized. For this reason, even
on a good day of extremely low network congestion, interactions with NFTs on any EVM chain will cost
a few dollars but were on average around $100 per interaction (transfer, mint, sale) in 2021 on
Ethereum.
## Birth of NFTs - the EVM Domain
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

This prevents use cases that go beyond the current craze of _digital dust gathering NFTs_ on
Ethereum - profile pictures, generative "look once and then put away" art, [ENS](ens) addresses, and
[proof of attendance badges](https://poap.xyz/) (which have since moved to the xDAI chain to save on
gas fees).
A general-purpose blockchain is not built to natively support the concept of NFTs. It is only natively aware and optimized for its own native fungible tokens, and implementations built on such a chain are essentially "special case smart contracts".

### A typical [NFT on Ethereum](https://opensea.io/assets/ethereum/0x2127fe7ffce4380459cced92f2d4793f3af094a4/12598)
For example, Ethereum is a general-purpose blockchain that does not have the concept of "tokens" at all (fungible or not) built-in. Tokens in Ethereum are essentially spreadsheets of information to be interpreted and read in a certain way by various user interfaces via an executable code named a “smart contract”. An agreement on the structure of such a construct is declared a standard and is designated by the Ethereum Request For Comments (ERC) document.

The core NFT EVM standard is defined in [ERC721](https://eips.ethereum.org/EIPS/eip-721), but there are extended implementations that introduce some aspects of advanced NFT features like [ERC1155](https://ethereum.org/en/developers/docs/standards/tokens/erc-1155/).

The inability to combine standards implicitly is a significant shortcoming to this approach and introduces a necessity to create custom implementations of contracts for specialized use cases where one might desire combined features. Each ERC which provides an advanced NFT feature is an isolated subset. As will be shown later this is not the case for Polkadiot native NFTs.
FFilipUnique marked this conversation as resolved.
Show resolved Hide resolved

To facilitate the creation of advanced NFT tokens, a blockchain must provide a mechanism for overcoming these limitations as we’ll see in the upcoming section.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

A typical [NFT on Ethereum](https://opensea.io/assets/ethereum/0x2127fe7ffce4380459cced92f2d4793f3af094a4/12598)[​](https://wiki.polkadot.network/docs/learn-nft#a-typical-nft-on-ethereum)\*\*

![samurai nft](../assets/nft/samurai.png)

For the sake of comparison, we can refer to these as NFTs 1.0: static NFTs that are almost
exclusively image-based collectibles of varying rarity.
For the sake of reference, we can refer to these as static NFTs that are almost exclusively image-based collectibles of varying rarity.

## NFTs in Polkadot & Kusama

This is where Polkadot's technology shines and where NFTs 2.0 come into play. By allowing
[heterogeneous application-specific shards](learn-parachains.md) to exist, builders can natively
optimize for complex NFT use cases without tradeoffs that would make interacting with the system
prohibitively inefficient and expensive in other environments.
As mentioned, the use of standardized pallets provide a decentralised processing mechanism through Wasm contracts which are specifically optimized for speed and advanced functionality of an NFT implementation. Two examples of this are the Polkadot NFTs pallet and the Unique Network’s collection of NFT utility pallets. This approach allows any parachain in the ecosystem to gain access to advanced NFT features without needing to build a contract framework from scratch.

With the introduction of NFT capabilities to the cross-chain messaging format (XCM) a direct inter-chain NFT transfer solution is becoming a reality. This topic is explored in more detail in the next chapter.

One important aspect of NFT interoperability hinges on the ability of differing networks to have a common agreement on metadata format. This greatly simplifies interoperability and removes the need for metadata conversion steps. In this regard, an effort is underway to make this a reality in this proposal [RFC-0125: XCM Asset Metadata](https://polkadot-fellows.github.io/RFCs/approved/0125-xcm-asset-metadata.html#rfc-0125-xcm-asset-metadata).

The other option of building a framework of Solidity contracts as the scaffolding for the advanced features within an EVM is also a viable option but is somewhat hampered by the necessity of using bridging mechanisms for cross-chain transfers and a lack of a derivative NFT solution. This approach has the limitations described in the previous chapter and It currently also exhibits much less efficient transaction processing than the native substrate solutions.
FFilipUnique marked this conversation as resolved.
Show resolved Hide resolved

:::info

See [this page](./learn-nft-projects.md) for more information about specific NFT project on Polkadot
and Kusama.
See [this page](./learn-nft-projects.md) for more information about specific NFT project on Polkadot and Kusama.

:::

## Bridging
## Cross-Chain Transfers

Transfer of NFTs across chains is one of the most engaging issues in all of blockchain space. In terms of the mechanism through which a transfer of the NFT can occur on the Polkadot network, two distinct approaches exist:

- Asset teleportation
- Asset reservation via sovereign account mechanism - derivative NFTs

Cross-chain transfers within the Polkadot Substrate ecosystem are exclusively executed through the XCM (Cross-Consensus Messaging) system. This system provides native, trustless security at the protocol level, eliminating the need for external bridge solutions. The XCM implementation significantly enhances security by removing the trustful aspect of the transactions which are typically required by bridge architectures and represent potential points of failure and a security risk in cross-chain communication.

NFT transfers can be decomposed into two independently transferable components:

- core asset properties, consisting of identity and ownership data, and
- optional metadata attributes.

In certain cross-chain operations, such as staking, complete NFT teleportation is unnecessary. This was demonstrated through a successful [XCM implementation between Unique Network and Acala](https://unique.network/blog/unique-network-cross-chain-nft-proof-of-concept-is-here/), where a derivative NFT was created on the Acala chain representing the original NFT from Unique Network. The derivative implementation required only core asset properties, as metadata transfer was nonessential for staking and collateral use cases where only identity and ownership verification are required.

Bridging to and from Substrate chains and EVM chains takes much effort but is a highly desired
feature in the NFT industry. Merging the collector and customer base has significant implications,
so multiple projects focus on making this possible.
On the other hand, teleportation, i.e. a full transfer of identity ownership and metadata may be the optimal solution in the case of a full asset migration and the only available option for bridging mechanisms.

Apart from RMRK (Substrate-to-Substrate seamless teleportation natively with [XCMP](learn-xcm.md))
and Efinity (Paratoken), the following efforts are underway:
Bridging to and from Substrate chains and EVM chains takes much effort but is a highly desired feature in the NFT industry. Merging the collector and customer base has significant implications, so multiple projects focus on making this possible.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

- [**MyNFT**](https://mynft.com/): an EVM to EVM bridging effort.
- **RMRK \<-\> EVM** Simplification bridge: a bridge developed during the
[RMRK hackathon](https://rmrk.devpost.com) for porting RMRK NFTs into simplified IOUs on EVM
chains
## What’s Next From Here?

## References
Utility NFTs are at a very early adoption stage.

- [1]: [Investopedia](https://www.investopedia.com/terms/l/liars-poker.asp)
- [2]:
[Unique Network's Chelobrick](https://unique.network/blog/chelobricks-making-waves-with-10-000-substrate-based-nfts/)
If you consider an NFT as an ownable, universal, digital encapsulation of data, NFTs have a role as significant as that of a smart contract. Real-world asset tokenization, tradable digital coupons, virtual digital keys and badges, bundles of utility, resource and accomplishment tokens, data wrappers… a likely advent of the era of discovery lays ahead.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved