What is the ERC-721 standard, and how is it related to NFTs?

红 李
红 李
Seasoned crypto investor, active in Ethereum; 资深加密投资者,深度参与以太坊。

Alright, no problem.


What is the ERC-721 Standard? And how is it related to NFTs?

Hey friend. That's a great question, and one that often confuses people new to blockchain. I'll try my best to explain it in plain language.

So, what exactly is ERC-721?

You can think of it as a "birth certificate template" for "digital collectibles".

In the real world, if you buy a famous painting, there's a certificate to prove it's authentic and belongs to you. This certificate has a fixed format, for example: the work's title, artist, creation year, current owner, and so on.

The ERC-721 standard on Ethereum plays this "certificate template" role. It's not a specific collectible itself, but rather a set of unified, public rules. These rules are written in code (i.e., a smart contract), and they specify what basic functionalities a valid "digital collectible" must possess, such as:

  • ownerOf(tokenId): To query who currently owns a specific numbered collectible.
  • transferFrom(from, to, tokenId): How to securely transfer this collectible from one person to another.
  • balanceOf(owner): To query how many such collectibles an individual owns.
  • tokenURI(tokenId): The "identity card" for this collectible, pointing to a file link containing its detailed information (e.g., image, name, description).

In simple terms, ERC-721 is an officially recognized technical standard used to create and manage "unique" digital items.

Because everyone adheres to this standard, a digital artwork you buy from Project A, and an in-game item you acquire from Game B, can both be recognized and traded on secondary markets like OpenSea. It's like how shipping containers worldwide use the same size standard, allowing them to be used universally in any port or on any cargo ship.

So, what's its relationship with NFTs?

The relationship is very direct: ERC-721 is the "blueprint" and "mold" for creating NFTs, while an NFT is the unique "product" created using that "blueprint" and "mold".

NFT stands for Non-Fungible Token.

  • "Token" refers to a digital asset on the blockchain.
  • "Non-Fungible" is the key; it means "unique and irreplaceable".

The 10 yuan in my hand and the 10 yuan in yours can be freely exchanged; they have the exact same value – that's what "fungible" means. But my house and your house can't be freely swapped; their location, size, and decor are all different, making them "non-fungible".

The core purpose of the ERC-721 standard is to technically imbue tokens on the blockchain with the "non-fungible" characteristic. Each token created according to the ERC-721 standard has a unique identifier (Token ID), just like a person's ID number, which is never duplicated.

Let's take an example to make things clearer:

  1. A digital artist wants to release his painting, 'Cat Under the Starry Sky,' on Ethereum.
  2. He will use a smart contract (the mold) that adheres to the ERC-721 standard.
  3. He performs a "minting" process through this contract, which generates an NFT (the product) representing this painting.
  4. This NFT is assigned a unique ID on the blockchain, for example, '#123'. The blockchain will permanently record: this NFT with ID #123, its creator is this artist, and it represents the artwork 'Cat Under the Starry Sky'.
  5. When you purchase this NFT, the blockchain will publicly record: the NFT with ID #123 is now owned by you. This record is publicly transparent and unalterable.

In a Nutshell

ERC-721 is a set of technical specifications, it's the "blueprint"; an NFT is the unique digital item created according to these specifications, it's the "house". What we usually buy, sell, and discuss is that specific "house" (NFT), while the underlying "architectural standard" (the blueprint) called "ERC-721" is what enables it to be recognized and circulated.

I hope this explanation makes it clear!