ByAUJay
NFT Marketplace Tech Stack: From Smart Contracts to Search and Analytics
Short Summary
Decision-makers are on the lookout for a fresh blueprint to create NFT marketplaces that are scalable, compliant, and have high conversion rates. This guide takes the top-notch practices for 2025 and breaks them down into actionable insights. We’ll cover everything from contracts and order routing to indexing, vector search, analytics, storage, and trust & safety, giving you clear options and implementation patterns to work with.
Why this matters in 2025
If you haven't checked out NFT marketplace architecture since 2022-2023, a lot has definitely changed. The Ethereum Dencun upgrade (EIP-4844 "blobs") really brought down Layer 2 data costs, making minting and trading way cheaper and more scalable. Plus, OpenSea rolled out Seaport 1.6, which introduced “hooks” that allow you to mix and match DeFi and NFT functions right when you're filling orders.
These days, optional royalties are becoming pretty standard, account abstraction is ready for the big leagues, and multi-chain support has expanded to include Ethereum's L1/L2s, Solana (with compressed NFTs), and even Bitcoin’s Runes. So, it’s time to make sure your stack is up to speed with these new developments. Check it out more in detail here: (blocknative.com).
1) Core smart contract layer
Pick the right token standards and extensions
- Base standards
- Royalties
- To manage royalties, you'll want to implement ERC‑2981. Think of royalties as metadata you can discover rather than something enforced by law; it's up to marketplaces whether to pay them out. Dive deeper here.
- Dynamic metadata
- When traits or media change, make sure to emit ERC‑4906’s MetadataUpdate/BatchMetadataUpdate. This helps keep indexers and UIs in sync without needing any custom logic. You can learn more about it here.
- Composability
- Check out ERC‑6551 (Token Bound Accounts) if you need your NFT to manage assets, perform actions, or act as a wallet. This is a game-changer for avatars in games, regulated RWAs, or portfolio NFTs. For details, click here.
Practical Tip:
If you're working with collections that might change their art or traits down the line, it's a good idea to require ERC‑4906 in your creator guidelines. Also, don’t forget to set up an allowlist of accounts that are allowed to call those metadata update functions. This way, you can keep everything secure and under control!
Upgradeability without foot‑guns
- Stick to OpenZeppelin’s UUPS or transparent proxies; avoid reordering storage; swap out constructors for initializers; and make sure to block selfdestruct/delegatecall in your implementations. You can streamline the process by automating checks with OZ Upgrades plugins in your CI. Check out the details here: (docs.openzeppelin.com)
Account abstraction (AA) for smoother checkout
- With ERC‑4337 smart accounts, you can cover gas fees, bundle actions like approval, listing, and signing in one go, plus accept ERC‑20 for gas using paymasters. Just remember to pick a reliable bundler and stick to the paymaster anti-griefing tips like staking, deterministic validation, and simulation. Check out the details here.
- If you’re looking for managed account abstraction infrastructure, Biconomy has got your back. They offer gas sponsorship, ERC‑20 paymasters, and hosted bundlers, which are super handy for “gasless buy” and on-ramp processes. Dive into more info here.
Implementation Example
Let’s take a look at the “one-click list” feature on Base/Arbitrum. You can batch approve, sign, and post everything all at once using a 4337 UserOperation. To handle the gas fees, you can use a paymaster that puts a cap on what each user can spend per day in the postOp. And if any funny business pops up, you can easily revoke access. Check out more details here.
2) Settlement and order routing
Default to Seaport 1.6 for EVM markets
- Seaport 1.6 is here, and it’s rolled out some cool features called “hooks." These are stateful contracts that get triggered during fulfillment, letting you pull payment or liquidity from other protocols, enforce specific trait-level conditions, or kick off on-chain incentives whenever a sale happens. OpenSea made the switch to 1.6 around late March to April 2024 and has since stopped supporting 1.5 for API submissions. (opensea.io)
- For those of you building on this, developer ergonomics just got better! You can use seaport-deploy to quickly set up a local version of v1.6 with Foundry and test those hooks. Just keep in mind the PUSH0 and evm_version requirements. (github.com)
- You’ll want to get familiar with the different types of hooks--zone, contract, and item--and know when each one gets called. You can prototype things like “list-to-lend” (which automatically repays a loan when an item sells) or “trait-gated cashback” as item hooks. Dive into it! (docs.opensea.io)
Aggregation strategy
- Reservoir is your go-to for gathering orders and price info from over 30 EVM chains. It gives you access to all the essentials like floor prices, top bids, ownership details, royalties, and even cross-posting. Think of it as your “unified orderbook and data layer” so you don’t have to deal with running crawlers for each platform. Check it out here: (nft.reservoir.tools).
- The OpenSea Marketplace/NFT APIs and Stream API (WebSocket) are perfect for snagging listings, offers, events, and live updates. Just make sure to use the V2 endpoints along with your API keys, and opt for the Stream for real-time updates instead of polling. You can find more details here: (docs.opensea.io).
Signature flows
- Check out EIP‑712 typed data for standardizing off‑chain orders. It helps cut down on replay risk and keeps your client-side signing experience consistent across different wallets. You can dive deeper here: (eips.ethereum.org)
Bitcoin and Solana: where they fit
- So, Bitcoin Runes made their debut at block 840,000 during the halving on April 20, 2024. They’ve introduced some pretty cool OP_RETURN-based fungible tokens to the BTC world. Lots of marketplaces, like Magic Eden, are already listing Runes with a lot-based user experience. If you’re looking to cover multiple chains, make sure your abstraction layer is set up to manage UTXO-based asset semantics and those “lot” listings. You can check out more about it here.
- Over on Solana, the Metaplex Token Metadata is still the go-to standard for NFTs. The cNFTs (Bubblegum) are making it super easy to mint a ton of tokens for a low cost. And there’s a promise of even better things in 2025 with Bubblegum v2, which will ramp up programmability and support across a wider ecosystem. If you’re planning to fetch cNFTs, just a heads up: they’re not SPL tokens, so you’ll need to consider DAS/Read API access. You can dive into the details here.
3) Indexing and ingestion: don’t fight the chain alone
Event ingestion choices
- Check out The Graph’s Substreams paired with Firehose for some seriously fast block streams and super-efficient parallel indexing. We’re talking about huge speed boosts compared to traditional RPC polling--some contracts are seeing sync times improve by over 100×! Plus, StreamingFast is rolling out features all the way through 2025. (docs.thegraph.academy)
- If you're looking for managed Subgraphs or Mirror pipelines on non-EVM chains like Flow, Goldsky has you covered. It's a great option if you need quick coverage outside the EVM ecosystem. (goldsky.com)
Push events instead of polling wherever possible
- To keep tabs on OpenSea activity, check out the Stream API (or the SDKs). They give you super-fast updates on listings, sales, transfers, and offers, and the best part? They don’t eat into your REST rate limits! Just take a look at the details here: (docs.opensea.io)
- If you’re looking for chain-level events, Alchemy Webhooks and QuickNode Webhooks are your go-to. They’ll send filtered transfers and mints right to your endpoint, all while making sure you've got reorg-safety and “exactly-once” semantics--perfect for building your dashboards and setting up alerts. Dive into more info here: (alchemy.com)
Implementation Pattern
When talking about an implementation pattern, we’re diving into a blueprint that guides how to set up a specific solution or approach. Whether you’re building software, organizing a project, or pivoting an idea into action, having a clear implementation pattern can make a big difference.
Key Components of an Implementation Pattern
To create a solid implementation pattern, keep these components in mind:
- Objective: What are you trying to achieve? Define your main goal.
- Resources: What do you have at your disposal? List out tools, team members, and materials.
- Steps: Break things down into manageable steps. Think of it like a recipe where each step leads you closer to your final dish.
- Timeline: Set a realistic timeline. How long will each step take? Be honest with yourself here.
- Evaluation: How will you measure success? Establish criteria for evaluating your progress.
Example of Implementation Patterns
A classic example is the Agile methodology, which emphasizes flexibility and collaboration. Here’s how you might implement it:
- Sprint Planning: Gather your team to plan the upcoming sprint.
- Daily Standups: Have quick daily meetings to check in on progress.
- Sprint Review: At the end of each sprint, review what was accomplished and what can be improved.
- Retrospective: Reflect on the process and make adjustments before the next sprint.
Tools to Support Your Implementation
There are plenty of tools to help you with implementation patterns. Here are a few popular options:
- Trello: Great for project management and tracking progress.
- Slack: Keeps communication flowing among team members.
- JIRA: Perfect for tracking issues and managing Agile projects.
- Google Docs: Useful for documentation and collaboration.
Conclusion
Creating an implementation pattern isn’t just about following steps; it’s about crafting a plan that suits your unique needs. By keeping the components in mind, utilizing the right tools, and being open to adjustments, you can enhance your chances of success. So, gather your resources, get organized, and start implementing!
- Remove duplicate events using (chainId, txHash, logIndex).
- Save the decoded events in a write-optimized store, like a Postgres or ClickHouse raw table.
- For historical completeness, do a backfill using Substreams; for current updates, utilize Stream/API webhooks. (docs.thegraph.academy)
4) Search and discovery that converts
Exact search and facets
- Calculate trait facets for each collection ahead of time, allow for multi-facet filtering, and store those aggregated counts for quicker access. If you’re showcasing “Live rarity,” consider using OpenRarity to keep the ranking consistent across different platforms. (support.opensea.io)
Vector (semantic and visual) search
- Create an image/text similarity feature that lets buyers search for NFTs that resemble a specific style or have a cyberpunk city backdrop. You can use OpenSearch’s k-NN vectors with HNSW, tweaking parameters like
m,ef_construction, andef_searchto hit your latency and recall targets. Plus, if you're using OpenSearch version 3.2 or higher, the gRPC KNN API can really help to minimize latency even during peak times. Check out the details in the OpenSearch documentation.
Example OpenSearch Mapping Snippet for HNSW with On-Disk Mode
Here’s a quick look at an OpenSearch mapping snippet using the HNSW algorithm with on-disk mode. This setup is great for keeping costs in check:
{
"mappings": {
"properties": {
"your_vector_field": {
"type": "dense_vector",
"dims": 128,
"index": true,
"similarity": "hnsw",
"hnsw": {
"m": 16,
"ef_construction": 200,
"on_disk": true
}
}
}
}
}
Feel free to adjust the dimensions and other parameters according to your needs!
PUT collections-images
{
"settings": { "index": { "knn": true } },
"mappings": {
"properties": {
"collection": { "type": "keyword" },
"token_id": { "type": "keyword" },
"vector": {
"type": "knn_vector",
"dimension": 768,
"mode": "on_disk",
"method": { "name": "hnsw", "engine": "faiss", "space_type": "l2" }
}
}
}
}
Adjust ef_search during query time based on what you need. For instance, you might want to bump it up when searching for “similar art” and dial it down for quick autosuggestions. Check out the details here: (docs.opensearch.org).
5) Pricing, floors, and real‑time analytics
Floor prices and orderbooks
- Check out Reservoir’s price endpoints for floor and top-bid events across different marketplaces, or you can go the DIY route and compute floors on your own by filtering out valid, non-expiry Seaport/Blur orders while leaving out the flagged items. Reservoir really cuts down on the months of work you'd spend crawling the data. (nft.reservoir.tools)
Sub‑second analytics your product team can iterate on
- Get into ClickHouse for your event analytics:
- Bring in those raw chain and marketplace events.
- Keep those AggregatingMergeTree rollups (1h/1d) going strong with materialized views for super quick dashboards--think sales count, GMV, MAUs, and conversion rates at every funnel step.
- Aggressively set TTL on raw tables, but make sure your long-lived rollups stick around. (clickhouse.com)
A solid approach that works well is this: you start with raw events, then create a 1-hour rollup through a materialized view, and if needed, add a refreshable snapshot for your “Top N” queries. This setup delivers sub-second read times at the collection or trait level, even when you're dealing with billions of events. (clickhouse.com)
6) Media, metadata, and delivery
Pinning and gateways
- Make sure to pin your assets/JSON with NFT.Storage (Pinning Service API) or a similar service. It's a good idea to automate those pin status checks during the minting process and after you update your metadata. You can find more details here.
- Quick heads up about the gateway situation: Cloudflare’s public IPFS gateway hostnames (like cloudflare‑ipfs.com and cf‑ipfs.com) are being phased out and will redirect to ipfs.io/dweb.link. This change is happening with a full shutdown planned for August 2024. If you've hard-coded any Cloudflare gateway URLs, it’s time to switch things up. Either use your own gateway or go with ipfs.io/dweb.link. Check out the full scoop here.
- If you’ve got your own dedicated gateway through Cloudflare Web3, opt for Universal Path mode but don’t forget to keep blocklists for any abusive content. If that’s not your setup, it's best to stick with ipfs.io/dweb.link or a managed pinning provider CDN. You can read more about it here.
Creator trust and metadata hygiene
- Make sure to use deterministic media URLs, content-addressed CIDs, and lock down metadata after the reveal. If you need dynamic content, don’t forget to implement ERC-4906 events and some cache-busting rules in your fetchers. (eips.ethereum.org)
7) Compliance, risk, and trust & safety
Regulators are stepping up their game when it comes to NFT platforms, expecting them to take charge of managing risks related to sanctions and fraud. This is happening even though the main anti-money laundering (AML) responsibilities can differ based on the platform's model.
- Sanctions and Screening
- The U.S. Treasury (OFAC) has been on a roll, putting sanctions on various virtual-asset players and updating their tools, like the Sanctions List Service. Heads up: U.S. individuals and businesses need to block the property of Specially Designated Nationals (SDNs), which includes cryptocurrency. It's essential to implement address screening and have a solid case management process in place. You can find more details here.
- Here’s a practical tip: run wallet screens before trades and at the time of settlement through a trusted provider. And don’t forget to do those retroactive sweeps to catch any exposure and manage disputes. Since 2024, the news has shown ongoing actions against crypto services that are helping people dodge sanctions. Check it out here.
- Fraud/Scam Controls
- A good move is to rate-limit first-time sellers and quarantine any suspicious collections. Also, lean on spam indicators from your data providers. For instance, Moralis has tools that reveal spam flags and insights on ownership and transfers, which you can integrate into your heuristics. Dive deeper here.
- Policy Transparency
- If you’re on board with ERC-2981 royalties, make that clear; if they’re optional, be upfront about suggested rates and take the time to educate buyers. OpenSea’s policy shift in 2023-2024 has set an expectation that not following enforcement isn’t the norm. Consider building incentives that align with creators, like offering fee rebates for purchases that respect royalties. More info can be found here.
8) Performance and cost levers you should plan for
- Focus most of your volume on L2s to take advantage of those sweet 4844 blob savings. Keep an eye on blob base fees, since they can fluctuate independently from EVM gas--think of it as a multi-dimensional fee market. Make sure to tweak the fee displays in your UI so users totally get that L2 gas isn't the same as L1 gas. (blocknative.com)
- After Dencun launches on March 13-14, 2024, a lot of rollups are expecting some serious fee drops. So, plan your user journeys with the idea that fees will be way less than a cent on Base, Optimism, and Arbitrum during regular conditions, but don’t forget to factor in some surge handling as well. (coingecko.com)
9) Reference architectures (battle‑tested patterns)
A) Enterprise, multi‑chain marketplace
- Contracts: So we're working with ERC‑721/1155 plus ERC‑2981, and there's an optional ERC‑4906 thrown in there. For settling things, we're using Seaport 1.6, and for our VIPs, we've got AA smart accounts.
- Ingestion: We’re utilizing Substreams/Firehose for the EVM side of things and using OpenSea Stream to catch all those marketplace events. Plus, we’ve got provider webhooks for any chain transfers. Check out more details in these docs.
- Search: For search capabilities, we’ve got OpenSearch k‑NN vectors to help with image and semantic similarity. We also cover classic keyword and trait facets, and for rankings, we’re using OpenRarity. More info is available in the OpenSearch docs.
- Analytics: We’re rolling with ClickHouse for raw data, rollups, and refreshable snapshots. We keep track of some key business metrics like GMV, take rate, and royalty pass-through. If you’re into numbers, definitely check out ClickHouse.
- Storage: For storage, we’re going with NFT.Storage to ensure everything is pinned with some redundancy. Just a heads up, you might want to avoid using Cloudflare's public gateway hostnames. It’s better to serve through dweb.link/ipfs.io or any other gateway you prefer. For more details, you can read this Cloudflare blog post.
- Risk: When it comes to risk, we undertake sanctions screening during wallet connections, listings, and settlements. We've also implemented fraud heuristics and have an appeals workflow to handle any issues. You can find more about it on the Treasury website.
B) Lean MVP on a single EVM L2
- Use Reservoir for managing your orders and data; Seaport 1.6 hooks should only be applied where necessary, like during loyalty mints on sale.
- Set up Alchemy/QuickNode Webhooks for event notifications; ClickHouse is great for single-node dashboards, and you might want to consider OpenSearch as an optional add-on.
- Include an AA paymaster for sponsored first trades, with limits set for each user on a daily basis. Check out the details here: (nft.reservoir.tools)
C) Bitcoin‑first collectibles
- Focus on Ordinals/Runes: create user-friendly listing interfaces centered on “lots,” include a solid fee estimation and mempool status, and make sure to integrate a wallet path that supports Runes (check out the lot semantics in the Magic Eden docs). (help.magiceden.io)
10) Implementation checklist (90‑day plan)
- Day 1-10: Kick things off by deciding on chains and standards (721/1155/2981/4906/6551). Let’s go with Seaport 1.6 and nail down the royalty policy copy. Check it out here: (opensea.io).
- Day 11-25: Now it’s time to set up indexing using Substreams and Firehose for EVM. We’ll integrate Stream and Webhooks for event handling and create a deduplication pipeline. More details here: (docs.thegraph.academy).
- Day 26-40: Let’s get those trait facets and OpenRarity ranks shipped out! We’ll wire up Reservoir floors and top bids, plus add an AA checkout feature with paymaster caps. Learn more here: (support.opensea.io).
- Day 41-60: Time to integrate OpenSearch k‑NN for finding “similar NFTs.” We’ll deploy ClickHouse rollups and publish API docs for our partners to use. Get the scoop here: (docs.opensearch.org).
- Day 61-75: Let’s automate pinning and migrate any hard-coded Cloudflare gateway URLs. We’ll also publish a sanctions compliance statement and enable screening. More info can be found here: (blog.cloudflare.com).
- Day 76-90: For the final stretch, we’ll work on a Seaport hooks proof of concept (like a DeFi rebate on sale), conduct load testing, audit everything, and create a staged launch playbook. Check this out: (docs.opensea.io).
Emerging best practices we recommend in 2025
- Think of royalties as an incentive, not a rule to enforce: show suggested rates, highlight who’s paying royalties in the sales history, and offer some perks for those who stick to the guidelines. (theblock.co)
- Keep AA low-key: cover gas fees for the first few actions of new users; provide a straightforward receipt in plain language; and use EOA signatures as a backup when the bundlers get busy. (docs.erc4337.io)
- Enhance discovery beyond just keywords: implement vector search for finding similar artwork, use OpenRarity rankings for better clarity, and create “traits over time” charts in analytics to help buyers evaluate less obvious features. (support.opensea.io)
- Go for push instead of pull: use Stream/Webhooks wherever you can; save polling for those times you need to fill gaps or run reconciliations. (docs.opensea.io)
- Acknowledge the infrastructure realities: post-Dencun, L2 costs are cheaper but can still fluctuate; keep fee displays transparent and set up some safeguards against those blob-fee spikes. (blocknative.com)
How 7Block Labs can help
We’ve rolled out Seaport 1.6 marketplaces with hooks, created Substreams indexers, set up AA paymasters for gasless checkout, and released vector search along with ClickHouse analytics stacks. If you’re looking for a reference implementation or need to add royalties, discovery, or compliance features to an existing product, we can speed up your journey from architecture to launch.
Sources
- EIPs and Standards: Check out ERC‑721, 1155, 2981, 4906, 6551, and EIP‑712 signatures for some cool insights. You can dive deeper into these here.
- Seaport 1.6 and Hooks: Get the scoop on the latest from OpenSea--blog posts, docs, and details on seaport-deploy are all laid out over here.
- Dencun/EIP‑4844: Discover the design and impact of EIP-4844; it's a game-changer! Learn more here.
- OpenSea APIs and Stream: Check out what's new with V2, including API keys and an overview of Stream. All the details are waiting for you here.
- Reservoir Aggregator: Curious about what this is all about? Get the lowdown on the overview and supported chains here.
- Account Abstraction: Learn all about bundlers, paymasters, and security--it's all crucial stuff. You can explore it here.
- Bitcoin Runes: This one's exciting! Get into the launch context and fee impact, plus the Magic Eden Runes UX details here.
- Solana/Metaplex: Check out Token Metadata, cNFTs, Bubblegum v2, and best practices for DAS/Read API here.
- Search/Vector: OpenSearch has some updates and docs on k-NN that you might find useful. Take a look here.
- Analytics: Discover some neat patterns for materialized views in ClickHouse. Get the details here.
- Storage: Learn about NFT.Storage pinning, plus the deprecation of Cloudflare's public IPFS gateway and see what alternatives you have here.
- Compliance: Keep up with OFAC releases and modernization efforts, plus get the latest coverage from Reuters here.
Like what you're reading? Let's build together.
Get a free 30-minute consultation with our engineering team.
Related Posts
ByAUJay
Building a Donation-Based Crowdfunding Platform That Gives Tax Receipts
**Summary:** Donation-based crowdfunding that includes tax receipts has become quite the complex puzzle across different regions. You've got to navigate IRS Pub 1771/526 rules, UK Gift Aid declarations, Canada’s CRA receipting, and the new eIDAS/OpenID4VCI wallets--all while keeping everything running smoothly.
ByAUJay
Why 'Full-Lifecycle Advisory' Beats Just Coding
**Summary:** Engineering teams that focus solely on “writing Solidity” often find themselves caught off guard by shifts in protocols, the need for composable security, and the procurement hurdles that are now impacting real ROI. Our full-lifecycle advisory service bridges the gap by connecting EIP-7702 smart accounts, modular decentralized applications (DA), and ZK-based compliance solutions.
ByAUJay
Why Your Project Could Really Use a 'Protocol Economist
Summary: A lot of Web3 teams are missing a crucial player: the “protocol economist.” And you can really see the impact--value slips away through MEV routing, token incentives that are all out of whack, and those sneaky changes to wallets after Pectra that end up messing with the unit economics. In this playbook, we’ll explore what a protocol economist can do to tackle these issues head-on.

