lunaray
13 min readJan 18, 2022

NFT(Non-Fungible Tokens)

The article aims to spread basic knowledge on blockchain security, Welcome to follow us and discuss

Author: Yue

support@lunaray.co

0x01 Development Path

  • The earliest concept of NFT was proposed by Hal Finney in 1993 when he explained the Crypto Trading Cards (Crypto Trading Cards).However, due to the limitations of technological development at that time, NFT only existed in theory.
  • In June 2017, CryptoPunks, the world’s first NFT project, was released on Ethereum.
  • In October 2017, the DapperLabs team launched an encrypted cat game called CryptoKitties, which pushed NFTs to high
    tide. In the same year, its CTO Dieter Shirley first proposed the concept of NFT.
  • From 2018 to 2019, the NFT ecosystem has grown on a large scale, and more than 100 projects have been developed. Under the leadership of OpenSea and SuperRare,NFT transactions are more convenient and perfect. The application field of NFT has gradually expanded from games and artworks to music, etc. Implementation of the combination of NFT and DeFi Gamefi, to promote the further development of NFT.
  • 2021 will enter a period of rapid expansion. On March 11, 2021, artist Beeple’s work “Everydays: The First 5000”Days sold for US$69,346,250 on Christie’s official website (equivalent to about 450 million yuan), making it the most expensive NFT art.It also became the third-highest auction.price for a work by a living artist. Celebrities from all walks of life cast and buy NFT arousing attention from all walks of life, stacking up
    The blockchain game Axie Infinity continues to heat up in the Philippines with the Play to earn model.

0x02 Basic Concepts

  • In June 2017, CryptoPunks, the world’s first NFT project, was released on Ethereum.
  • Non-Fungible Token, NFT is a kind of architecture based on blockchain technology, which cannot be copied, tampered,A divided encrypted digital proof of rights and interests, which maps physical assets such as physical collectibles and virtual assets such as images, music, and game props.
  • FT (FungibleToken) is also a homogenized token. Taking Ethereum as an example, each Ethereum is homogenized, and there is no mutual
    any difference and can be split into smaller units. And each NFT has a unique and unique identification, which cannot be interchanged in two, nor can it be split.
  • The core value of NFT lies in “digital content assetization”, relying on blockchain technology to ensure the uniqueness, authenticity and permanence of digital assets, enhance their liquidity, and effectively solve the problem of right confirmation of on-chain assets, and solve the pain point of copyright protection .

0x03 Technical composition

Blockchain:Blockchain was first known as the distributed ledger of Bitcoin. Blockchain is a distributed and immutable,Database, which is essentially a list of recorded data information, and uses encryption protocols to protect the information in it. Blockchain for long-term storageThe Byzantine problem in , provides a feasible solution.

Smart contract:Smart contracts speed up the execution and verification process of digital agreements. Blockchain-based smart contracts use Turing’s complete scripting language to achieve compatibility of complex functions, and rely on consensus algorithms for execution to ensure consistency. Smart contracts make it possible to conduct fair transactions without relying on third-party credit intermediaries, and realize cross-industry, cross-domain, and cross-ecological value interaction.

On-chain transactions:On-chain transactions need to be implemented through blockchain addresses and transaction instructions. A blockchain address consists of a fixed number of letters, numbers and characters, and it is a unique identifier similar to a bank account for users to send and receive assets. And there is a pair of public and private keys corresponding to each other to verify the authenticity of the transaction.

Data encoding:With data encoding, files can be compressed into an efficient format to save storage space. When confirming the ownership of NFT assets, it is actually confirming the hash value signed by the NFT creator. Others can copy these metadata, but they cannot prove their ownership right.

0x04 Protocol Standard

The underlying logic of NFT is based on distributed ledgers, and its transactions rely on peer-to-peer networks. If the distributed ledger of blockchain is regarded as a special type of database, then NFT will be stored in this database. . The actual storage status of NFTs is a bit more complicated. If this database has basic security, consistency, integrity and availability characteristics, then the entire NFT ecological closed loop mainly includes the following scenarios.

  1. Digitization of NFTs: NFT creators will check whether the file, title, description sentences are completely accurate, and then convert the metadata of the NFT in the appropriate format
  2. NFT storage: NFT creators can choose two ways to store metadata on-chain and off-chain. On-chain storage costs are high and traffic is congested, but metadata will exist permanently with the token. Off-chain storage is less restrictive but theoretically There is a risk of metadata loss. At present, the solutions available for off-chain storage include centralized data storage, IPFS and decentralized cloud storage.

