Skip to content
Finance Lessons

Automated Market Makers (AMMs)

Slippage and Price Impact: Why Big Trades Pay More

Why a large AMM swap gets a worse price than the quote — price impact on the constant-product curve, the difference from slippage, pool depth, slippage tolerance, and sandwich attacks.

8 min Updated Jun 4, 2026

You’ve seen the magic equation: x·y=k, and the rule that a swap walks the curve — the bigger your trade, the worse the price. That’s nice in the abstract. But you’re a trader now, you’ve got real money in your wallet, and the interface just flashed two scary words at you: “Price impact: 11%” and “Slippage tolerance: 0.5%”. They sound like the same thing. They are not. One is a tax you can calculate before you click. The other is a surprise the blockchain springs on you between signing and mining.

This lesson untangles the two, shows you the arithmetic of why a whale pays more than a minnow for the exact same token, and arms you with the one setting — slippage tolerance — that stands between you and getting your face eaten by a bot. Let’s get specific.

Before you read — take a guess

You're about to swap a large amount into a small AMM pool. Before you even submit, the interface estimates you'll get a much worse average price than the current quoted spot price. Why?

Spot price vs execution price: the quote is a lie for big orders

Open any swap interface and it shows you a spot price — say ETH is $2000. That number is the marginal price: what one infinitesimally small slice of ETH costs right now. On a constant-product pool it’s just the ratio of reserves, spot=y/x\text{spot} = y/x. Buy a single wei of ETH and yes, you pay almost exactly $2000 for it.

But you’re not buying a wei. You’re buying 10 ETH. And here’s the catch: as you pull ETH out of the pool, x shrinks, y grows, and the price y/x climbs while your own order is filling. Each successive slice of your ETH costs more than the last. The price you actually end up paying — averaged over your whole order — is the execution price (also called the average price):

execution price=total Y paidtotal X received\text{execution price} = \frac{\text{total Y paid}}{\text{total X received}}

Spot is the price for a hypothetical zero-size trade; execution is the price for your trade. For a tiny order they’re nearly identical. For a big one, they diverge hard — and execution is always the worse of the two.

Fill in the two prices.

Pick the right option for each blank, then check.

The price is the marginal price for an infinitesimally small trade, equal to on a constant-product pool. The price is total Y paid divided by total X received for your actual order. For a large buy, the execution price is always than the spot price, because the trade .

Price impact: the tax you can compute before you click

Price impact is exactly how far your own trade drags the price away from spot. Define it as the gap between spot and your execution price, as a fraction of spot:

impact=spotexecutionspot\text{impact} = \frac{\text{spot} - \text{execution}}{\text{spot}}

The beautiful (and brutal) thing: it’s deterministic. Given the pool’s reserves and your trade size, the impact is fixed by arithmetic. No randomness, no other traders — just x·y=k. Let’s grind the numbers.

The pool. 100 ETH and 200,000 USDC, so k=100×200000=20,000,000k = 100 \times 200000 = 20{,}000{,}000. Spot price = 200000 / 100 = $2000 per ETH.

The whale buys 10 ETH. You’re taking ETH out, so x drops to 90. To keep k constant, the USDC reserve must rise to:

y=kx=20,000,00090222,222y' = \frac{k}{x'} = \frac{20{,}000{,}000}{90} \approx 222{,}222

So you must put in 222,222 − 200,000 ≈ 22,222 USDC to get 10 ETH. Your execution price is 22,222 / 10 ≈ $2222 per ETH — versus a spot of $2000. Price impact:

22222000200011%\frac{2222 - 2000}{2000} \approx 11\%

And the pool’s new spot price afterward is 222222 / 90 ≈ $2469 — you pushed the price up nearly 25% just by trading. (Your execution price of $2222 sits between the old spot $2000 and the new spot $2469, which makes sense: you filled across that whole range.)

The minnow buys 0.1 ETH. Same pool. Now x' = 99.9, and:

y=20,000,00099.9200,200y' = \frac{20{,}000{,}000}{99.9} \approx 200{,}200

You pay about 200 USDC for 0.1 ETH → execution ≈ $2002 per ETH, impact ≈ 0.1%. Essentially the quoted price.

Same token, same pool, same instant — the whale pays $2222 and the minnow pays $2002. The only difference is size relative to the pool. That’s price impact in one table:

TradeETH outUSDC inAvg (execution) pricePrice impact
Minnow0.1≈ 200≈ $2002≈ 0.1%
Whale10≈ 22,222≈ $2222≈ 11%

Using the 100 ETH / 200,000 USDC pool (k = 20,000,000), roughly what happens to the pool's spot price right after the whale's 10-ETH buy?

Watch the curve bite

