Table of Contents
- Automated Market Makers (AMMs)
- Problems With the AMM Model
- Order Book Model
- Order Book DEXs
- Problems With the Order Book Model
- Comparing AMMs and Order Book DEXs
- Output
Table of Contents
- Automated Market Makers (AMMs)
- Problems With the AMM Model
- Order Book Model
- Order Book DEXs
- Problems With the Order Book Model
- Comparing AMMs and Order Book DEXs
- Output
AMM vs Order Book DEXs


Key Takeaways
-
Most decentralized exchanges use the AMM trading model, while centralized exchanges prefer the order book trading model.
-
Centralized exchanges often rely on third-party market makers to complete orders and determine price, while AMM determines price automatically using asset ratios in liquidity pools.
-
The AMM model used on most decentralized exchanges is based on the constant product market maker function X*Y=K.
-
The AMM model is subject to price inaccuracies, impermanent loss, liquidity challenges, and smart contract risks.
-
The order book model is centralized, subject to manipulation, slippage, spoofing, regulatory scrutiny, and expensive to manage.
-
The choice of which exchange to use depends on individual needs as degen trades may only be possible on DEXs while limit orders may be possible on CEXs only.
Automated Market Makers (AMMs)
Automated market makers are the trading model for decentralized exchanges introduced by Uniswap in 2018. The model has several variations but the constant product market maker function, X*Y = K is considered the standard model most decentralized exchanges use. The order book model would be too slow and expensive to work on a decentralized exchange that works completely on-chain. To solve this problem, Uniswap adopted the AMM model which set precedence in the industry. The model is particularly efficient at handling transactions automatically without relying on third-party buy or sell requests like order books.
To understand AMM properly, and how X*Y = K makes sense in the real world, imagine a scenario where you log in to Uniswap to buy 1 ETH. Your selection of 1 ETH gets taken automatically by an ETH/USDT liquidity pool on Uniswap where other users and investors have added money to earn fees and rewards.
Assuming the pool that takes your order contains 100 ETH represented by X in the formula and 1 USDT represented by Y is worth $1, using our X*Y = K AMM model we will have a constant K for the pool as 100*265,000 = 26,500,000. In this case, you will notice that the value of 1 ETH in the pool is Y/X or 265,000/100 = 2,650 our current market price, and the value of 1 USDT is 100/265,000 = 0.00037735.
To purchase 1 ETH, you need to deposit X USDT into the pool and take 1 ETH. The price of ETH becomes (100 -1)*265,000+X = 26,500,000 which gives us (265,000+X) = 26,500,000/99 when we divide both sides by 99. We then have 265,000+X = 267,677 which becomes X = 267,677 - 265,000 = 2,676. Bingo! The pool has automatically determined the price of ETH to be 2,676 USDT which you must pay from your balance to receive 1 ETH.
A simple explanation of this process, if you are not interested in the numbers is that AMM uses liquidity pools that contain a cryptocurrency users may want to buy and another cryptocurrency they want to sell at a constant ratio such that any purchase or sale automatically reestablishes a new price for either asset in the liquidity pool. So in a BTC/USDC liquidity pool, the price is automatically set after anyone buys by taking one token and adding another, or sells by adding one token and taking another. The calculations above are what happens in the backend to determine the price, so you won’t see all that math on a decentralized exchange like Uniswap even though that is what happens when you trade.
Problems With the AMM Model
The AMM model is praised for its reliance on a provably predictable mathematical formula like we have just seen. It may, however, be subject to pricing inaccuracies which creates room for arbitrage between centralized and decentralized exchanges. There may also be liquidity challenges where there is not much volume in the pool or when assets are concentrated in specific liquidity pools. Impermanent loss is another issue where the price of the assets deposited in a liquidity pool becomes lower than the market price of the same asset held elsewhere. There is also the smart contract risk as hackers are constantly targeting large liquidity pools to steal funds.
Order Book Model
An order book provides a real-time look at all the orders to buy and sell a specific asset like Ethereum on a given platform, often a centralized exchange. It is a manual trading model that relies on third parties known as market makers for trade completion. Buy orders or bid prices are shown in green while sell orders or ask prices are shown in red. Millions of people buy and sell cryptocurrencies at constantly shifting prices at any given time on large centralized exchanges like Binance, Bybit, Coinbase, Kraken, and OKX. Order books are ordered by price and looking at any order book vertically, makes it easy to notice the variation in bid and ask prices, the average price of the asset under consideration, and the spread which is the difference between the highest buyer’s bid price, and lowest seller’s ask price. All orders are ranked according to their price difference from the current market price with the middle price being the average price of the asset.
When you place a limit order, your order gets added to the book and you are known as a maker. However, when you want to buy an asset immediately at the current market price, your order is a market order and you are a taker. If you place a market order to buy 1 BTC, for example, your trades get filled at a price close to the average market price of the asset. If there isn’t enough BTC to cover your trade at that amount, the order is moved to the closest ask price, and so forth until 1 BTC is purchased. Limit orders reduce the risk of slippage and offer the flexibility of manually setting the price at which you want to buy or sell an asset.
Order Book DEXs
Some decentralized exchanges are known to use on-chain or off-chain central limit order books. In on-chain order books, network validators index the last price an asset was traded on various exchanges to enable oracles to determine the index or average price of the traded cryptocurrencies. Using on-chain or off-chain order books allows these exchanges to provide various order types like limit, buy-stop, and trailing stop, without the risk of impermanent loss. Demex uses an on-chain order book, while dYdX uses an off-chain decentralized order book model.
Problems With the Order Book Model
Order books are centralized which undermines user sovereignty. Being managed by a centralized entity exposes order books to a high level of regulatory scrutiny as it may be difficult to comply with varying regulations across the globe. They are often subject to manipulation by large traders who place trades to influence the market price of an asset. The manipulation issue is a thing with order books because everyone can see everyone else’s orders. High-frequency traders can exploit the time lag between orders to their advantage. Order books are expensive to manage and smaller exchanges could take a significant hit as a result. Practices like dark pools where participants execute large trades without revealing their identity can be manipulative.
Comparing AMMs and Order Book DEXs
Limit orders on order books reduces slippage that would have resulted from large orders since these orders get filled slowly to minimize price impact. Low liquidity in order books may, however, lead to slow order matching due to limited market participants. Order books may also experience manipulative activities like spoofing where large orders are placed with no execution intentions to mislead market participants.
AMMs are automated and are less flexible as they allow trades only at the determined asset price. They, however, solve the problem of manually matching buyers and sellers by ensuring that users can always buy or sell assets whenever they want. The AMM trading model is also prone to slippage when the liquidity pools are not deep enough to handle large orders. The price of the asset can vary widely from the actual price in such a situation.
Output
Decentralized exchanges mostly use AMM while centralized exchanges favour the order book trading model. Extreme cases exist of decentralized exchanges that use order books and some hybrid models, although it is not considered efficient due to the cost and speed of order books.
While AMM on decentralized exchanges offers complete user autonomy and consistent trading at determined prices, order books are centralized and often require continuous bids and ask orders for trades to be completed. The AMM model is subject to smart contract risk and impermanent loss, although regulatory issues are rare with decentralized exchanges as they operate completely onchain.
Centralized exchanges with order books do not experience impermanent loss but they are exposed to high scrutiny and could easily be charged by authorities for misconduct. The decision on which exchange to use eventually rests on what you are interested in, for example, DeFi, or leverage trading and limit orders on centralized exchanges.
Disclaimer: This post was independently created by the author(s) for general informational purposes and does not necessarily reflect the views of ChainRank Analytics OÜ. The author(s) may hold cryptocurrencies mentioned in this report. This post is not investment advice. Conduct your own research and consult an independent financial, tax, or legal advisor before making any investment decisions. The information here does not constitute an offer or solicitation to buy or sell any financial instrument or participate in any trading strategy. Past performance is no guarantee of future results. Without the prior written consent of CryptoRank, no part of this report may be copied, photocopied, reproduced or redistributed in any form or by any means.
Read More

Miner Extractable Value (MEV): Are You Paying More for Using DEXs?


What Is RFQ and How It Changes Trading on DEXs

Table of Contents
- Automated Market Makers (AMMs)
- Problems With the AMM Model
- Order Book Model
- Order Book DEXs
- Problems With the Order Book Model
- Comparing AMMs and Order Book DEXs
- Output
Table of Contents
- Automated Market Makers (AMMs)
- Problems With the AMM Model
- Order Book Model
- Order Book DEXs
- Problems With the Order Book Model
- Comparing AMMs and Order Book DEXs
- Output