Post
Share your knowledge.

🚀 How to Design, Mint & Trade NFTs on Sui — Safely and Efficiently
Problem: “How do I design, mint, and trade NFTs on Sui while keeping things safe, efficient, and marketplace-ready? 🤔”
Why this happens:
If you’ve built NFTs for EVM before, you’re probably used to approve/transfer. But on Sui, NFTs are on-chain objects 🗝, and transfers happen by moving that object. This means marketplaces need escrow objects and explicit transfers to make sales atomic and secure.
Goal: Let’s break down the full NFT lifecycle on Sui — from design 🛠 to minting 🪙, royalties 💰, escrow 🔒, and marketplace trading.
1️⃣ NFT as a Move Object — The Canonical Design
On Sui, an NFT is just a Move resource with a key. Example:
module MyNFT {
use std::vector;
struct NFT has key {
id: u64,
metadata_hash: vector<u8>,
creator: address,
royalty_percentage: u64, // e.g. parts-per-10k
}
public fun mint(creator: &signer, id: u64, metadata_hash: vector<u8>, royalty: u64) {
let nft = NFT {
id,
metadata_hash,
creator: signer::address_of(creator),
royalty_percentage: royalty
};
move_to(creator, nft);
}
}
✅ Owning the NFT object is ownership. Moving it = instant transfer.
2️⃣ Royalties & Immutable On-Chain Properties 💸
- Immutable royalties — Store
royalty_percentage&creatorright in the NFT. During sales, your marketplace can route payments automatically to the creator. - Upgradeable royalties — Use a separate
Royaltyobject that receives payments and can have its rules updated if needed.
3️⃣ Listing & Escrow — Safe Marketplace Flow 🔒
A typical list NFT step:
struct Listing has key {
nft: NFT,
seller: address,
price: u64
}
How it works:
- Seller moves NFT into a Listing/Escrow object.
- Marketplace holds this object so it can guarantee a safe, atomic sale.
Buying involves a single atomic PTB (Programmable Transaction Block) that:
- Moves buyer’s payment 💵 to seller + royalty recipients.
- Moves NFT from escrow to buyer.
- Pays gas in one go.
No approvals. No double-spend risk. ✅
4️⃣ TypeScript Flow — Listing + Buy Example 🖥
Listing flow:
- Seller signs & executes a transaction to move NFT into escrow (one Move call).
Buying flow:
- Build PTB that sends funds, pays royalties, moves NFT to buyer, and pays gas — all in one transaction.
Check Sui PTB docs + SDK for exact function calls.
5️⃣ Metadata & Storage 📦
Keep big files (images, videos) off-chain — IPFS, Arweave, or a CDN.
- Store only a content hash + URI in the NFT object.
- Always verify hash integrity when loading data.
🔑 Key Takeaways
- Sui NFTs = on-chain objects — move, don’t approve.
- Use escrow listings for safe, atomic sales.
- Build royalties right into your NFT or a separate royalty object.
- Batch transactions in PTBs for lower gas + better UX.
- Sui
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410