Building an NFT marketplace means building three systems that must agree with each other: smart contracts that settle trades, an off-chain backend that indexes and searches the chain, and an app that makes signing and paying feel safe. Most failed marketplaces got the contracts right and the other two wrong.
This guide covers a custom build: the architecture, the decisions that matter, a realistic process and cost frame, and the compliance work people forget. If you are weighing licensed software instead, see the white-label NFT marketplace guide.
Decide what kind of marketplace you are building
"NFT marketplace" covers products with very different requirements. Settle this first, because it drives everything else.
- Open marketplace. Anyone can list any collection. Needs heavy indexing, spam filtering and fraud handling. Hardest to win, because liquidity already sits with established venues and aggregators.
- Curated marketplace. Only approved creators. Smaller catalog, stronger editorial. Common for art and music.
- Single-issuer marketplace. A game, brand or event organizer running secondary trading for its own tokens. The most viable model today, because demand comes from an existing product.
- Asset-backed marketplace. Tokens represent vaulted collectibles, real estate interests or other real-world assets. Requires custody, redemption and legal structure.
Verticals with distinct needs have their own guides: art, music, real estate and ticketing.
Reference architecture
1. Token contracts
Collections use ERC-721 for unique items or ERC-1155 for editions and game items. If creators mint on your platform, you will typically deploy a factory that creates a lightweight clone (EIP-1167 minimal proxy) per collection, so each creator owns a distinct contract without paying full deployment gas. Every collection should implement EIP-2981 so your exchange can read royalty data.
2. Exchange contract and order model
Modern marketplaces rarely put listings on-chain. A seller signs an order off-chain using EIP-712 typed data, the order is stored in your database, and a buyer submits it to the exchange contract, which verifies the signature and atomically swaps the NFT for payment. This makes listing free and only charges gas on the actual sale.
You can write your own exchange contract, but the safer route is to integrate an existing audited protocol. Seaport, the open-source protocol OpenSea released, supports listings, offers, collection-wide bids, bundles and fee splits, and orders from it can be shared with aggregators. Writing a custom exchange is justified only if you need settlement logic it cannot express.
3. Auctions
English auctions with on-chain bidding are simple but force every bidder to pay gas and lock funds. Most marketplaces use signed off-chain bids with on-chain settlement, or a hybrid where the reserve and final settlement are on-chain. Decide how you handle last-minute bids (time extensions) and what happens if the winning bidder no longer has funds.
4. Indexer
Your indexer listens to Transfer, approval and exchange events, writes them into a relational database, and keeps listing validity current. When an owner transfers an NFT or revokes approval, any open listing for it must be marked invalid immediately. Chain reorganizations, RPC outages and backfills are where indexers fail. You can build this on raw RPC with a queue, use a subgraph, or buy an NFT data API for some chains and index the rest yourself.
5. Metadata and media
Fetch tokenURI data, cache it, resize images, transcode video and audio, and refresh when collections reveal or update. Media should be served from your CDN even if the canonical copy lives on IPFS or Arweave, because public gateways are slow and rate-limited.
6. Search and discovery
Trait filters, price sorting and collection search need a search engine fed from the indexer. Activity feeds and price history come from the same pipeline. This is the part users notice most.
7. Wallets and payments
Support injected wallets and WalletConnect for crypto-native users. For a mainstream audience, add embedded wallets created at email or social login, with gas sponsorship through ERC-4337 smart accounts or a relayer. Card payments come through an on-ramp or NFT checkout provider, which handles KYC for the payment itself.
8. Admin and trust and safety
Verification badges, takedowns, hidden collections, blocklists for stolen items, fee configuration and an audit log of admin actions. Copycat collections and phishing links appear within days of launch on any open platform.
Choosing a chain
| Option | Good fit | Trade-off |
|---|---|---|
| Ethereum mainnet | High-value art and blue-chip collectibles | Gas cost on every trade |
| Ethereum L2 (Base, Arbitrum, Optimism, ZKsync Era) | Consumer apps, brands, most new launches | Bridging and fragmented liquidity |
| Polygon PoS | Loyalty, gaming, high-volume low-value items | Perceived as lower-value for art |
| Solana | High-throughput collectibles, compressed NFTs at scale | Separate stack (Metaplex, Rust programs) |
| Bitcoin Ordinals | Inscription collectors | Very different tooling and trading model |
EVM chains share contracts and most tooling, so adding a second EVM chain is mostly indexing and testing. Adding Solana means a second backend. Chain-specific notes are in the guides for Ethereum and Solana.
The build process
- Scope and economics (2 to 3 weeks). Define marketplace type, chain, listing formats, fee model and who your first hundred sellers are. If you cannot name them, solve that before writing code.
- Contract design and prototyping (3 to 5 weeks). Collection factory, exchange integration, royalty handling, admin roles. Tests with Foundry or Hardhat, including fuzzing of payment paths.
- Indexer and backend (6 to 10 weeks, in parallel). Event ingestion, order book, metadata pipeline, search, notifications.
- Frontend (6 to 10 weeks, in parallel). Collection and item pages, listing and buying flows, profile, activity, admin panel. Pay special attention to the signing prompts users see.
- Security audit (3 to 6 weeks including fixes). External audit of all custom contracts, plus a review of signature handling in the backend.
- Testnet beta (2 to 4 weeks). Real users, real collections on testnet, load tests on the indexer.
- Mainnet launch and operations. Monitoring, on-call for indexer lag, moderation workflow, incident response plan.
Cost: an estimate with assumptions
Here is a reasoned estimate, not a quote. Assume a team of one smart contract engineer, two backend engineers, two frontend engineers, a designer and a part-time product lead, working about five to six months on a single-chain curated or single-issuer marketplace. At typical blended rates for experienced Web3 contractors, that is in the range of several hundred thousand US dollars, with an external audit adding a meaningful amount on top depending on contract size. Open marketplaces with several chains, fiat checkout and heavy moderation can cost twice as much. A narrow single-issuer venue using an existing exchange protocol can come in well under that.
| Cost driver | Lower cost | Higher cost |
|---|---|---|
| Exchange contracts | Integrate Seaport or similar | Custom settlement logic |
| Chains | One EVM chain | Several EVM chains plus Solana |
| Payments | Crypto only | Cards, multiple currencies, payouts in fiat |
| Listing scope | Own collections only | Any collection on the chain |
| Onboarding | External wallets | Embedded wallets with gas sponsorship |
Revenue: what works now
Marketplace fees on open venues have fallen as competition and aggregators squeezed margins. Realistic revenue comes from primary sale shares on drops you run, fees on a captive single-issuer market, launch services for creators, and in some cases subscriptions for pro tools. Ad-style featured placements only work with real traffic. Do not count on staking or token emissions to fund the business; those models mostly collapsed with the 2022 market.
Compliance work to plan for
- Sanctions screening. Screen wallet addresses against sanctions lists, such as those maintained by the US Treasury's OFAC, and block flagged addresses.
- KYC and AML. Usually handled by your payment provider for card purchases. High-value marketplaces may need their own checks.
- EU MiCA. MiCA generally excludes unique, non-fungible crypto-assets, but large series or fractionalized NFTs can be treated as fungible and pulled into scope. Get advice before launching fractional or large-edition products in the EU.
- Securities law. Promising returns, revenue shares or buybacks can make an NFT look like a security, particularly in the US.
- Privacy. Personal data must never go into immutable on-chain metadata. Keep it in your database so deletion requests can be honored.
- Intellectual property. A clear takedown process for infringing collections.
Where AI features help and where they do not
Useful: image similarity checks to flag copied art, anomaly detection for wash trading and stolen-item sales, and better search ranking. Less useful: "AI pricing engines" for illiquid assets, which tend to produce confident numbers from too few comparable sales. Treat any automated valuation as a hint, not a price.
How to evaluate a development team
- Ask them to explain how their indexer handles a reorg and a revoked approval. Vague answers are a warning sign.
- Look at contracts they have deployed. Verified source, minimal admin powers and audit links are what you want.
- Ask what they would integrate rather than build. Teams that want to write a custom exchange for a standard marketplace are adding risk.
- Confirm you own the code, the deployed contracts, the admin keys and the infrastructure accounts.
Frequently asked questions
How long does it take to build an NFT marketplace?
A focused single-chain marketplace usually takes four to six months from scoping to mainnet, including an audit. Open multichain marketplaces take longer.
Should listings be stored on-chain?
Usually not. Signed off-chain orders with on-chain settlement make listing free and are the standard pattern. Only settlement and transfers need to touch the chain.
What is lazy minting and should I support it?
Lazy minting lets a creator sign a voucher instead of minting upfront; the NFT is minted when the first buyer pays. It removes upfront gas for creators and is worth supporting on platforms where creators mint.
Can I enforce royalties?
On your own marketplace, yes, by paying EIP-2981 royalties in the exchange contract. Across the wider market, royalties are effectively optional since major venues stopped enforcing them in 2023.
Is it better to build or buy?
Build if trading is your core product or you need unusual mechanics. Buy or license if the marketplace supports another product, such as a game or loyalty program.
Do I need my own token?
No. Marketplace tokens and trading rewards attracted wash trading in past cycles and add regulatory risk. Launch without one.