Drag the trade-size slider and watch price impact climb as your order grows from a sliver to half the pool. Then flip the depth preset and see the same trade do far less damage to a deeper pool.

Price impact vs trade size9.09%
0%9%18%26%35%Slippage tolerance 0.5%0%Trade size (fraction of pool)50%Price impact

Pool depth

Spot price
$2,000.00
Execution price
$1,818.18
Price impact
9.09%
You receive
$18,181.82
Minimum received
$19,900.00
Slippage tolerance
0.5%

Exceeds slippage tolerance — trade would revert

Price impact is tiny for small trades and accelerates as your order becomes a large fraction of the reserves. Switch from Shallow to Deep and the same trade barely dents the price — depth is the trader's friend.

Slippage is NOT price impact: the surprise vs the tax

People mash these two words together constantly. Keep them apart — they have different causes:

  • Price impact is the expected move from your own trade size. You know it the instant you type the amount, because it’s baked into the pool’s reserves. It’s the tax you agreed to.
  • Slippage is the difference between the price you expected when you hit submit and the price you actually got when the trade mined — caused by the pool changing between quote and confirmation. It’s the surprise.

Why would the pool change in those few seconds? Because on-chain, time passes between signing and mining. Your transaction sits in the mempool waiting for a block. In that window, other people’s trades can land first — each one shifts the reserves — or the block is simply delayed while the market moves. By the time your swap executes, the spot price isn’t what the interface quoted. The extra gap, beyond the price impact you signed up for, is slippage.

Put crudely: price impact is what your order does to the price; slippage is what everyone else’s orders (and time) do to the price before yours lands. A tiny trade has near-zero price impact but can still suffer slippage if the market lurches while it’s pending.

They’re not, and conflating them will burn you. Price impact is fully determined before you submit: it’s a function of your trade size and the current reserves, full stop. If nothing else changed, your execution price would match the quote exactly. Slippage is the unexpected part — it only exists because the pool state at execution differs from the pool state at quote time, thanks to other traders’ swaps mining ahead of yours or the block lagging. A swap into a deep, quiet pool can have meaningful price impact (it’s a big order) yet almost zero slippage (nobody else traded). A tiny swap into a frantic pool can have near-zero price impact yet nasty slippage (the price moved out from under it). Different causes, different cures: shrink price impact by trading smaller or routing across pools; control slippage with the tolerance setting below.

Match each term to its precise meaning.

Pick a term, then click its definition.

Slippage tolerance: the guardrail you set

Since slippage is unpredictable, the swap contract lets you cap it. You set a slippage tolerance — say 0.5% — and the contract converts it into a hard floor called the minimum amount out:

min out=quoted out×(1tolerance)\text{min out} = \text{quoted out} \times (1 - \text{tolerance})

If, at execution time, the pool would give you less than that minimum, the transaction reverts — it fails, you keep your tokens (minus gas), and nothing trades. It’s a stop-loss against nasty fills.

Worked example. The interface quotes you 10 ETH out for your USDC, tolerance 0.5%. Then min out = 10 × (1 − 0.005) = 9.95 ETH. If, by the time your swap mines, the pool can only hand you 9.96 ETH, fine — that’s within tolerance, the trade fills. If it can only manage 9.9 ETH, the contract sees that’s below 9.95 and reverts the whole thing. You’d rather not trade than overpay by that much.

The setting is a balance, and both extremes hurt:

ToleranceRisk
Too tight (e.g. < 0.1%)Trades fail constantly in volatile moments — even a normal price wiggle trips the floor, you waste gas on reverts
Too loose (e.g. > 5%)You can get a genuinely bad fill, and you advertise a fat margin for bots to sandwich you

The right number depends on the pool: deep, calm pools tolerate a tight 0.1–0.5%; thin or fast-moving pairs need more room. Just know that every bit of slack you grant is a bit a bot is allowed to steal.

Sort each effect under the kind of slippage-tolerance mistake that causes it.

Place each item in the right group.

  • You execute at a noticeably worse price than quoted
  • Your swap reverts during a normal price wiggle
  • You waste gas on repeated failed trades in a volatile minute
  • A sandwich bot has lots of room to push your fill

Pool depth: why a $100k trade is nothing — or everything

Here’s the cleanest fact in this whole lesson: on a constant-product pool, price impact depends on your trade size as a fraction of the reserves, not on the dollar amount alone. Buy 10% of the ETH in any pool and you’ll get roughly the same price impact, whether the pool holds 100 ETH or 100,000.