On-chain storage:At present, the blockchains used by NFT mainly include public chains such as Ethereum, Flow, and BSC, and side chains such as Polygon and Ronin. Limited by the high gas costs and congested communication conditions on the chain, most NFT projects choose to only store the ownership data of NFTs on the chain to ensure the non-tampering, traceability, and non-repudiation of ownership. Transactions do not need to be intermediary through a centralized trust agency, but can be completed directly through smart contracts on the chain, giving NFT good liquidity and using technology that is not controlled by any third party as a credit intermediary.

off-chain storage:At present, NFT off-chain storage methods mainly include four methods: centralized, centralized verifiable, decentralized and decentralized repairable Mode.

3.NFT signature:The NFT creator signs the information, including the hash of the NFT data, and sends it to the smart contract.

4.NFT Minting and Trading:After receiving the complete information of the NFT, the smart contract can start minting and start the transaction process.The main mechanism is formulated by the token standard.

5.NFT confirmation:Once the transaction information is confirmed on-chain, the NFT minting process is complete, and the minted NFT will be permanently linked to a unique blockchain address to prove its existence. However, the actual content of NFT is usually stored off-chain, and the ownership of NFT belongs to two storage systems.

0x05 Protocol Properties

NFT is essentially a dApp, that is, a decentralized application, so it has various characteristics from the underlying public ledger, which can be roughly summarized as follows.

  • Verifiability:Token metadata and ownership of NFTs are publicly verifiable. This premise is that metadata is stored on-chain, and if it is stored off-chain, the off-chain storage system decides whether it can be publicly verified. Centralized storage is not publicly verifiable, and device owners can to change the data at will; IPFS can verify whether the data has been tampered with through CID, but cannot verify the storage status; MEFS and other decentralized.The cloud storage system can not only verify whether the data has been tampered with, but also verify the storage and redundancy status of the data.
  • Transaction transparency:The entire process of NFT from minting to selling to buying is open and transparent. However, the storage of NFT metadata and media data is not completely open and transparent. NFT creators will choose their own storage methods, But the security of most storage methods cannot be clearly assessed.
  • Availability:The system on the chain that NFT relies on will never be paralyzed. As long as it is an issued NFT, there is no possibility that it cannot be sold or purchased. However, the data stored under the NFT chain will be at risk of being unavailable. At present, apart from the complete risk control measures of decentralized cloud storage systems such as MEFS, centralized storage and IPFS have no control measures.
  • Tamper-proof:NFT metadata and complete transaction records, once confirmed, are permanently stored, and only new information can be added, and past information cannot be modified. If metadata is stored in a centralized server, service operators can tamper with data at will, IPFS and
    File systems such as MEFS are immutable.
  • Easy to circulate:The information seen by each NFT user is updated instantly, eliminating the information barriers between traditional producers-credit intermediaries-buyers, and the information is clear and easy to circulate.
  • Tradability:NFTs and their corresponding products can be traded and exchanged at will. The storage standard of NFT is the main support for its value, and the value composition of the NFT traded needs to be considered.

0x06 underlying protocol

At present, there are mainly three underlying protocol standards for NFT, namely ERC721, ERC1155 and ERC998. There are differences among the three underlying protocol standards. In addition to the three major NFT standard protocols, there are also EIP1948 (NFT that can store dynamic data), EIP2981 (focusing on NFT royalties)Ethereum protocol), ERC809 (rentable NFT), etc.

ERC721

  • The first NFT underlying protocol standard is also the most commonly used form of token in the NFT ecosystem at this stage.
  • Created and published by Dieter Shirley, CTO of CryptoKitties.
  • Dieter Shirley is one of the founders of NFT. He participated in mining investment activities at the beginning of Bitcoin, and later became the chief architect of the public chain Flow in the NFT field.

ERC1155

  • Created and published by Dieter Shirley, CTO of CryptoKitties.
  • Standard has the properties of a semi-fungible token.
  • The difference from ERC721 is that ID is no longer an item, but a category. Sending smart contracts based on a category can transfer a large number of multi-class assets at the same time, which significantly improves the transfer speed and can meet the flexible applications in different scenarios.
  • ERC-20 and others What highlights the ERC-1155 token protocol standard compared with other standards is that it achieves cross-chain compatibility.

ERC998

  • For composable non-fungible tokens (CNFT for short), the protocol standard can include multiple ERC721 and Tokens in the form of ERC20.
  • Using this protocol standard to generate tokens enables one transfer to package all different types of tokens.

