Non-fungible tokens (NFTs) are unique digital assets whose ownership is recorded on a blockchain. Unlike ERC-20 tokens, where every unit is identical and interchangeable, each NFT has a distinct identifier and can carry unique metadata. The ERC-721 standard, finalized in January 2018, provides the technical specification for creating and managing these unique tokens on Ethereum and EVM-compatible chains.

NFTs have expanded far beyond their initial association with digital art. They now represent financial positions, domain names, gaming assets, real-world property deeds, identity credentials, and access passes. Understanding the underlying technical architecture is essential for evaluating NFT-based protocols and their role in the broader digital asset ecosystem.

The Concept of Non-Fungibility

Fungibility describes whether individual units of an asset are interchangeable. A dollar bill is fungible: any dollar can replace any other. A piece of real estate is non-fungible: each property has unique characteristics (location, size, condition) that make it irreplaceable.

In digital systems, non-fungibility is implemented by assigning each token a unique identifier (tokenId) within a smart contract. The contract maintains a mapping from each tokenId to its owner address. Two tokens from the same contract with different IDs are fundamentally different assets, even if they look similar.

The ERC-721 Interface

ERC-721 defines the minimum interface a contract must implement to manage non-fungible tokens:

Core Functions

  • balanceOf(address owner) returns the number of NFTs owned by an address (but not which specific tokens).
  • ownerOf(uint256 tokenId) returns the current owner of a specific token.
  • safeTransferFrom(address from, address to, uint256 tokenId) transfers ownership, checking that the recipient can handle NFTs (if it is a contract, it must implement the ERC721Receiver interface). This prevents tokens from being permanently locked in contracts that cannot interact with them.
  • transferFrom(address from, address to, uint256 tokenId) transfers ownership without the safety check. Used when the caller has verified the recipient independently.
  • approve(address to, uint256 tokenId) authorizes an address to transfer a specific token. Only one approved address is allowed per token at a time.
  • setApprovalForAll(address operator, bool approved) authorizes an address (an "operator") to manage all of the caller's tokens. This is how NFT marketplaces gain permission to transfer tokens on a user's behalf.
  • getApproved(uint256 tokenId) returns the approved address for a specific token.
  • isApprovedForAll(address owner, address operator) returns whether an operator is approved for all of an owner's tokens.

Events

  • Transfer(address indexed from, address indexed to, uint256 indexed tokenId) emitted on every ownership change.
  • Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) emitted on single-token approval.
  • ApprovalForAll(address indexed owner, address indexed operator, bool approved) emitted on operator approval changes.

Metadata: tokenURI and the JSON Standard

The optional ERC721Metadata extension adds name(), symbol(), and tokenURI(uint256 tokenId) functions. The tokenURI function returns a URL pointing to a JSON metadata file that describes the token's properties.

The metadata JSON typically follows this structure:

  • name: The name of the specific item (e.g., "CryptoPunk #7804").
  • description: A human-readable description of the asset.
  • image: A URL to the asset's visual representation.
  • attributes: An array of trait objects, each with a trait_type and value, used for filtering and rarity calculations.

This metadata architecture is what makes NFTs visually browsable in wallets and marketplaces. The smart contract itself stores only the tokenId and ownership mapping; the rich media and attributes live off-chain, referenced by the URI.

On-Chain vs Off-Chain Metadata

Where metadata is stored has significant implications for an NFT's permanence and trustworthiness:

Storage Method Permanence Cost Examples
On-chain (contract storage) Permanent, censorship-resistant Very expensive (gas per byte) Art Blocks, Nouns
IPFS (decentralized) Persistent if pinned Low (pin fees) Most major collections
Arweave (permanent storage) Designed to be permanent One-time payment Metaplex NFTs (Solana)
Centralized server (HTTP) Dependent on server uptime Minimal Some gaming NFTs
NFTs whose metadata is stored on a centralized server controlled by the project team can be altered or deleted at any time. If the server goes offline, the NFT loses its associated content. Always verify where an NFT's metadata is stored before making significant purchase decisions. IPFS content-addressed URLs (ipfs://...) are preferable to HTTP URLs.

