Web3 Development · 5 min read ·
A practical guide to NFT marketplace architecture: custody, listings, royalties, indexing, scaling, security, and trade-offs founders must decide early.
Building an NFT marketplace is less about “deploy a contract and add a React app” and more about making a few early architecture decisions that lock in your security model, operational load, and unit economics. Below are the decisions that consistently separate robust marketplaces from fragile ones.
Escrow (custodial contracts) means NFTs are transferred into a marketplace contract while listed. Pros: simple execution, fewer signature edge cases, easier cancellation semantics. Cons: higher user friction (approval + transfer), greater contract risk (a bug can lock assets), and more expensive listings.
Non-custodial (off-chain signed orders) keeps NFTs in the user’s wallet until sale. The “listing” is a signature authorizing a future transfer. This is the dominant approach for scale: it reduces on-chain writes (cheaper listings), keeps user custody, and enables cross-market order sharing.
Practical recommendation: default to non-custodial signed orders unless you have a strong reason to escrow (e.g., game assets needing rental mechanics, or compliance constraints). If you do escrow, isolate escrow logic in a minimal, heavily-audited contract.
You have three common patterns:
If you want liquidity and low friction, signed orders win. But you must design around:
A marketplace can be:
Routers are becoming the “default” because they support composability: a wallet or aggregator can fill multiple orders across venues in one transaction. The trade-off is complexity and additional surface area.
Design tip: separate concerns.
Supporting only ERC-721 is easy; supporting the real world is not.
Decide early:
If you’re building for gaming or membership, ERC-1155 support is often non-negotiable. If you’re building for art, ERC-721 might be sufficient initially—just don’t hard-code assumptions that prevent 1155 later.
Royalties are as much a product and business decision as a technical one.
Architecture options:
In practice, royalties are difficult to enforce universally because NFTs can move via simple transfers or alternative settlement. If you enforce royalties, do it transparently and align with ecosystem standards (e.g., royalty registries where relevant). Also consider split payouts and multiple recipients.
Opinionated guidance: be explicit. If your marketplace depends on creator royalties for its identity, enforce them in your settlement path and accept that some volume will route elsewhere.
You need to decide what currencies you support and how you handle them.
Key choices:
Most mature marketplaces converge on WETH/USDC-first for routing and predictable UX, while still allowing native currency for convenience.
Your frontend cannot query blockchain state directly for a real marketplace. You’ll need an indexing layer for:
Common architecture:
Important: your index is not the source of truth—your settlement contract is. Always design UI to handle reorgs, stale data, and failed fills.
The failure modes in marketplaces are repetitive:
Upgradeability is another fork in the road:
Practical compromise: keep the settlement contract immutable and minimal; place evolving logic (indexing, UI, routing, merchandising) off-chain or in separate, replaceable modules.
If you plan to support multiple networks, avoid accidental fragmentation.
Decide:
From an architecture perspective, multi-chain amplifies the need for:
An NFT marketplace is a settlement engine plus an indexing and distribution machine. The architecture decisions that matter most are custody (escrow vs non-custodial), order design (on-chain vs signed), settlement modularity, royalty policy, and a serious indexing layer that treats the chain as truth.
If you’re optimizing for scale and composability, choose non-custodial signed orders, modular settlement contracts, ERC-20-friendly payments, and a custom indexer that can evolve with your product. If you’re optimizing for simplicity and tight control, escrow and on-chain listings can work—but you’ll pay in gas, friction, and contract risk. Either way, decide deliberately early; retrofitting these choices later is where timelines and budgets go to die.