AMMs Explained: How Uniswap Prices Without Order Books
Understand Automated Market Makers (AMMs) and how decentralized exchanges set prices using liquidity pools instead of traditional order books.
- Topic
- DeFi
- Reading time
- 7 min read
- Updated
- 7 Apr 2026

Overview
When we talk about decentralized finance (DeFi), one of the most fundamental mechanisms driving trading and pricing on platforms like Uniswap is the concept of Automated Market Makers, or AMMs. If you are familiar with traditional stock exchanges, you are used to an 'order book' system: a place where buyers and sellers post specific prices, waiting for a match, much like a stock ticker. AMMs, however, operate on a fundamentally different principle: they price assets not through explicit order books, but through pools of liquidity.
This article will explain exactly how AMMs work, how they determine asset prices in decentralized exchanges (DEXs), and why this mechanism offers a different structure for monetary economics than traditional finance. We will look at the mechanics behind how platforms like Uniswap manage these price discoveries.
The Problem with Order Books: Introducing Liquidity Pools
To understand AMMs, we must first understand the traditional method. In a centralized exchange (CEX), price is determined by the interaction of supply and demand in an order book. Think of it like a physical market where buyers and sellers post bids and asks. If you want to buy Bitcoin, you look at the highest bid price and the lowest ask price to find a fair trade. This system requires constant matching and sophisticated matching engines to keep the book balanced.
In the world of DeFi, especially on DEXs, this order book mechanism can be inefficient for smaller or less liquid assets. If there are very few people trading a token, the order book might be thin, leading to wide spreads or even no trades at all. This is where the concept of liquidity pools comes into play.

How AMMs Calculate Price: The Constant Product Formula
AMMs bypass the need for a live order book by using mathematical functions to calculate the exchange rate directly from the assets locked in the pool. The most famous model, pioneered by Uniswap, is the Constant Product Market Maker (CPMM) formula. It looks something like this:
$$ ext{x} * ext{y} = ext{k}$$Where $ ext{x}$ and $ ext{y}$ are the amounts of the two tokens in the pool (say, Token A and Token B), and $ ext{k}$ is a constant value that must remain unchanged throughout all trades.
The Mechanics of a Trade
Let's trace a simple trade on a pool holding Ether ($ ext{ETH}$) and a stablecoin like DAI ($ ext{DAI}$). Suppose the initial state of the pool is $ ext{x} = 1000$ $ ext{ETH}$ and $ ext{y} = 100,000$ $ ext{DAI}$. The constant $ ext{k}$ is $1000 imes 100,000 = 100,000,000$.
egin{itemize} ibitem{step1}Initial State: The pool holds $ ext{x}=1000$ $ ext{ETH}$ and $ ext{y}=100,000$ $ ext{DAI}$. ibitem{step2}A User Trades: A user wants to sell $100$ $ ext{ETH}$ and receive $ ext{DAI}$. They deposit $100$ $ ext{ETH}$ into the pool. ibitem{step3}New State Calculation: The pool must now satisfy the equation: $( ext{x} + 100) * ext{y}' = ext{k}$. ibitem{step4}Result: The pool automatically calculates the new amount of $ ext{DAI}$ ($ ext{y}'$) required to maintain the constant $ ext{k}$. The price is implicitly set by the ratio of $ ext{y}'$ to the new $ ext{x}$ amount. extbf{In essence}, the price of $ ext{ETH}$ relative to $ ext{DAI}$ is determined by the ratio of the reserves in the pool, which is constantly adjusted by the trading activity.| Feature | Order Book (CEX) | AMM (DEX) |
|---|---|---|
| Price Discovery | Explicit bids/asks (Order Book) | Implicit via mathematical formula (Pool Reserves) |
| Liquidity | Requires sufficient posted orders | Requires locked assets (Liquidity Pool) |
| Mechanism | Matching Engine | Mathematical Curve (e.g., $ ext{x} * ext{y} = ext{k}$) |

The Role of Liquidity Providers (LPs)
If the mathematical formula dictates the price, who provides the assets to make that formula work? That is the role of Liquidity Providers (LPs). LPs are the users who deposit pairs of tokens into the AMM to supply the necessary liquidity for trading. They are essentially the suppliers of the pool.

AMM Evolution: Beyond the Constant Product
While the $ ext{x} * ext{y} = ext{k}$ model was foundational, as AMMs matured, developers realized that a fixed product model could lead to highly uneven liquidity distribution. This led to more sophisticated mathematical approaches designed to handle extreme price swings better.

Monetary Economics Implications
The shift from order books to AMMs has profound implications for monetary economics. In traditional finance, the price is a reflection of the *transactional friction*—the cost and speed of matching bids and asks. In DeFi, the price is a reflection of the *economic incentive* provided by the locked capital (the liquidity) and the mathematical structure of the protocol.
egin{itemize} ibitem{price_reflection}Price as Economic Equilibrium: The AMM price is not a negotiated agreement but an emergent property of the supply and demand dynamics within the pool, weighted by the capital locked by LPs. ibitem{capital_allocation}Incentives for Capital: LPs are incentivized by the potential yield generated by the pool, which is a direct reflection of the underlying asset prices, tying the economic value of the pool directly to the real-world value of the tokens. extbf{The key difference is this:} Traditional markets rely on the *promise* of a trade; AMMs rely on the *actual* locked capital to define the exchange rate.
Risks and Limitations of the AMM System
While AMMs offer incredible decentralization and accessibility, they introduce specific risks that must be understood by any participant.

Conclusion: The Future of Decentralized Pricing
Automated Market Makers have successfully decoupled the pricing mechanism from centralized intermediaries, allowing for the creation of transparent, permissionless exchanges. By using mathematical curves based on locked liquidity rather than explicit order books, AMMs provide a novel, automated way to discover asset prices. Understanding the interplay between the formula, the liquidity provided, and external market conditions is crucial for navigating the monetary landscape of DeFi.
Sources & Further Reading
