Learn: exchanges
What is price impact in crypto?
Price impact is how much your own trade moves the price against you. In a constant-product pool it is the input after fees divided by the input reserve plus that amount, so it depends on your size relative to the pool. A trade worth 10% of the reserve has an impact of about 9%.
How it works
Every trade consumes some liquidity. On an order book that means walking down the levels; in a pool it means sliding along the curve. Price impact is the part of a worse fill caused by your own trade, before anything else happens. It is fixed by the size of your trade and the depth of the market, and you can calculate it before you send anything.
In a constant-product pool the formula is short: impact = a(1 - f) / (rIn + a(1 - f)), where a is your input, f the fee and rIn the reserve of the token you put in. The important ratio is a / rIn. At 1% of the reserve the impact is about 1%; at 10% it is about 9%; at half the reserve it is about a third. Impact rises with size and never reaches 100%.
Price impact is not the same as slippage tolerance. Impact is what your trade does to the price. Tolerance is how much worse than the quote you will accept, to cover other trades landing first. Bots look at the gap between the two; see MEV.
The exact rule the games grade by
The rule the games use: price impact = a(1 - f) / (rIn + a(1 - f)), with a your input, f the fee and rIn the input reserve. It equals 1 - (execution price without the fee) / spot price, and it excludes the fee. Output = rOut x a(1 - f) / (rIn + a(1 - f)), rounded down. In the AMM Swap game you predict the impact first, then set a tolerance in the safe window.
Step by step
- Read the reserve of the token you are putting in, and the fee.
- Take the fee off your input: a(1 - f).
- Impact = a(1 - f) / (reserve + a(1 - f)).
- If the impact is large, the trade is large for this pool: split it, use a deeper pool, or trade less.
- Only then set a slippage tolerance a little above the drift you expect from other trades.
Worked example
Use the pool from the AMM guide: 100 ETH and 300,000 USDT, spot 3,000.00, fee 0.30%. The diagram plots the impact of a USDT buy as it grows from nothing to half the USDT reserve.
A buy of 3,000 USDT, 1% of the reserve, has an impact of 0.99%. At 15,000 USDT (5%) it is 4.75%. At 30,000 USDT (10%) it is 9.07%, which is why that swap gets 9.0661 ETH at an average of 3,309.03 instead of 3,000.00. At 60,000 USDT (20%) the impact is 16.62%, and at 150,000 USDT, half the reserve, it is 33.27%.
The curve is steep at first, then bends. Each extra dollar buys a little less than the one before, so very large trades in small pools are expensive no matter how they are timed.
Takeaway: Impact depends on your size against the reserve: 0.99% at 1%, 9.07% at 10%. A large impact is a sign the trade is too big for the pool.
Common mistakes
- Confusing price impact with slippage tolerance. Impact is caused by your own trade and is known in advance. Tolerance is the extra room you allow for other trades. Setting a tolerance below your impact does not reduce the impact; the quote already includes it.
- Looking at the pool size in dollars only. Impact depends on the reserve of the token you put in. A pool that looks large in total can still be thin on the side you need.
- Ignoring impact on the way out. A small token may let you buy with modest impact while the pool is busy, then have far less liquidity when you want to sell. The exit can cost much more than the entry.
What this does not tell you, and what can go wrong
The formula covers a clean constant-product pool. Real routes can split a trade across pools and designs, and concentrated-liquidity pools have different, often lower, impact inside their price range and much higher outside it. A wallet's displayed impact may also be computed differently.
Low price impact means the trade is small for the pool. It does not mean the token is sound, the pool is safe, or the price is fair. Thin pools for little-known tokens are where impact, rug pulls and fake tokens often meet.
Questions people ask
What is a high price impact in crypto?
Any impact that is large compared with what you expect to gain is high for you. As a rule of size, an impact of several percent means your trade is a meaningful share of the pool, and a few more trades like it would move the price a lot.
How is price impact different from slippage?
Price impact is the effect of your own trade on the price, computed from the reserves or book before you trade. Slippage is the total gap between the price you expected and your fill, which includes impact plus anything that changed before your trade executed.
Does the swap fee count as price impact?
Not in the definition used here. The fee is taken off the input first, and impact measures the move along the curve from what is left. The fee is a separate, stated cost, so a full cost estimate adds the two.
How can I reduce price impact?
Trade a smaller share of the pool: use a deeper pool, split a large trade into parts over time, or trade less. Each part still has some impact, and splitting adds network fees, so there is no free option.
Practise it
Reading about a rule is not the same as applying it. These games generate a fresh simulation each round, ask you to make the call first, and grade you against the same rule.
AMM Swap
Predict the price impact of a swap in an x*y=k pool, then set the slippage tolerance.
MEV Sandwich
A swap waits in the public queue. Play the sandwich bot: find the largest front-run its slippage tolerance allows.