NFTs and tokenization โ ERC-721, ERC-1155, and real-world asset tokenization
- ERC-721 tokens are unique (one owner per ID); ERC-1155 combines fungible and non-fungible in one gas-efficient contract.
- RWA tokenization (real estate, treasuries, commodities) is bridging DeFi with traditional finance โ biggest growth area.
- Always verify NFT metadata storage โ IPFS or Arweave for persistence, never trust centralized server URLs for valuable assets.
Non-Fungible Tokens (NFTs) represent unique ownership on a blockchain. Unlike ERC-20 tokens where every unit is identical, each NFT has a unique token ID and can represent art, real estate, event tickets, game items, or any asset requiring provable uniqueness.
This lesson goes beyond profile pictures to cover the technical standards, real-world asset tokenization, and the practical Solidity code behind NFT contracts.
Nfts: ERC-721: the NFT standard
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MyNFT is ERC721, ERC721URIStorage, Ownable {
uint256 private _nextTokenId;
uint256 public mintPrice = 0.01 ether;
uint256 public maxSupply = 10000;
constructor()
ERC721("MyNFT", "MNFT")
Ownable(msg.sender)
{}
function mint(string memory uri) public payable returns (uint256) {
require(msg.value >= mintPrice, "Insufficient payment");
require(_nextTokenId < maxSupply, "Sold out");
uint256 tokenId = _nextTokenId++;
_safeMint(msg.sender, tokenId);
_setTokenURI(tokenId, uri);
return tokenId;
}
function withdraw() public onlyOwner {
(bool ok, ) = owner().call{value: address(this).balance}("");
require(ok);
}
// Required overrides
function tokenURI(uint256 tokenId)
public view override(ERC721, ERC721URIStorage)
returns (string memory)
{
return super.tokenURI(tokenId);
}
function supportsInterface(bytes4 interfaceId)
public view override(ERC721, ERC721URIStorage)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}Deploy in Remix, send 0.01 ETH with the mint call, and pass any metadata URI (e.g., an IPFS link). You now own a unique NFT with on-chain ownership proof.
ERC-1155: multi-token standard
ERC-1155 combines fungible and non-fungible tokens in a single contract โ ideal for gaming and complex tokenization:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract GameItems is ERC1155, Ownable {
uint256 public constant GOLD = 0; // fungible
uint256 public constant SWORD = 1; // fungible (many copies)
uint256 public constant SHIELD = 2; // fungible
uint256 public constant LEGENDARY = 3; // could be limited edition
constructor()
ERC1155("https://game.example.com/api/item/{id}.json")
Ownable(msg.sender)
{
// Mint initial items to deployer
_mint(msg.sender, GOLD, 10000, ""); // 10,000 gold
_mint(msg.sender, SWORD, 100, ""); // 100 swords
_mint(msg.sender, SHIELD, 50, ""); // 50 shields
_mint(msg.sender, LEGENDARY, 1, ""); // 1 legendary item
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts
) public onlyOwner {
_mintBatch(to, ids, amounts, "");
}
}ERC-1155 is more gas-efficient than deploying separate ERC-721 and ERC-20 contracts. A single transfer can move multiple token types in one transaction.
Real-world asset tokenization
Tokenizing real-world assets (RWAs) is one of the most promising DeFi applications:
- Real estate โ fractional ownership of properties. $100K building split into 100,000 tokens at $1 each.
- Treasuries โ on-chain US Treasury bonds (Ondo Finance, backed by real T-bills).
- Commodities โ tokenized gold (PAXG), backed by physical gold in vaults.
- Private credit โ on-chain lending to real businesses (Maple, Goldfinch).
- Carbon credits โ tokenized environmental credits for transparent trading.
// Simplified real-world asset token
contract RealEstateToken is ERC721, Ownable {
struct Property {
string legalDescription;
string physicalAddress;
uint256 valuationUSD;
uint256 lastAppraisalDate;
bool isVerified;
}
mapping(uint256 => Property) public properties;
uint256 private _nextId;
// Only authorized verifiers can mint (regulatory compliance)
mapping(address => bool) public verifiers;
function tokenizeProperty(
address owner_,
string memory legalDesc,
string memory addr_,
uint256 valuation
) external {
require(verifiers[msg.sender], "Not authorized verifier");
uint256 id = _nextId++;
_mint(owner_, id);
properties[id] = Property(legalDesc, addr_, valuation, block.timestamp, true);
}
}RWA tokenization requires legal frameworks, authorized verifiers, and regulatory compliance โ the smart contract is only one piece of the puzzle.
Explore Crypto Trading
Cryptocurrency trading is one of the fastest-growing financial markets โ open 24/7, globally accessible, and full of opportunity for those who learn the fundamentals first.
- Trade spot, futures & copy-trading on one platform
- Start with as little as $10 โ practice risk-free on the testnet
- Built-in TradingView charts, grid bots & DCA tools
NFT metadata and storage
Where NFT metadata lives matters enormously:
- On-chain โ metadata stored directly in the contract. Most durable but expensive. Used by art NFTs and generative projects.
- IPFS โ decentralized file storage. Content-addressed (the hash ensures data integrity). Persistent if pinned. Standard choice.
- Arweave โ permanent storage with one-time payment. Used by projects wanting guaranteed permanence.
- Centralized servers โ cheapest but if the server goes down, your NFT metadata is gone. Avoid for valuable NFTs.
Always check where metadata lives before buying an NFT. A $10K NFT pointing to a centralized server is a time bomb.
When evaluating nfts, start with the fundamentals: what problem it solves, who it serves, and how it compares to the alternatives buyers consider first.
Start with the fundamentals. Define who you are serving, the single outcome you want, and the budget you are comfortable committing before you compare any options.
A practical rule is to favour clarity over cleverness. The choice that is easiest to understand, spell, remember and act on tends to win over the long run.
Context changes the answer. What is optimal for a fast-moving startup is rarely optimal for an established brand, so weigh your own stage, market and ambitions.
Avoid the common mistakes: rushing the decision, copying competitors blindly, and ignoring the total cost of ownership beyond the very first year of use.
Think in terms of trade-offs rather than a single perfect answer. Every option trades memorability, cost, reach and flexibility in a slightly different mix.
Document your reasoning. Writing down why you chose one path makes it far easier to revisit the decision later and to explain it to partners and investors.
Test with real people. A quick check with a handful of your actual customers will surface problems that no amount of internal debate ever reveals.
Plan for growth. The option that fits today should still make sense when your audience, catalogue or team is several times larger than it is right now.
Finally, revisit the decision periodically. Markets, tools and best practices move quickly, and a choice that was ideal last year may deserve a fresh look today.
When evaluating nfts, start with the fundamentals: what problem it solves, who it serves, and how it compares to the alternatives buyers consider first.
WSOT 2026: Squad Leader Slots Are Open โ Up to $128,000 per Leader
Join NowFrequently asked questions
What is the difference between ERC-721 and ERC-1155?
ERC-721 creates one contract per token type where each token is unique. ERC-1155 combines fungible and non-fungible tokens in a single contract, with batch transfers and better gas efficiency. Games and multi-asset platforms prefer ERC-1155.
Are NFTs just for art?
No. NFTs are a technology for provable digital ownership. Applications include event tickets, domain names (ENS), gaming items, real-world asset tokenization, identity credentials, music royalties, and legal documents.
What is real-world asset tokenization?
RWA tokenization creates blockchain tokens representing ownership of physical assets (real estate, treasuries, commodities). It enables fractional ownership, 24/7 trading, and programmable compliance โ but requires legal frameworks alongside the smart contracts.
Free Courses โ Learn New Skills
No sign-up · No fees · Learn at your own pace
Start Trading
Trade crypto and premium domains โ digital assets with real opportunities.
๐ Need a custom article?
Our editorial team writes it for you โ carefully crafted, SEO-optimized, about your topic, your domain name or your service. Multiple languages available. From $15 per language.
Find your name on Atom
DominantBrand curates the best premium, brandable names from Atom.com — the marketplace with a free AI appraisal, a USPTO trademark check, and secure escrow. Every listing even ships with a designed logo.