ERC-1155: The Multi-Token Standard

ERC-1155, created by Enjin, is a more flexible standard that allows a single contract to manage multiple token types -- both fungible and non-fungible -- within the same deployment. Key advantages include:

  • Batch operations: Transfer multiple token types in a single transaction, reducing gas costs significantly.
  • Semi-fungibility: A token ID can have a supply greater than one, making it useful for items like event tickets (1,000 identical General Admission tokens) or gaming resources.
  • Reduced deployment costs: One contract replaces what would require separate ERC-20 and ERC-721 contracts.

ERC-1155 is widely used in blockchain gaming (e.g., Gods Unchained, Ember Sword) and by platforms that issue both fungible rewards and unique assets.

NFT Marketplaces and Trading

NFTs are traded on specialized marketplaces that facilitate discovery, listing, bidding, and settlement. The marketplace smart contract acts as an escrow, holding NFTs or ETH during the auction process. Major platforms include:

  • OpenSea: The largest general NFT marketplace. Uses the Seaport protocol, an open-source order book that supports English auctions, Dutch auctions, and fixed-price listings.
  • Blur: A trader-focused marketplace emphasizing speed, zero platform fees, and aggregated listings from multiple platforms.
  • Rarible: A community-owned marketplace with its own governance token (RARI).

Trading requires the seller to call setApprovalForAll for the marketplace contract, granting it permission to transfer NFTs when a sale is completed. This is a significant trust delegation.

Royalties: EIP-2981

EIP-2981 defines a standardized royalty information interface. It adds a royaltyInfo(uint256 tokenId, uint256 salePrice) function that returns the royalty recipient address and the royalty amount for a given sale price.

Critically, EIP-2981 is informational only. The NFT contract reports what royalty should be paid, but enforcement depends on the marketplace honoring it. The marketplace must read the royalty information and distribute funds accordingly. There is no on-chain enforcement mechanism that prevents zero-royalty sales. This has led to a "race to the bottom" in royalty enforcement as some marketplaces dropped mandatory royalties to attract trading volume.

Use Cases Beyond Digital Art

The perception of NFTs as merely digital art collectibles understates their utility:

  • DeFi positions: Uniswap V3 represents liquidity positions as NFTs because each position has unique parameters (price range, fee tier, liquidity amount). The NFT is the receipt for the deposited capital.
  • Domain names: Ethereum Name Service (ENS) domains (.eth names) are ERC-721 tokens. Owning the NFT means controlling the domain.
  • Gaming: In-game items, characters, and land parcels represented as NFTs can be traded, lent, or used across compatible games.
  • Real-world assets (RWAs): Property deeds, vehicle titles, and luxury goods certificates can be tokenized as NFTs, creating verifiable digital provenance.
  • Identity and credentials: Soulbound tokens (SBTs), proposed in EIP-5192, are non-transferable NFTs that represent credentials, certifications, or reputation.
  • Event tickets: NFT-based tickets prevent counterfeiting and enable secondary market controls (price caps, revenue sharing with event organizers).

Environmental Considerations

Ethereum's transition from Proof of Work to Proof of Stake in September 2022 (The Merge) reduced the network's energy consumption by approximately 99.95%. Prior to The Merge, NFT criticism centered on the environmental cost of PoW mining. Post-Merge, Ethereum's energy usage is comparable to that of a few thousand households, largely neutralizing this concern for Ethereum-based NFTs.

Key Takeaway

ERC-721 and ERC-1155 provide the technical foundations for non-fungible digital assets. While NFTs gained public attention through art and collectibles, their most impactful applications may be in DeFi position management, identity systems, and real-world asset tokenization. The permanence of an NFT depends heavily on its metadata storage architecture -- always evaluate whether the content is stored on-chain, on IPFS, or on a centralized server.

Related articles