Compressed NFTs on Solana: Scaling to Millions
How we used Metaplex cNFTs and Merkle trees to tokenize real-world assets at scale on Solana.
When we set out to tokenize wine bottles for dvinclub.com, the math didn’t work with traditional NFTs. Minting thousands of NFTs on Solana would cost a fortune in rent. Compressed NFTs changed everything.
The Problem with Regular NFTs
Each standard Solana NFT requires its own on-chain account, costing ~0.002 SOL in rent. At scale:
- 10,000 NFTs = ~20 SOL in rent alone
- 1,000,000 NFTs = ~2,000 SOL
For a tokenization platform expecting millions of assets, this was a dealbreaker.
State Compression to the Rescue
Metaplex Compressed NFTs (cNFTs) use concurrent Merkle trees to store NFT data off-chain while keeping a cryptographic proof on-chain:
- 1 million cNFTs cost roughly 5 SOL total
- That’s a 400x cost reduction over traditional NFTs
The tradeoff is that reads require an indexer (like Digital Asset Standard API), but writes remain on-chain and verifiable.
Architecture Decisions
We chose a tree depth of 20 with a canopy of 14, giving us:
- Max capacity of ~1 million leaves
- Reasonable proof size for transactions
- Enough canopy to keep transaction sizes manageable
const merkleTree = await createTree(umi, {
maxDepth: 20,
maxBufferSize: 64,
canopyDepth: 14,
});
Verification
Every “Digital Cork” can be verified against the Merkle root stored on-chain. This gives us the same authenticity guarantees as regular NFTs at a fraction of the cost.
The key insight: for asset tokenization, you don’t need every NFT to live on-chain — you just need the proof to be on-chain.
Lessons Learned
- Batch your mints — transaction batching with retry mechanisms is essential at scale
- Index early — set up your DAS indexer before you start minting
- Canopy matters — too small and your transactions won’t fit; too large and tree creation is expensive