DeFi Safety
What is Slippage?
The difference between the price you expect on a trade and the price you actually get, caused by the trade moving the pool as it executes.
How it works
In a thin pool, a large buy eats through the available liquidity and the average fill price drifts against you. Slippage tolerance is the maximum drift you'll accept before the trade reverts.
Example
In practiceYou set 1% slippage tolerance; if the price moves more than that before your swap confirms, it fails rather than filling at a bad price.
Higher or lower slippage tolerance?
Lower protects you from bad fills and sandwich attacks; too low and your trade fails in normal volatility. Match it to the pool's depth.
Go deeper: DeFi From Scratch
The complete, step-by-step guide — every command, config, and the reasoning behind it.
Get the guide