Slippage is the price difference between when you submit a trade and when it executes. In DeFi, slippage occurs due to liquidity depth, trade size, and market volatility during transactionconfirmation.
How Slippage Works
Expected vs Actual
Expected: 1 ETH = 2,000 USDC
You submit trade
Price moves during confirmation
Actual: 1 ETH = 1,990 USDC
Slippage: 0.5% (10 USDC lost)
Trade: Buy 10 ETH with USDC
Expected price: 2,000 USDC per ETH
Expected cost: 20,000 USDC
Actual execution: 1,980 USDC per ETH
Actual cost: 19,800 USDC
Slippage = ((2000 - 1980) / 2000) × 100 = 1%
Copy link
AMM Price Impact
How AMMs Work
Constant product formula: x × y = k
Larger trades = more price impact
Liquidity depth matters
Price Impact Example
Pool: 1,000 ETH + 2,000,000 USDC
Price: 1 ETH = 2,000 USDC
Buy 10 ETH:
- Remove 10 ETH
- Add 20,200 USDC (k constant)
- New price: 1,990 USDC
- Impact: 0.5%
Buy 100 ETH:
- Remove 100 ETH
- Add 210,526 USDC
- New price: 1,895 USDC
- Impact: 5.26%
High liquidity pairs (ETH/USDC)
| Stablecoin pairs (USDC/USDT)
Fast networks (L2s)
Slippage Tolerance
What It Means
Maximum acceptable slippage
Trade reverts if exceeded
Protects from bad execution
Choosing Tolerance
Too low (0.1%):
- More failed transactions
- Wasted gas fees
- Better execution when succeeds
Too high (5%):
- Rarely fails
- Bad execution
- MEV bots exploit
Optimal (0.5-1%):
- Balance of success and execution
- Standard for most trades
Copy link
Slippage Protection
Settings
Set max slippage tolerance
Understand trade will revert if exceeded
Balance between protection and success
Timing
Trade during low volatility
| Avoid major news events
Use limit orders when possible
Split large trades
Platform Choice
Use aggregators (1inch, Jupiter)
Find best liquidity
Route through multiple DEXs
Reduce overall slippage
Slippage vs Price Impact
Price Impact
Definition: Effect of your trade on price
Predictable: Calculated before trade
Based on: Pool liquidity + trade size
Shown: In DEX interface
Slippage
Definition: Total price difference
Includes: Price impact + market movement
Unpredictable: Happens during confirmation
Hidden: Until transaction executes
Total Slippage = Price Impact + Market Movement
Copy link
Examples by Trade Size
Small Trade (0.1% of pool)
Pool: 1,000,000 USDC + 500 ETH
Trade: Buy 0.5 ETH
Price impact: 0.1%
Market movement: 0.05%
Total slippage: 0.15%
Result: Minimal
Copy link
Medium Trade (1% of pool)
Pool: 1,000,000 USDC + 500 ETH
Trade: Buy 5 ETH
Price impact: 1.0%
Market movement: 0.2%
Total slippage: 1.2%
Result: Noticeable
Copy link
Large Trade (10% of pool)
Pool: 1,000,000 USDC + 500 ETH
Trade: Buy 50 ETH
Price impact: 11.1%
Market movement: 0.5%
Total slippage: 11.6%
Result: Significant loss
Copy link
Reducing Slippage
Trade Smaller
Split large orders
Execute over time
Use TWAP strategies
Find Better Liquidity
Use aggregators
| Compare DEXs
Choose deeper pools
| Use stable pairs
Time Your Trades
Avoid volatility
Trade in low-activity periods
| Don't trade during news
Use Limit Orders
Set exact price
Wait for fill
No slippage (if filled)
Available on many DEXs
MEV and Slippage
Sandwich Attacks
1. You submit: Buy 10 ETH (2% slippage)
2. Bot sees: Your transaction in mempool
3. Bot buys: Front-runs your trade
4. Your trade: Executes at worse price
5. Bot sells: Back-runs for profit
6. You pay: Higher slippage