Blog Kỹ thuật
nfterc721ipfsmetadata

NFTs Demystified: Beyond the Hype to the Technical Reality

Strip away the speculation — here's how NFTs actually work at the token standard, metadata, and storage layers. ERC-721, ERC-1155, IPFS, and on-chain art explained.

G
Gemini
·28 tháng 3, 2026·10 phút đọc

NFTs Demystified: Beyond the Hype to the Technical Reality

The NFT market peaked at $25 billion in 2021 and collapsed just as dramatically. But underneath the speculation lies genuinely interesting technology: a standard for representing unique, verifiable digital ownership on a public ledger.

What Actually Is an NFT?

An NFT (Non-Fungible Token) is a token where each unit is unique. Compare:

PropertyETH (fungible)NFT (non-fungible)
InterchangeableYes (1 ETH = 1 ETH)No (Token #1 ≠ Token #2)
DivisibleYes (0.001 ETH)No (typically)
Unique identifierNoYes (tokenId)

The blockchain records who owns which tokenId. That's it. The "art" itself is usually stored elsewhere.

ERC-721: The Standard

Defined in EIP-721, every compliant NFT contract must implement:

solidity
interface IERC721 { // Transfer token from `from` to `to` function transferFrom(address from, address to, uint256 tokenId) external; // Who owns this token? function ownerOf(uint256 tokenId) external view returns (address owner); // How many tokens does this address own? function balanceOf(address owner) external view returns (uint256 balance); // Approve another address to transfer your token function approve(address to, uint256 tokenId) external; // Approve operator for ALL your tokens function setApprovalForAll(address operator, bool approved) external; // Returns URI pointing to metadata JSON function tokenURI(uint256 tokenId) external view returns (string memory); // Events event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); }

tokenURI is everything. It's a URL pointing to a JSON file describing the NFT.

The Metadata Layer

json
{ "name": "CryptoPunk #7804", "description": "One of 10,000 unique collectible characters.", "image": "ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/7804.png", "attributes": [ { "trait_type": "Accessory", "value": "Pipe" }, { "trait_type": "Skin Tone", "value": "Alien" }, { "trait_type": "Type", "value": "Male" } ] }

The image field points to the actual file. And here's the critical question: where is that file actually stored?

Storage: The Real Problem

Option 1: HTTP URL ❌

"image": "https://myserver.com/images/7804.png"

If myserver.com goes down, your NFT image is gone. Rugged by a server shutdown.

Option 2: IPFS ✅

"image": "ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/7804.png"

IPFS (InterPlanetary File System) is a content-addressed network. The hash is the address. QmXoypiz... is the SHA-256 hash of the file content.

  • If the file changes, the hash changes — so faking it is impossible
  • Anyone can pin the file to ensure availability
  • The NFT contract links to immutable content

Option 3: Fully On-Chain ✨

The most censorship-resistant approach — store the SVG art directly in the contract:

solidity
function tokenURI(uint256 tokenId) public view returns (string memory) { string memory svg = generateSVG(tokenId); string memory json = Base64.encode(bytes(string(abi.encodePacked( '{"name":"OnChain #', Strings.toString(tokenId), '",', '"description":"Fully on-chain art.",', '"image":"data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '"}' )))); return string(abi.encodePacked("data:application/json;base64,", json)); }

No external dependencies. As long as Ethereum exists, the art exists.

ERC-1155: Multi-Token Standard

ERC-721: one contract = one NFT type
ERC-1155: one contract = many token types (both fungible and non-fungible)

solidity
// Mint 100 copies of sword (id=1) AND 1 legendary shield (id=2) _mintBatch(owner, [1, 2], [100, 1], "");

Perfect for gaming — items, currencies, and unique assets in a single contract with batch transfers (one tx to send 50 items).

Royalties: ERC-2981

solidity
interface IERC2981 { // Returns (receiver, royaltyAmount) for a sale at `salePrice` function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }

If you set 5% royalty, every secondary sale should send 5% to you. The problem: marketplaces don't have to respect it. Blur and others made royalties optional, cratering creator income.

NFT Contracts in Practice: OpenZeppelin

solidity
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract MyNFT is ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint256 public constant MINT_PRICE = 0.05 ether; uint256 public constant MAX_SUPPLY = 10_000; constructor() ERC721("MyNFT", "MNFT") Ownable(msg.sender) {} function mint(string memory tokenURI) external payable returns (uint256) { require(msg.value >= MINT_PRICE, "Insufficient payment"); require(_tokenIds.current() < MAX_SUPPLY, "Sold out"); _tokenIds.increment(); uint256 newItemId = _tokenIds.current(); _mint(msg.sender, newItemId); _setTokenURI(newItemId, tokenURI); return newItemId; } function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } }

What NFTs Are Actually Good For

Beyond JPEGs, NFTs enable:

  • Event tickets: cryptographically verifiable, no fakes, programmable resale rules
  • Gaming assets: true interoperability across games (if they support the same standard)
  • Music rights: Audius, Sound.xyz — fractional ownership of songs
  • Real-world assets: tokenized real estate deeds, luxury goods authentication
  • Domain names: ENS (Ethereum Name Service) — .eth names are ERC-721 tokens
  • Soulbound tokens: non-transferable NFTs for credentials, diplomas, reputation

The bottom line: An NFT is a provably unique, transferable record of ownership on a public ledger. The value isn't in the technology — it's in what people collectively agree that ownership means. The tech is solid. The use cases are still being discovered.

© 2026 AssetMngt. Bảo lưu mọi quyền.