Home / Crypto / Academy / Markets, venues and execution

Swapping, slippage and getting sandwiched

Two invisible costs sit on every on chain swap. Both are manageable once you know they exist.

MODULE 14 OF 64 LEVEL 3: MARKETS, VENUES AND EXECUTION 8 MIN

Price impact is not slippage

Price impact is how much your own trade moves the price, because you are buying from a finite pool. On a thin pair a modest trade can move it several percent. This is a real cost and it is shown before you confirm.

Slippage tolerance is how much worse than quoted you will accept before the transaction reverts. It is a protection, not a cost.

Why setting slippage high is expensive

A high tolerance tells bots exactly how much room they have. A sandwich attack buys immediately before you, pushing the price up, lets your trade execute at the worse price, then sells immediately after. Your tolerance defined their profit.

If a swap will not go through, raising slippage to twenty percent is not the fix. Find out why. Usually it is a transfer tax, thin liquidity, or a missing approval, and there is a proper answer to each.

How to protect yourself

READ NEXT

BEFORE YOU MOVE ON

Common questions

What is a sandwich attack?

A bot buys just before your trade to push the price up, lets yours execute at the worse price, then sells just after. Your slippage tolerance sets how much it can take.

What slippage should I set?

As low as will reliably execute. On a liquid pair a fraction of a percent is usually enough. Needing a large tolerance is a signal about the token, not a setting to accept.

Risk warning: crypto is highly volatile and largely unregulated. You can lose everything you put in. Nothing here is financial, investment or tax advice.

← PREVIOUS
Stablecoins: what they are and how they break
NEXT →
Bridges, chains and cross chain risk