DeFi exchange development starts with a choice between five exchange models: an automated market maker, an onchain order book, a request-for-quote system, an aggregator and a perpetual futures venue. This guide compares what each model needs at launch, its main technical risks, its cost drivers and the rules that apply.
The DEX development guide covers the build steps for an AMM, and the decentralised exchange software guide compares forks, licenses and ready-made software. This page covers the step before both, which is the choice of exchange model.
Five DeFi exchange models
Automated market maker (AMM)
Liquidity providers (LPs) deposit pairs of tokens into pools, and a formula sets the price. Constant-product pools use the formula x ยท y = k and suit volatile pairs. Stable-swap curves suit assets that should trade near the same price, such as two dollar stablecoins. Concentrated liquidity lets each LP choose a price range, which adds depth near the current price.
An AMM can launch on any smart contract chain and needs no professional market makers, which is why most early DeFi trading used AMMs. When the market price on other venues moves, arbitrage traders buy from or sell to the pool at the old price, and the LPs lose the difference, which is called impermanent loss or loss-versus-rebalancing.
Uniswap v4 went live on January 31, 2025 on ten chains and adds hooks, which are plugin contracts that run custom logic at points in a pool's life, such as before a swap. Hooks allow dynamic fees and other features without a new AMM from scratch. The Uniswap clone guide explains each Uniswap version.
Onchain central limit order book (CLOB)
Makers post bids and asks, and a matching engine pairs them. A fully onchain book was too costly on Ethereum mainnet, because every new order and every cancel costs gas. Fast chains and app-specific chains make onchain books practical. Hyperliquid, for example, runs its own layer 1 chain with onchain order books for perpetual futures and spot trading.
Many "onchain" books match orders off the chain and settle trades on the chain. Off-chain matching is faster, but users must trust or verify the operator of the matching engine. An order book has tight spreads only when market makers post orders on it.
Request for quote (RFQ)
In an RFQ system, the user asks for a price, and one or more market makers sign a firm quote, which the user then submits to a settlement contract. The quote has no slippage, and bots cannot front-run it. RFQ works well for large trades in liquid assets, but it needs market makers connected to the system.
Aggregator and intent-based exchange
An aggregator holds no liquidity of its own and routes each trade to the venues with the best price. An intent-based exchange lets users sign an order, and third parties called solvers compete to fill it. CoW Protocol, for example, groups signed orders into batch auctions, in which solvers first match a buy order directly with a sell order in the same batch. For orders that find no match, the solvers search AMMs, aggregators and market makers.
The DEX aggregator guide covers router and resolver designs. The aggregator model needs the least capital and the most data engineering.
Perpetuals and derivatives
Traders open leveraged positions against a pool, an order book or a virtual AMM, which prices trades with an AMM formula but holds no real tokens. Funding payments between long and short traders keep the contract price close to an oracle index price. Perpetuals are the most complex model to build. The design must track each trader's margin and close positions that fall below it, and it needs an insurance fund, a plan for slow oracle updates, and a rule that shares losses among traders if the insurance fund runs out.
Perpetuals also draw the most attention from regulators, because most countries regulate leveraged derivatives.
DeFi exchange models compared
| Model | Needs at launch | Main technical risk | Relative build effort |
|---|---|---|---|
| AMM | Seed liquidity and LP rewards | Errors in pool math; attackers can move the pool price to fool other apps that use it as a price feed | Low for a fork, medium for a new curve |
| Order book | Market makers and a fast chain | Unfair matching, front-running | Medium to high |
| RFQ | Signed quotes from market makers | Replayed signatures, expired quotes | Medium |
| Aggregator | Accurate data on other venues | Token approvals to the router, unsafe external calls | Medium, mostly off-chain work |
| Perpetuals | Oracles, liquidity and liquidators | Chains of liquidations, oracle manipulation | High |
Parts every DeFi exchange needs
- Settlement contracts. These contracts never trust a price that the user supplies, and every swap sets a minimum output or a maximum input.
- Oracle plan. An AMM needs an outside price feed when the same platform offers lending, leverage or rewards that depend on prices.
- Indexer and API. The indexer feeds charts, trade history and positions. A public API lets other apps and aggregators route trades to the exchange.
- Wallet connection and signing. Any order signed off the chain uses EIP-712 typed data, so the wallet shows the user what they sign.
- Admin controls. Admin keys sit behind a multisig and a timelock, and a public policy states when the team may use the pause function.
- Monitoring. Alerts cover unusual price moves, large withdrawals and failed transactions.
Cost and timeline of DeFi exchange development
A fork of an established AMM with a custom front end takes a small team a few months. A typical team has two smart contract engineers, one or two front-end developers and one backend developer for indexing, and the project also needs an external audit.
A new AMM curve, an order book or an RFQ system needs more design and testing time and usually a second audit. A perpetuals venue is a long project with a larger team and ongoing security work after launch.
Liquidity is often a larger cost than engineering, including LP rewards, market maker agreements and the token supply that pays for both.
Regulation of a DeFi exchange
Regulators treat a team as a service provider more often when it runs the front end, holds admin keys, charges fees or offers leverage. In the EU, MiCA requires crypto-asset service providers to hold an authorization but excludes services that are provided in a fully decentralized way. A team that controls an exchange interface may still fall within MiCA.
The last MiCA transition periods for existing providers ended on July 1, 2026. In the US, the CFTC oversees derivatives, and the SEC oversees tokens that are securities. Regulators compare claims of decentralization with what the team controls.
Frequently asked questions
What is a DeFi exchange?
A DeFi exchange lets users trade tokens through smart contracts from their own wallets, and the exchange does not hold user funds in its own account.
Which model should a first-time team choose?
Most first-time teams choose an AMM fork or an aggregator on a chain they know well. Both models can launch without professional market makers, while order books and derivatives need market maker relationships first.
Can one exchange combine several models?
Yes. Many exchanges run AMM pools, accept RFQ fills and route trades through an aggregator. Most start with one model and add others as trading volume grows.
Is a hybrid exchange the same thing?
No. A hybrid exchange usually matches orders on a central server and settles trades without holding user funds. The hybrid crypto exchange development guide covers that design. In a hybrid design, users must trust the matching server, and the operator may need an exchange license.
How important is the choice of chain?
The chain sets the gas cost, the models that are practical, the wallets and assets available, and the existing liquidity.