Decentralized Exchange Development: Architecture and Cost
A build guide for decentralized exchange development: how AMM, order-book and intent designs differ, what the architecture really contains, what a fork costs you in licence terms, and a cost model with its assumptions written down.

On this page

Decentralized exchange development, or DEX development for short, is the work of building a trading venue where the pricing rule lives in a smart contract and the assets stay in the trader's wallet. Without custody the build changes shape: there's no internal ledger to credit, no withdrawal queue to run, and no way to reverse a bad fill. What you build instead is a set of contracts that hold pooled liquidity, a router that finds the cheapest path through them, an indexer that makes the history readable, and an interface that most users will assume is the exchange.
This build guide covers the models, the architecture, the measured market, fork versus custom, how these venues earn, what the work costs, and where the regulation sits. It sits under our wider web3 development guide. For the centralized side of the comparison, our breakdown of cryptocurrency exchange features and income generation covers the custodial model in detail.
The short version
- A DEX differs from a CEX on three axes: custody stays with the user, matching happens in a contract or an auction instead of a private engine, and settlement is on-chain and public.
- Four families dominate: constant-product and concentrated-liquidity AMMs, stable-swap curves, on-chain and hybrid order books, and intent or solver designs that outsource routing to competing fillers.
- DeFiLlama measured about 233.7 billion dollars of 30-day spot volume across venues it classifies as DEXs on 10 September 2026, with Uniswap alone at about 65.5 billion.
- Licence terms are a real constraint. Uniswap v3 core converted to GPL in April 2023; v4 core stays under a Business Source Licence until 15 June 2027.
- Fees are not revenue. Uniswap's traders paid about 160.7 million dollars in fees over 30 days; about 12.97 million of that reached the protocol.
- Cost tracks the pricing model more than the feature list. At senior CEE rates ($75/hr) an AMM plus Uniswap v4 Hook MVP runs $90,000 to $120,000, against $198,000 to $264,000 at US agency rates ($165/hr). In our 36-month model at $150M a year of volume, an owned hybrid CLOB and intent solver stack costs $495,000 to $663,000 less than rented aggregator or white-label perp rails.
What decentralized exchange development actually involves
Decentralized exchange development means writing and shipping the contracts that price and settle trades, plus everything a trader needs to reach them safely. Decentralized exchange software is mostly contracts plus an indexer, and the web app is a client of both. A good build treats it that way, because a DEX that stops working when its website goes down was never decentralized in the first place.
Concretely, the work covers five things. You write the pool and settlement contracts that hold liquidity and enforce the pricing rule. You write or configure a router that splits an order across pools to reduce slippage. You run an indexer so the interface can show a position's history without replaying the chain. You build the front end and its wallet integration. And you stand up monitoring, because on-chain code can't be hot-patched and you'll want to know about a strange transaction before the incident channel does.
Decentralized exchange vs centralized exchange: custody, matching, settlement
A centralized exchange keeps balances in its own database and holds the money behind them. A DEX keeps neither. Three questions cover the design differences.
Who holds the assets. A CEX credits you a balance it controls. Deposits are real transfers into the venue's wallets, and withdrawals are the venue choosing to send funds back. A DEX doesn't hold a user balance in that sense: assets sit in the trader's own wallet, and liquidity sits in a pool contract that the providers can withdraw from directly. This removes an entire product surface, including the withdrawal queue, hot and cold wallet policy, and proof-of-reserves reporting, and it replaces it with contract risk.
Where orders match. A CEX runs a matching engine in memory, pairing bids and asks by price and time. Our work on a centralized venue, the ACM crypto trading platform, is built around exactly that engine, with a risk layer that watches leveraged exposure and triggers liquidations. A DEX has no engine in that sense. An AMM prices each trade from the pool's reserves. An order-book DEX may keep a book, but it has to decide where it lives, which is the design fork we come back to below.
Where settlement happens. A CEX settles internally and only touches a chain when someone withdraws. A DEX settles every trade on-chain, which is why base-layer cost and block time show up as product constraints.
The DEX models you can build, compared
There are four working families of DEX design, and picking one is the first real fork in any DEX development plan. It fixes contract complexity, liquidity strategy, gas profile and audit scope.
AMM designs: constant product, concentrated liquidity, stable-swap
The constant-product rule is the simplest thing that works. Reserves of two tokens multiply to a constant, so buying one side raises its price along a hyperbola. The pool always quotes a price and needs no counterparty, which is why the first AMMs could launch without market makers. Its weakness is capital efficiency: most of the pool sits at prices nobody will ever trade at.
Concentrated liquidity fixes that by letting a provider bound their liquidity to a price range. The Uniswap v3 whitepaper describes the mechanism and the fee tiers that came with it: 0.05 percent, 0.30 percent and 1 percent, with tick spacings of 10, 60 and 200 respectively, which works out to roughly 0.10, 0.60 and 2.02 percent between initializable ticks. That tick accounting is where the engineering weeks go. Every crossing kicks liquidity in or out, and fees accrue per position rather than compounding into the pool, so the contract has to track state at pool, tick and position level at once.
Uniswap v4 keeps that math and changes the container. The official docs describe a singleton PoolManager that stores every pool as state rather than as its own contract, which makes pool creation much cheaper, plus flash accounting that nets balance changes and only moves tokens at the end of a transaction, and native ETH support that removes the wrapping step. The bigger change is hooks: contracts attached to a pool that run at ten defined lifecycle callbacks, including beforeSwap, afterSwap, the add and remove liquidity pairs, initialize and donate, paired with four return-delta flags across 14 permission bits in the hook's own address, so deploying one means mining a CREATE2 salt until the address bits match the functions you implemented. Hooks are extra code your auditors have to cover.
Stable-swap is the third curve. Curve's StableSwap paper describes it as a blend of a constant-sum invariant, which gives zero slippage but no bounds, and a constant product, which is safe but expensive. An amplification coefficient controls the blend. For assets that should trade near parity it's far better than constant product. Put a volatile pair on it and the pool sells tokens cheap to anyone who notices.
Decentralized exchange architecture, component by component
A decentralized exchange architecture is four on-chain pieces and five off-chain ones. In our experience the off-chain half is the one that gets underestimated.
Smart contracts. A factory that deploys or registers pools, the pool contracts themselves holding reserves and the pricing rule, a router that splits an order across pools and enforces slippage limits, and the fee logic that decides who keeps what, the same DeFi contract patterns that recur across most AMM builds. Keep the router thin. It's the contract users grant allowances to, so it's the one an attacker most wants to find a flaw in.
Oracles and price feeds. A pure AMM doesn't need an external price to function, but almost everything around it does: liquidation logic, incentive accounting, portfolio display. Reading a pool's own spot price as an oracle is the classic mistake, and the numbers below show why.
Indexer or subgraph. Chains are bad databases. Anything historical, a trader's fills, a provider's fee accrual, a pool's volume chart, comes from an indexer. On The Graph, at the time of writing, that costs nothing up to 100,000 queries a month and 2 dollars per 100,000 after, which is cheap until a busy front end makes several queries per page view.
Relayers and solvers. Only if your design needs them. An intent-based DEX or a gasless flow requires an off-chain party that receives the signed order and gets it on-chain, plus the accounting to make sure it did so honestly.
Front end and wallet integration. Connection, network switching, allowance management, transaction simulation, and clear failure states. Most user-visible bugs live here, and it's not a small part of the budget; our crypto wallet development guide covers the wallet side. Treat the interface as the easy half and you'll ship late.
Analytics, governance and monitoring. Volume and liquidity dashboards for the team, an admin path with an explicit upgrade story, and alerting on the contracts. Decide the upgrade question deliberately: immutable contracts can't be fixed, upgradeable ones mean somebody holds a key that can change the rules under the users. Both are defensible, as long as you tell users which one they're getting.
How big the DEX market is, measured
DEXs now clear close to a quarter of spot crypto trading. The Block reported that the DEX to CEX spot volume ratio closed July 2026 at an all-time high of about 24 percent, up from 17 percent a year earlier.
On the same day, DeFiLlama's DEX endpoint showed about 264.9 billion dollars of 30-day volume across everything it tracks in the category, of which about 233.7 billion came from venues it classifies specifically as DEXs, with prediction markets and trading bots stripped out. The top of that list doubles as the sourced answer to the question about the top ten decentralized exchanges.
Perpetuals are a separate and larger market. Hyperliquid's own info API returned about 6.45 billion dollars of 24-hour perpetual notional volume across 234 markets on 10 September 2026, throughput that pushes a team toward an app-specific chain.
One caution before you build a business case on this. Rankings move week to week and trackers count wrapped, bridged and aggregator-routed flow differently, so quote a number only with its source and its date.
DEX development: build, fork, or white-label
Most DEX development starts with this call. Fork when the design is settled and your differentiation is elsewhere, and build when the pricing rule itself is the product. That sounds obvious until you read the licences.
Uniswap v3 core is now open. Its LICENSE file is Business Source Licence 1.1 with a change date set to the earlier of 1 April 2023 or a date published on-chain, and a change licence of GPL v2 or later. That date has passed, so the code is GPL today. Copyleft still applies, which means your derivative inherits the same obligations.
Uniswap v4 core is not. The v4 licence file names Universal Navigation Inc. as licensor and sets the change date as the earlier of 15 June 2027 or a date the DAO sets on-chain, after which the code converts to MIT. Before that date, the Business Source Licence permits copying, modification and non-production use, with production use only under an additional use grant published by the licensor. If your plan is a v4-style hooks DEX on mainnet before mid-2027, settle that grant before you write the sprint plan.
Forking carries costs the licence never mentions. You inherit the original's assumptions about token behaviour, its oracle design and its fee accounting, and you inherit none of its audit coverage the moment you change anything. DeFiLlama's incident record tags 34 separate hacks as swap logic flaws, which is the bucket a modified pricing path lands in. You also inherit the original's parameters, and a constant-product fork with a stable pair in it will bleed value regardless of how clean the code is.
White-label vendors compress time to launch and are a reasonable answer when a DEX is a feature of a larger product rather than the product itself. The trade-offs: you rarely get the contracts under a licence you control, upgrade timing belongs to the vendor, and the audit you're shown covers their reference deployment, not your configuration. Ask for the deployed addresses and read the audit's scope section before anything else.
A custom build earns its cost in three situations: your pricing rule is new, you need a hook or curve nobody has written, or your regulatory posture requires control of the deployment and the upgrade path. Outside those, a fork plus real engineering on the parts users touch is usually the better trade.
How decentralized exchanges make money, and what an operator can keep
A decentralized exchange makes money by charging a swap fee. On a default AMM, liquidity providers keep all of it and the operator keeps nothing.
Protocol fees
Routing part of the swap fee to the protocol takes a governance vote, and Uniswap's is the best-documented example. The UNIfication proposal executed on 29 December 2025 after passing with 125,342,017 votes for and 742 against, clearing a quorum of 40 million, recorded on the Uniswap governance portal. Per Uniswap's own write-up, v2 fees were hardcoded at 0.30 percent to providers with the switch off; with it on, providers take 0.25 percent and the protocol takes 0.05 percent, while v3 pools route a quarter of the LP fee on smaller tiers and a sixth on larger ones. Collected fees flow into a contract that only releases funds when UNI is burned in a companion contract, and the proposal included a retroactive burn of 100 million UNI from the treasury.
The gap between fees and revenue is wide. These are DeFiLlama's figures from 10 September 2026.
Most of what traders pay is compensation for liquidity, not margin. A design that keeps a larger share is usually one that pays for liquidity a different way, with emissions or with a house-run market maker, and that cost shows up elsewhere in the model.
Front-end fees, tokens and order flow
An operator has three other ways to earn. Front-end fees are charged by whoever runs the interface and are independent of the protocol fee; Hyperliquid formalises this with builder codes, where an approved builder can take at most 0.1 percent on perps and 1 percent on spot (charged on the sell side), capped by a limit the user signs. A token funds liquidity incentives and, if it accrues fees, becomes the vehicle for value capture; those mechanics belong in a proper tokenomics design. Order flow and MEV can be captured rather than leaked, which is what the intent designs are for: CoW Protocol's batch auctions settle same-pair orders at uniform directional clearing prices, so transaction order inside a block stops being worth anything to a sandwich bot, and any surplus a solver finds goes back to the order instead of to a searcher.
Decentralized exchange development cost and timeline
Decentralized exchange development costs roughly 100,000 dollars for a single-chain AMM fork, roughly 350,000 for a custom concentrated-liquidity DEX and roughly 600,000 for a hybrid order-book venue, in engineering alone, before audit and before running costs. The assumptions behind those numbers are on the table below, so you can rebuild them at your own rates.
DEX development cost tracks the pricing model and the audit scope far more than the length of the feature list.
Assumptions. One engineer-week is 40 hours. The dollar column below models greenfield invariant and matching-engine builds written from scratch at a blended 4,000 dollars per engineer-week (100 dollars an hour). Substitute $75/hr CEE or $165/hr US rates if those are yours, or compare the modular Uniswap v4 Hook and ERC-7683 solver build tiers in the TCO section further below. The ratio between the scopes is the durable part. Audit fees are excluded from the build column and budgeted separately, though the weeks spent preparing for an audit and fixing findings are included. Design and product management are counted; marketing and liquidity incentives are not.
The fork breaks down as roughly 4 weeks on contracts, 8 on the front end, 3 on the subgraph, 3 on infrastructure and monitoring, 4 on audit preparation and remediation, and 4 on testnet and launch. The custom AMM adds 20 weeks of core invariant and tick accounting, 12 of periphery contracts, and about 12 on incentives and analytics. The order-book scope is dominated by two line items that don't exist in the other two: the matching engine with its failover story, and the market-maker APIs, which together account for about half of it.
The middle row comes with a caveat. The custom concentrated-liquidity number assumes you're adapting a well-understood invariant, not inventing one. If your curve is new, the audit rounds multiply and so does the calendar, and no model on a blog page will tell you by how much.
Audit budgets are checkable. Code4rena publishes the prize pool of every competitive audit it runs. Across the contests listed on 10 September 2026, pots ran from 4,000 to 500,000 dollars. Sherlock published timelines rather than prices: its former contest guidance, since replaced by its audit engine, put a 500-line Solidity scope at about 3 days, 2,000 lines at about 12 days and 6,000 lines at about 38 days, with judging, remediation and fix verification on top. The size of the scope sets the number.
Running costs are small but not zero. Alchemy lists 30 million compute units a month free, then 0.45 dollars per million up to 300 million and 0.40 above it. That's pay-as-you-go list pricing, so check it before budgeting. The Graph's 2 dollars per 100,000 queries sits alongside it. For a venue doing real volume, expect low four figures a month across RPC, indexing, hosting and alerting. The bill moves with traffic, whatever your contract count.
Security and compliance in decentralized exchange development
Security in decentralized exchange development starts with audit scope, which for an AMM is narrower and stranger than for ordinary application code. The failure classes are well documented.
Where DEXs get hacked
DeFiLlama's hacks database recorded 1,263 incidents totalling about 20.65 billion dollars when we captured it on 10 September 2026, and the classification breakdown maps almost directly onto a review checklist. The totals have grown since, so re-pull them before you quote any of the counts below.
- Oracle manipulation, 157 incidents and about 890 million dollars. Spot price manipulation is the second most common named technique in the whole database at 129 incidents, behind improper access control. This is what happens when something reads an AMM pool's instantaneous price as truth. Use a time-weighted or external feed for anything that liquidates or mints.
- Reentrancy, 63 incidents and about 460 million dollars. Still live, and not just in hand-written code: the Curve incident of July 2023, about 61 million dollars, came from a compiler bug in Vyper rather than the protocol's own logic.
- Token and share accounting cost about 1.45 billion dollars across 158 incidents. Integer division in the wrong direction is a slow leak, and it's the kind of bug an auditor finds and a test suite usually doesn't.
- Front end and infrastructure, 95 incidents and about 1.04 billion dollars. Your DNS, your CDN and your build pipeline are part of the attack surface. Publishing the interface to IPFS and pointing an ENS name at it removes one of those.
- Key compromise is the largest bucket by value: 152 incidents, about 8.55 billion dollars. Read that as the case against a live upgrade key held by one multisig with convenient signing.
Sandwich attacks and MEV are a design problem rather than a bug: on any public mempool a searcher can front-run and back-run a swap with a visible slippage tolerance. Mitigations are architectural: private order flow, batch auctions, or moving matching off the mempool entirely.
Audit and bounty budget
Budget for the review properly. Uniswap put v4 through nine audits, a 2.35 million dollar security competition with more than 500 participants, and a bug bounty of up to 15.5 million dollars before shipping on 31 January 2025, per its own launch post. No first venue matches that, but the sequence carries over: an external review before mainnet, and a standing bounty afterwards large enough to beat the value of exploiting the bug. Our guides to smart contract audits and blockchain security go deeper, and the DeFi protocol taxonomy helps when you're choosing what to compose with.
Where the regulation currently stands
In the EU, MiCA turns on whether an operator can be identified. Recital 22 says that where crypto-asset services are provided in a fully decentralised manner without any intermediary, they should not fall within the scope of the regulation, as the French regulator summarises. The catch is that MiCA never defines fully decentralised in its operative articles, so the exemption is assessed against the facts of each system. Practically: if there is a company operating the front end, taking a fee, holding an upgrade key or curating listings, assume you're inside the perimeter and take advice early.
In the United States, one thing is settled: the IRS rule that would have treated certain DeFi front ends as brokers was disapproved by Congress under the Congressional Review Act and signed as Public Law 119-5 on 10 April 2025, which means the rule has no force or effect. The broader market-structure question isn't settled. H.R. 3633, the Digital Asset Market Clarity Act, passed the House on 17 July 2025 by 294 votes to 134, was reported out of Senate Banking with a substitute amendment on 1 June 2026 and placed on the Senate calendar, and a motion to proceed with a cloture motion was filed on 8 August 2026. On 15 September 2026 cloture on that motion was not invoked, 49 votes to 50, and a motion to reconsider was entered, per the bill's Congress.gov record. As of 14 November 2026 no later floor vote is recorded and the bill hasn't passed the Senate. Until it does, anything written about how US law will treat a DEX operator is a forecast.
DEX development launch checklist
A DEX development launch checklist is the list of work outside the contracts that has to be done before mainnet: liquidity, listings, hosting, legal cover and monitoring. Most of what goes wrong after launch is on it.
What we have built in this space
Idealogic's exchange work has been on the custodial and hybrid side, not on pure DEXs. We built ACM, where a matching engine feeds a risk-control layer for margin and derivatives, alongside hardware-wallet custody, fiat rails and a debit card. We built Planetcoin for first-time buyers, where a card payment becomes crypto in seconds and the fee is on screen before the buy is confirmed. And we built SeedBox, a DeFi venture-investing platform whose on-chain logic is Solidity while profile, tier and pool metadata sit in PostgreSQL behind an AdonisJS backend.
That last one is the part that transfers to a DEX. Most of the judgement in a DEX build goes into deciding which state has to be on-chain and which is faster, cheaper and safer off it, then keeping the on-chain surface small enough to review properly. We apply that same boundary discipline in full crypto exchange development, our broader web3 development guide, the background pieces on DeFi as a trend and DeFi development companies, and the rest of the practice lives on our blockchain development and fintech hubs.
Build vs rent: 36-month TCO of a DEX stack
The build-versus-rent question gets serious once a wallet, fintech app or DeFi team passes $150M a year in base trading volume. That's $12.5M a month, either as spot or as perps at 4x leverage, which makes $50M of notional. At that size there are three commercial paths. You can embed aggregator liquidity APIs (0x Swap API, 1inch Fusion+). You can launch a white-label perpetuals front end on shared order-book infrastructure (Orderly Network, dYdX v4 Chain). Or you can own a hybrid DEX stack: Uniswap v4 PoolManager Hooks with EIP-1153 transient-storage flash accounting, an off-chain Rust or TypeScript CLOB sequencer with on-chain EVM or Solana settlement, and a CoW-style or ERC-7683 cross-chain intent solver. Passkey onboarding (compared in our Privy vs Dynamic evaluation) and institutional MPC vaults for treasury and market makers (covered in Fireblocks vs BitGo) plug into the owned settlement perimeter.
Rented rails win in two cases. Pick 0x Swap API or 1inch Fusion+ when swapping is a convenience widget inside a consumer wallet doing under $3M a month and you don't want to bootstrap liquidity. Pick Orderly Network or a dYdX v4 white-label front end when a trading community wants perpetual markets with high leverage and can't capitalize market-maker vaults up front.
The matrix below models 36 months at $150M a year. Users pay base-chain gas (or it's sponsored equally), and LP compensation and market-maker rebates are treated the same across venues. The $3,000 monthly API plan, the 15 bps aggregator spread and the 5 bps taker fee are modelling assumptions, not quoted vendor rates.
Over 36 months at $150M a year, the owned hybrid DEX stack built in CEE comes out $495,000 cheaper than 0x Swap API or 1inch Fusion+ rails and $663,000 cheaper than an Orderly Network or dYdX v4 white-label broker. You also keep the protocol fee switch and the pricing logic. Most of the gap is recurring venue fees: $783,000 and $900,000 over the period, on those assumptions.
Idealogic's 2026 build tiers for an owned DEX or hybrid order book compare senior CEE blockchain development teams at $75/hr blended, anchored in the 2025 EU whole-economy hourly labour cost benchmark (lc_lci_lev, EUR 34.9), with US blockchain agencies at $165/hr blended, 2.2x higher. Tier 1 includes a Hook and a multi-hop router, so it runs longer than the plain AMM fork in the cost section above.
Where decentralized exchange development goes next
Volume is consolidating into a handful of venues while the count of venues keeps growing, so a new DEX competes on distribution and on a specific liquidity thesis. A swap page alone won't do it. Hooks and intents both push logic out of the pool: one into attached contracts, the other into a competitive auction, and both make the pool itself less of a differentiator than it was three years ago. The licence clock on Uniswap v4 runs out in June 2027, and a lot of currently impossible forks become possible that week.
If you're scoping decentralized exchange development or a smaller DEX development project now, three decisions carry most of the risk. Pick the pricing model against your actual pairs rather than against the most impressive whitepaper. Read the licence of anything you plan to fork before the sprint plan is written. And budget the audit and the bounty as part of the build rather than as a line you cut when the timeline slips, because the audit is what stands between your contracts and the incident list above. If you want a second pair of eyes on those three calls before you commit a quarter to them, get in touch.

CTO and Co-founder at Idealogic. Directing engineering, systems architecture, security, and full-stack delivery across web, mobile, and blockchain.
Frequently asked questions
A DEX charges a swap fee. On most automated market makers the whole fee goes to liquidity providers by default, and the protocol keeps nothing until governance turns on a protocol fee. Uniswap did exactly that: its UNIfication proposal executed on 29 December 2025 and set the v2 split at 0.25 percent to liquidity providers and 0.05 percent to the protocol. DeFiLlama's 30-day figures on 10 September 2026 show what that looks like in practice: about 160.7 million dollars in fees paid by traders across Uniswap, of which about 12.97 million reached the protocol. The other revenue lines are front-end fees charged by whoever runs the interface, a token, and order-flow arrangements.
By 30-day spot volume on DeFiLlama, captured on 10 September 2026, the largest venues classified as DEXs were Uniswap at about 65.5 billion dollars, PancakeSwap at 29.1 billion, PumpSwap at 20.5 billion, Aerodrome at 13.7 billion, BisonFi at 8.3 billion, Orca at 7.1 billion, Metric at 6.2 billion, Meteora at 5.5 billion, Raydium at 5.2 billion and Hyperliquid's spot order book at 4.7 billion. That ranking moves week to week, so treat it as a snapshot and re-measure before you quote it.
Pick the pricing model first, because it decides everything downstream. Then build in this order: the pool and settlement contracts, a router that finds the best path across pools, an indexer so the interface can read history without scanning the chain, the front end and wallet integration, and monitoring that watches the contracts in production. Budget an external audit before mainnet and a bug bounty after it. If you're forking an existing codebase, read its licence before you write a line, because Uniswap v4 core stays under a Business Source Licence until 15 June 2027 unless the DAO sets an earlier date on-chain.
For greenfield builds written from scratch at a $100 per hour ($4,000 per engineer-week) global benchmark, a single-chain AMM fork runs about 26 engineer-weeks ($104,000), a custom concentrated-liquidity invariant about 88 ($352,000), and a full ground-up order-book venue about 155 ($620,000) before external audit fees. When composing modular Uniswap v4 Hooks, Rust sequencers, and ERC-7683 solvers in 2026, senior CEE teams ($75 per hour) ship owned DEX tiers for $90,000 to $330,000 versus $198,000 to $726,000 at US agency rates ($165 per hour). So DEX development cost depends first on which of those two models fits your scope.
Custody, matching and settlement. A centralized exchange holds your assets, matches orders in its own database and settles internally, crediting balances it controls. A DEX doesn't take custody: you sign a transaction from your own wallet, the pricing rule lives in a smart contract, and settlement happens on-chain where anyone can verify it. The trade-off is that a DEX inherits the base chain's latency and cost, and it can't reverse a mistake for you.
Uniswap v3 core, yes. Its Business Source Licence carried a change date of 1 April 2023, after which the code converted to GPL v2 or later. Uniswap v4 core is a different matter: its licence names a change date of 15 June 2027, before which production use needs an additional use grant from the licensor. Forking is a technical decision as well as a legal one, because you inherit the original's assumptions and none of its audit coverage once you modify the code.
It depends on whether anyone can be identified as the operator. MiCA's recital 22 says that where crypto-asset services are provided in a fully decentralised manner without any intermediary, they fall outside the regulation, but MiCA never defines fully decentralised in its operative text, so the exemption is assessed case by case. In the United States the market-structure question is still open: the CLARITY Act passed the House on 17 July 2025 by 294 votes to 134, a Senate cloture vote on the motion to proceed failed 49 to 50 on 15 September 2026, and as of 14 November 2026 the bill hasn't passed the Senate.
On the model in this article, a single-chain AMM fork takes roughly 9 to 11 calendar weeks with three engineers, a custom concentrated-liquidity DEX 18 to 22 weeks with five, and a hybrid order-book venue 20 to 24 weeks with eight. Add audit time on top: Sherlock's former contest guidance put a 2,000-line Solidity scope at about a 12-day contest, plus judging, remediation and fix verification afterwards.
0x Swap API and 1inch Fusion+ let you earn an integrator spread on aggregator order flow, and you don't have to bootstrap pools. Orderly Network and dYdX v4 white-label perpetual rails share liquidity with you and charge a base protocol taker fee on leveraged notional volume; this article models that fee at 5 basis points, so check the current schedules. An owned Uniswap v4 PoolManager Hook, or a hybrid off-chain CLOB with an ERC-7683 cross-chain intent solver, pays no external basis-point split and keeps the protocol fee switch in your hands.
At $150M in annual base trading volume ($12.5M per month spot, or $50M per month of 4x leveraged perpetual notional) over 36 months, rented 0x Swap API or 1inch Fusion+ routing rails total roughly $933,000, and an Orderly Network or dYdX v4 white-label broker stack at 5 basis points across $50M monthly leveraged perp notional totals roughly $1,101,000. Building an owned hybrid DEX stack in CEE at $75/hr totals roughly $438,000 all-in, including $180,000 of engineering CapEx and a $60,000 external audit. That's $495,000 to $663,000 less. The spreads and plan prices are modelling assumptions.
More from the journal

Privy vs Dynamic in 2026: Embedded Wallets, MPC & TCO
Privy vs Dynamic in 2026, with Turnkey and Web3Auth in the mix: how each embedded wallet holds keys (Shamir shares in Nitro enclaves vs Fireblocks TSS-MPC), where per-MAU and per-signature pricing bite, and when owned ERC-4337 passkey smart accounts win on 36-month TCO.

Fireblocks vs BitGo (2026): MPC-CMP, Qualified Custody & TCO
Fireblocks vs BitGo for institutional crypto custody in 2026: MPC-CMP signing and SGX policy enclaves vs BitGo Qualified Custody, up to $250M custodial insurance, Go Network settlement, and a worked 36-month TCO at $80M treasury and 75k wallets.

Blockchain Development Cost in 2026: Contracts, dApps & TCO
A Web3 budget tracks on-chain risk, custody boundaries, and audit scope rather than screen count. Here is blockchain development cost in 2026 across smart contracts, DeFi dApps, RWA tokenization, CEE vs US rates, audits, and RPC OpEx.