DeFi Fundamentals
Automated Market Maker (AMM)
An automated market maker is a smart contract that algorithmically prices and trades tokens using pooled liquidity instead of order books.
The difference between the expected price of a crypto trade and the actual execution price, caused by liquidity constraints or market movement.
Slippage is the difference between the expected price of a trade and the actual price at which it executes. In cryptocurrency markets, slippage most commonly occurs on decentralized exchanges where trade size relative to available liquidity directly affects the execution price. While some degree of slippage is a natural part of trading, excessive slippage can significantly erode returns, making it one of the most important concepts for anyone actively swapping tokens in DeFi.
Slippage arises from two distinct causes, and understanding both is essential for managing it effectively.
Automated market makers price assets along a mathematical bonding curve (most commonly the constant product formula x * y = k). When you execute a trade against a liquidity pool, you are adding one token and removing another, which shifts the ratio between the two assets. The larger your trade relative to the pool's total reserves, the further the price moves from the quoted rate.
For example, if a liquidity pool holds $10 million in combined reserves and you execute a $100 swap, the price impact is negligible. But if you execute a $500,000 swap against that same pool, you will consume a meaningful portion of one side's reserves, pushing the price significantly in the process. This price impact is deterministic and can be calculated before you submit the transaction.
The second cause of slippage is price movement between the moment a transaction is submitted and when it is confirmed on-chain. On networks with variable block times or during periods of congestion, a swap may sit in the mempool for seconds or even minutes. During that window, other trades can execute first, changing the pool's state and the price you ultimately receive. This type of slippage is unpredictable and is particularly pronounced during high-volatility market events.
Most DEX interfaces let users configure a slippage tolerance — the maximum percentage deviation from the quoted price they are willing to accept. If the final execution price exceeds this threshold, the transaction automatically reverts, and the user pays only the gas fee for the failed transaction.
Choosing an appropriate slippage tolerance requires balancing two risks:
For liquid major-pair swaps (e.g., ETH/USDC on a high-volume pool), a slippage tolerance of 0.1-0.5% is typically sufficient. For smaller or less liquid tokens, 1-3% may be necessary. Anything above 5% should be set with extreme caution and only when trading highly volatile or illiquid assets.
DEX aggregators like 1inch, Paraswap, and Jupiter split a single trade across multiple liquidity pools and sometimes across multiple DEXs, finding the optimal route that minimizes total price impact. Instead of executing your entire trade against one pool, the aggregator might route 60% through one pool and 40% through another, reducing the price impact on each.
For significant trade sizes, manually splitting the order into smaller transactions executed over time can reduce slippage. Each smaller trade has less price impact, and the pool has time to be rebalanced by arbitrageurs between your transactions. The trade-off is higher cumulative gas costs.
Slippage from time-based price movement is highest during market turbulence. Executing large swaps during calmer periods reduces the chance that the price will shift meaningfully between submission and confirmation.
The depth of a liquidity pool is the single biggest determinant of price impact. Pools with deeper reserves absorb large trades with less price movement. Before executing a swap, checking the total value locked in the relevant pool can help you estimate expected slippage.
Several DEX platforms now support on-chain limit orders that execute only at your specified price or better. Limit orders eliminate slippage entirely — you either get your price or the order does not fill. The trade-off is that your order may take time to fill or may not fill at all if the market never reaches your price.
Swapping between stablecoins (e.g., USDC to USDT) typically involves very low slippage because specialized pools like Curve's StableSwap pools use a modified bonding curve optimized for assets that trade near parity. These pools can handle large trades with minimal price impact.
Cross-chain swaps often involve higher slippage due to thinner liquidity on bridge pools and the added complexity of coordinating transactions across multiple networks. The price quoted at initiation may differ meaningfully from the final execution price after the bridge transaction settles.
When borrowers need to swap collateral types within a lending position or when liquidators sell seized collateral, slippage directly impacts the efficiency of those operations. High slippage during liquidation can turn what should be a profitable liquidation into an unprofitable one, potentially contributing to bad debt in the lending protocol.
Slippage is not always negative. Positive slippage occurs when the price moves in your favor between submission and execution, giving you a better deal than expected. Some DEX interfaces and aggregators pass positive slippage back to the user, while others may capture it as revenue. Checking how a platform handles positive slippage can affect the net cost of your trades over time.
Related Terms
DeFi Fundamentals
An automated market maker is a smart contract that algorithmically prices and trades tokens using pooled liquidity instead of order books.
DeFi Fundamentals
A liquidity pool is a smart contract holding pooled tokens that enables decentralized trading, lending, and other DeFi operations.
Risk & Security
A sandwich attack exploits a pending DEX trade by placing buy and sell orders around it to extract profit from the price movement.
DeFi Fundamentals
A decentralized exchange is a peer-to-peer trading platform powered by smart contracts that allows users to swap tokens without a central intermediary.