The standard functions of the three underlying protocols of NFT are a gradual upgrade process:

  • From ERC721 to ERC1155, the transfer of tokens can be more convenient and low-cost;
  • From ERC1155 to ERC998, token package transactions and multi-scenario applications can be realized.

0x07 Industry chain

The NFT industry chain includes the upstream infrastructure layer, the midstream project creation layer (protocol layer), and the downstream derivative application layer.

Upstream

The upstream infrastructure layer provides infrastructure support for NFT minting and trading.

  1. NFT is an encrypted digital property right certificate based on blockchain technology. The casting, issuance, circulation and derivative applications of NFT require a relatively mature and highly usable blockchain and its underlying ecology (development tools, storage, wallets, etc.) are used as the underlying infrastructure support.
  2. The NFT infrastructure layer is responsible for the recording and settlement of value, building the security and finality of the entire NFT ecosystem.
  3. The development space of NFT mid- and downstream applications is limited by the performance and interoperability of the upstream NFT infrastructure layer.
  4. The Ethereum NFT ecosystem developed earlier, and has formed non-homogeneous token protocol standards such as ECR721 and ECR1155. It is the absolute overlord of the current infrastructure in the NFT field.

The construction of the NFT infrastructure layer includes the following:

  1. peer-to-peer internet protocol(Devp2p,Libp2p)
  2. Platform-neutral Computation Description Language(EVM,WASM,UTXO)
  3. Data storage protocol (decentralized data storage bottom layer: IPFS)
  4. Version:0.9 StartHTML:0000000105 EndHTML:0000001175 StartFragment:0000000141 EndFragment:0000001135
  5. Trustless interactive platform, trustless interactive protocol(Palkadot / Ethereum,WAX,Enjin)
  6. Transient data transfer(Whisper,Matrix)

NFT Basic Solutions Market

For a single NFT project, especially a new project, it is difficult for NFT to form a large-scale market due to the limitation of high Ethereum fees (high gas fee), serious network congestion, and poor user experience.

Three infrastructure solutions other than Ethereum (solving issues such as Ethereum transaction speed, transaction cost and user experience)

  1. One is other Layer 1 blockchains that are friendly to NFTs in addition to Ethereum. High-quality public chains suitable for NFT development include Flow and Near.
  2. The second is the side chain, including Polygon, xDai and Ronin.
  3. The third is Ethereum’s Layer 2 scaling solution including Immutable X.

Midstream

The creation layer of the midstream project mints NFT according to the minting agreement and issues it in the primary market

  1. Midstream project creation layer — NFT projects have a high concentration, and the top 5 projects in historical transaction volume account for more than half of the market share.
  2. Midstream project creation layer — NFT is concentrated in the fields of collectibles, artwork and games.
  3. Collectibles Project CryptoPunks: Scarcity Hierarchy Establishes Collectible Value.
  4. Collectibles Project Bored Ape Yacht Club (BAYC): Social Capital and Community Building.
  5. Blockchain Game Project Axie Infinity-Introduction to Game System.

Downstream

The downstream derivative application layer derives the NFT secondary market, data platform and social platform, etc. around the NFT minted in the primary market.

  1. Value capture at this level is mainly based on traffic and demand monetization, such as social networking and curation, how to gather traffic and monetize is the core value points.
  2. Currently active secondary crypto trading platforms include OpenSea, Nifty Gateway, MakersPlace, Rarible, SuperRare and VIV3, which also provide primary market minting and issuance services.
  3. Founded in 2017, OpenSea is the first and currently the world’s largest NFT comprehensive trading market, providing users with casting, exhibition,show, trade, auction NFT.

0x08 Deploy the public chain

Timeline

  • Ethereum is the earliest underlying main chain of NFT, which has limitations — network congestion;
  • The Ethereum blockchain experienced massive network congestion in late 2017, bringing CryptoKitties to a standstill
  • Dapper Labs decided to develop a new type of blockchain — Flow

Public chain

Flow achieves massive scalability without the need for sharding, providing high-speed, low-cost transactions. Based on a unique multi-role architecture, Flow offers massive improvements in speed and throughput, while maintaining a developer-friendly, ACID-compliant environment.

Ethereum is also developing its own layer2 scaling technology, Polygon is Ethereum layer2 (such as Optimistic Rollups, kRollups and Validium etc) aggregators, any application built on Polygon can be based on the security level required by its application.Don’t choose any of these scaling solutions. NFT projects deployed on Polygon include Aavegotchi, Neon District, Decentral Games, Battle Racers, Doki Doki, etc.

