How NFTs Work Technically
Lesson by Uvin Vindula
The Technical Foundation
Understanding how NFTs work under the hood helps you evaluate projects, avoid scams, and make informed decisions. While you do not need to be a developer, knowing the basics separates an educated participant from a speculative gambler.
Token Standards
NFTs are created using specific smart contract standards on blockchain networks. The most important ones:
ERC-721 — The Original NFT Standard
Introduced on Ethereum in 2018, ERC-721 is the foundational NFT standard. Each token has a unique tokenId within a contract, and the contract tracks ownership of each token. Key functions include:
ownerOf(tokenId)— returns who owns a specific tokentransferFrom(from, to, tokenId)— transfers ownershiptokenURI(tokenId)— returns a link to the token's metadata (name, description, image)
Every CryptoPunk, Bored Ape, and most individual NFTs use ERC-721 or a derivative.
ERC-1155 — The Multi-Token Standard
ERC-1155 allows a single contract to manage both fungible and non-fungible tokens. This is useful for gaming (where you might have 1,000 identical health potions AND one unique legendary sword in the same contract) and for editions (an artist selling 100 copies of a digital print). It is more gas-efficient than deploying separate ERC-721 contracts.
Other Blockchain Standards
| Blockchain | NFT Standard | Notable Features |
|---|---|---|
| Ethereum | ERC-721, ERC-1155 | Largest ecosystem, highest value |
| Solana | Metaplex Standard | Low fees, fast transactions |
| Bitcoin | Ordinals / Inscriptions | Data inscribed directly on Bitcoin |
| Polygon | ERC-721 (compatible) | Low-cost Ethereum L2 |
| BNB Chain | BEP-721 | Low fees, Binance ecosystem |
Where Does the Actual Art/File Live?
This is one of the most misunderstood aspects of NFTs. The NFT itself (the token on the blockchain) is just a record of ownership and a pointer to metadata. The actual image, video, or file typically lives somewhere else. Where the file is stored matters enormously:
On-Chain Storage
The entire file is stored directly on the blockchain. This is the most permanent solution but also the most expensive. Bitcoin Ordinals inscribe data directly into Bitcoin transactions, making them truly permanent as long as Bitcoin exists. Some Ethereum projects store SVG art on-chain. The downside: only small files are practical due to gas costs.
IPFS (InterPlanetary File System)
IPFS is a decentralized file storage network. Files are addressed by their content hash — if the file changes, the address changes. This provides integrity guarantees. However, files on IPFS only persist as long as someone "pins" them (keeps a copy). Services like Pinata and Arweave offer pinning services. Most reputable NFT projects use IPFS.
Arweave (Permanent Storage)
Arweave is a blockchain specifically designed for permanent data storage. You pay once, and your data is stored permanently. Many high-value NFT projects use Arweave for the ultimate guarantee of file permanence.
Centralized Servers (Red Flag)
Some NFTs point to files on regular web servers (standard URLs like https://somecompany.com/nft/123.jpg). If the company goes bankrupt or the server goes down, the image disappears and your NFT points to nothing. This is a major red flag. Always check where an NFT's media is stored before purchasing.
Metadata Structure
NFT metadata typically follows a JSON format that includes:
- name: The title of the NFT
- description: A text description
- image: A link to the visual representation (IPFS hash or URL)
- attributes/traits: Key-value pairs describing properties (e.g., "Background: Blue", "Rarity: Legendary")
- animation_url: For video/audio NFTs
Smart Contract Mechanics
When you "mint" an NFT, you are calling a function on a smart contract that:
- Creates a new token with a unique ID
- Assigns ownership to your wallet address
- Links the token to its metadata URI
- Emits a Transfer event (from the zero address to your address)
When you sell or transfer, the contract updates the ownership record. Marketplaces like OpenSea do not actually hold NFTs — they read ownership data from the blockchain and facilitate trades through their own smart contracts.
Royalties
One of NFTs' most creator-friendly features is on-chain royalties. Creators can set a percentage (typically 2.5–10%) that is automatically paid to them on every secondary sale. However, royalties have become contentious:
- Marketplaces like Blur made royalties optional to attract traders, undermining creator revenue
- OpenSea initially enforced royalties but later allowed optional payments on some collections
- The ERC-2981 royalty standard provides on-chain royalty information, but enforcement remains marketplace-dependent
For Sri Lankan creators, understanding royalties is important: a well-designed NFT collection with enforced royalties creates passive income from every resale, not just the initial sale.
Key Takeaways
- •ERC-721 is the foundational NFT standard on Ethereum — each token has a unique ID, tracked ownership, and a link to metadata
- •ERC-1155 allows mixed fungible and non-fungible tokens in one contract — more efficient for gaming and editions
- •NFTs are pointers to metadata — the actual file lives on-chain (permanent), IPFS (semi-permanent), Arweave (permanent), or centralized servers (fragile)
- •Always check where an NFT's media is stored — centralized server hosting is a red flag since the image disappears if the server goes down
- •Bitcoin Ordinals inscribe data directly into Bitcoin transactions, providing the strongest permanence guarantee
- •Creator royalties (2.5-10% per resale) are a powerful revenue model, but enforcement remains marketplace-dependent
Quick Quiz
Question 1 of 3
0 correct so far
Where does the actual image or file of most NFTs live?