So depth — the size of the reserves, i.e. a bigger k — is the trader’s best friend. Deeper pool ⇒ your fixed-dollar trade is a smaller slice of it ⇒ less price impact:

  • A $100,000 swap into a $100,000,000 pool is 0.1% of the reserves — barely a ripple, impact in the low basis points.
  • That same $100,000 swap into a $200,000 pool is half the reserves — a catastrophe, double-digit impact, you’ll move the price violently and pay through the nose.

Same trade, wildly different outcomes, purely because of depth. This is why blue-chip pairs on big pools feel almost like a centralized exchange, while a thin meme-coin pool punishes anything but dust. When you’re sizing a trade, the question isn’t “how many dollars?” — it’s “what fraction of this pool am I?”

A $100,000 swap caused only 0.05% price impact in pool A but 12% price impact in pool B. What's the most likely explanation?

Splitting and routing: how pros dodge the impact

If price impact comes from being a big fraction of one pool, the fix is obvious: don’t be. Traders split a large order into smaller pieces spread across time (let the pool recover between slices, often via arbitrage) or across multiple pools and routes (take some ETH from the Uniswap pool, some from another, some through an intermediate token), so no single pool absorbs the whole shock. Aggregators and routers (1inch, Uniswap’s own router, CoW Swap) do this automatically — they shatter your order across the deepest available liquidity to minimize total price impact, then hand you the best blended execution. You typed one swap; under the hood it became a dozen.

Sandwich attacks: why “too loose” gets you robbed

Remember that loose slippage tolerance invites trouble? Here’s the predator. Your swap sits in the public mempool, visible to everyone, before it mines. A sandwich bot sees it coming and wraps it in two transactions of its own — this is a flavor of MEV (maximal extractable value):

  1. Front-run: the bot buys the same token just before you, pushing the pool’s price up.
  2. Your trade fills at that worse, inflated price — eating right up to whatever your slippage tolerance allows.
  3. Back-run: the bot immediately sells into the price your trade just pushed even higher, pocketing the difference.

You’re the filling; the bot’s two trades are the bread. The profit it skims comes straight out of your pocket — and the amount it can steal is capped by your slippage tolerance. Set tolerance to 5% and you’ve told the bot, in writing, “you may worsen my price by up to 5% and I’ll still accept it.” Set it to 0.5% and the attack is barely worth the gas. This is the whole reason a tight, sensible tolerance matters, and it’s a preview of an entire later topic on MEV and transaction ordering — for now, just know: your slippage tolerance is the bot’s allowance.

Cause → effect: a trader leaves slippage tolerance at 8% on a large, public swap. How does that enable a sandwich attack?

Key Takeaways

Success:

What to remember

  • Spot price is the marginal price for a zero-size trade (y/x). Execution price is what your actual order averaged (total Y paid / total X received). For big trades, execution is always worse than spot.
  • Price impact = (spot − execution) / spot: how far your own trade moves the price. It’s deterministic — fixed by your size and the reserves before you click. A 10-ETH buy into a 100 ETH / 200k USDC pool costs ~11% impact; a 0.1-ETH buy costs ~0.1%.
  • Slippage is different: the gap between the price you expected at submit and the price you got at execution, because the pool changed between quote and mining (other trades land first, blocks lag). Impact is your own tax; slippage is everyone else’s surprise.
  • Slippage tolerance sets a minimum amount out = quoted out × (1 − tolerance); the swap reverts if it would fill worse. Too tight ⇒ trades fail; too loose ⇒ bad fills and sandwich bait.
  • Pool depth is your friend: price impact tracks your size as a fraction of the reserves, so a $100k trade is nothing to a $100M pool and a disaster to a $200k one. Pros split and route across pools to shrink impact.
  • A sandwich attack (MEV) front-runs and back-runs your public swap; your slippage tolerance caps how much it can steal.

Big picture

Slippage and price impact at a glance

  • Big-trade cost
    • Two prices
      • Spot = y/x (marginal)
      • Execution = total in / out
      • Execution worse for big trades
    • Price impact
      • Your own trade moves the price
      • Deterministic from reserves
      • Bigger fraction → bigger impact
    • Slippage
      • Pool changed quote → mine
      • Others' trades land first
      • The surprise, not the tax
    • Defenses
      • Tolerance → minimum out, or revert
      • Depth: trade in deep pools
      • Split & route across pools
      • Tight tolerance caps sandwiches
One-screen map of a trader's two big risks — and the dial that controls them.

Lesson 4 check

Question 1 of 50 correct

A pool holds 50 ETH and 100,000 USDC (k = 5,000,000), spot $2000. You buy 5 ETH. Roughly what USDC do you pay, and what's the price impact?

Check your answer to continue.

Next up: impermanent loss — you’ve seen how trades cost the trader; now flip sides and meet the hidden cost of being a liquidity provider, where simply holding the pool can leave you worse off than holding the tokens.

Mark lesson as complete