0x09 Application Scenario

Game:NFTs based on blockchain technology can record the status and achievements of players in the game, and save the list of items obtained in the game, such as weapons, power supplies, vehicles, characters, etc. The CryptoKitties mentioned above is the most typical example.

Art:Artists can own the copyright to their own artwork, and buyers can be sure that the artwork they buy is authentic. For example SuperRare,
Nifty Gateway, Rarible, etc. Here we focus on the innovation of NFT in the field of music. NFTs were originally static, but we have seen their gradual evolution from still images to motion graphics and audio. Audio NFTs are technically no different from other NFTs except for their file format, but they are primarily multi-dimensional presentations by fusing audio clips with underlying images or video.

Create a virtual world:Decentraland, The Sandbox and other decentralized virtual reality platforms provide users with a Metaverse.Decentraland is a 3D virtual world, a decentralized VR platform based on Ethereum, users can fully control the content environment and applications created by themselves, the territory in the game is permanently owned by the community, and players can fully control their own creations and virtual assets.

Financial product:Thanks to the boom in DeFi, financial products can also be tokenized in the form of NFTs. Tokenized policy as a unique
NFTs can be transferred, bought and sold, and in some cases, can also be earned. Compared to the mountains of red tape in traditional insurance
Today, users only need to fill in the required encrypted asset items and amounts to obtain insurance policies, and the efficiency is greatly improved. For example:yInsure, iearnfinance, etc.

0x10 Trading Platform

OpenSea:Founded in 2018, OpenSea is a blockchain-based global marketplace for buying and selling digital items. OpenSea is positioned as an industry-leading decentralized exchange that provides peer-to-peer Ethereum NFT transactions. The platform can trade both NFT tokens and NFT assets.

Nifty Gateway:It is a regulated money market where users can buy NFTs with a credit card on the platform and cash out directly into a bank account when selling.Nifty Gateway has also updated the Prepaid ETH function, hoping that Ethereum users will be in the same interaction speed loop as credit card users.
territory.

MakersPlace:Released in 2016, it focuses on casting corresponding NFTs for real artworks. Each digital asset a collector acquires is a unique asset signed and issued by the creator. Even if someone else copies the digital work, it will not be an authentic or original signed version. The platform connects artists with art lovers and collectors through a network of marketplaces and partners.

Rarible:As mentioned above, it is a platform for creating and selling digital collections powered by blockchain. Users can create and display their own artwork, orBuy art with Ethereum tokens to collect. Buyers and sellers can transact on the Rarible marketplace at negligible cost.

SuperRare:Founded in 2017, following the ERC721 standard, the entire history and origin of artworks can be traced on the distributed ledger, and no one can cheat and cheat. Once sold, they can be resold at any price on various NFT trading platforms.

VIV3:Released in 2021, it is the first comprehensive marketplace on the Flow public chain, aiming to realize the beginning of the transition from physical ownership to digital ownership.

0x11 Investment method

There are three main ways to invest in NFT, buy NFT tokens, buy NFT assets or participate in liquidity mining.

1.If you directly buy the tokens of the NFT concept, you can buy tokens such as ENJIN, MANA, SAND, etc. on major exchanges
some NFT tokens.

2.If you want to participate in the NFT collectibles market, general NFT marketplaces like OpenSea provide a channel to purchase various NFT assets. There are also dedicated crypto-art NFT platforms such as SuperRare and Nifty Gateway.1.If you directly buy the tokens of the NFT concept, you can buy tokens such as ENJIN, MANA, SAND, etc. on major exchanges
some NFT tokens.

3.Liquidity mining, DeFi + NFT combination application with high returns but high risk and instability.

0x12 related risks

Counterfeit:When users mint or trade NFTs, malicious attackers may exploit authentication vulnerabilities or steal user private keys to illegally gain ownership of NFTs. It is recommended to formally verify NFT smart contracts, and use cold wallets to isolate online data to prevent private key leakage.

Information leakage:Information disclosure corresponds to confidentiality, and refers to the disclosure of NFT-related information to unauthorized users. Since in the NFT system, the status information and transaction instruction codes of smart contracts are completely transparent, and anyone can access them publicly.

lunaray
lunaray

Written by lunaray

Lunaray takes a leading position in smart contract auditing and consulting service for blockchain security.

No responses yet