AMM Swaps: Slippage, Price Impact, and Routing
How automated market makers like Uniswap V4 and Curve actually price trades, what slippage tolerance really means, and why aggregators usually beat single-venue swaps.
35 min · advanced · part of Trading Mechanics & Order Flow
The AMM Revolution
Centralized exchanges match orders against an order book maintained by professional market makers. **Automated market makers** (AMMs) replace that order book entirely with a smart-contract liquidity pool and a deterministic pricing formula. There are no resting orders, no market makers in the traditional sense, no matching engine. There is just a pool of two (or more) tokens and a function that says: "If you put in X of one, you get out f(X) of the other."
That simple substitution rewrote how on-chain trading works. Uniswap V1 (Nov 2018) was the first widely adopted AMM. By 2026, AMMs route the majority of on-chain spot volume on Ethereum and most EVM chains. **Uniswap V4** launched January 31, 2025 with hooks (smart-contract callbacks at each pool operation), singleton pool architecture (gas-saving consolidated contract), and flash accounting. By mid-2026 Uniswap V4 sits in the $4-6B TVL range and accounts for roughly 50-65% of DEX volume on Ethereum and major L2s depending on the week.
The reason AMMs matter is that they let anyone, with no permission and no professional infrastructure, both **provide liquidity** (deposit two tokens into a pool and earn fees from swappers) and **swap tokens** (against the pool, at a deterministic price). That permissionless property is what made the entire DeFi ecosystem possible. If you've ever swapped on Uniswap, SushiSwap, Curve, Balancer, PancakeSwap, Trader Joe, or Aerodrome — you've used an AMM.
But AMMs come with their own subtle execution challenges. The price you get is a function of pool depth and your trade size. The transaction goes through a public mempool where searchers and MEV bots can see it. The "slippage tolerance" setting in your wallet is meaningful in ways most users don't appreciate. And whether you use a single venue or an aggregator can change your effective price by 10-50 basis points or more.
This lesson covers how AMM pricing actually works (constant-product, concentrated liquidity, stable-swap), what slippage tolerance does and why setting it wrong is dangerous, how MEV bots exploit AMM trades, and why aggregators like 1inch, ParaSwap, 0x, and Matcha usually beat going directly to any single DEX.
Also in this lesson
- How AMM Pricing Actually Works
- Uniswap V4 in 2026
- Slippage Tolerance: What It Means and Why It Matters
- DEX Aggregators: 1inch, ParaSwap, 0x, Matcha
- Takeaways and Further Reading
Key terms
- Automated market maker (AMM)
- A smart-contract liquidity pool that prices trades using a deterministic formula (e.g., constant-product x*y=k) rather than an order book. The dominant on-chain trading model since Uniswap V1 (2018).
- Constant-product invariant
- The original Uniswap V2 AMM formula: x * y = k, where x and y are the pool reserves of two tokens and k is held constant by trades. Produces price impact proportional to trade size.
- Concentrated liquidity
- A Uniswap V3/V4 mechanism where liquidity providers deposit capital within a chosen price range instead of from zero to infinity, producing 1,000x-5,000x effective depth around the current price.
- Stable-swap
- Curve Finance's AMM formula optimized for pegged assets (stablecoin pairs, wrapped variants of the same asset), providing near-zero slippage near the peg with sharply increasing slippage if pushed away from it.
- Price impact
- The change in marginal price caused by your trade as it moves along the AMM pricing curve; mathematically distinct from a fee, it is the structural cost of trading on a finite-depth pool.
- Slippage tolerance
- The maximum acceptable price movement between quote and execution on a DEX swap; setting it too high enables MEV sandwich attacks, setting it too low causes failed transactions.
- DEX aggregator
- A protocol or front-end that queries multiple DEX pools, RFQ venues, and other liquidity sources, then routes your order across the best combination. Examples: 1inch, ParaSwap, 0x/Matcha, Odos.
- Uniswap V4 hooks
- Smart contracts called at specific lifecycle points of a Uniswap V4 pool (before/after swap, before/after add/remove liquidity), enabling dynamic fees, on-chain limit orders, MEV protection, and other custom behaviors.
- Sandwich attack
- An MEV strategy where a searcher front-runs a victim's swap to push the price unfavorably, lets the victim execute at the worse price, then back-runs to capture the spread. Enabled by too-high slippage tolerance and public mempool exposure.
- MEV (maximal extractable value)
- Value that block producers and searchers can extract by reordering, inserting, or censoring transactions within a block. Sandwich attacks, arbitrage, and liquidations are the most common MEV strategies.
Continue this lesson — 5 more sections in the CryptoBipto app.
Open lessonEducational only — not financial advice.
