Slippage · trading

On this page 7

Slippage in trading is the difference between the expected price of an order and the executed price at which it actually settles. In DeFi, where swaps run against liquidity pools rather than order books, slippage arises mainly from price impact, from other transactions that change the pool before confirmation and from deliberate manipulation by bots.

Slippage can be negative, when the trader receives less than quoted, or positive, when the market moves in the trader’s favor. Decentralized exchanges therefore ask every user to set a slippage tolerance, a percentage limit beyond which the swap is reverted instead of executed at an unacceptable rate.

Why slippage occurs on decentralized exchanges

Slippage on a DEX occurs because the quoted price is calculated from the pool’s reserves at one moment, while the swap executes later against reserves that may have changed. Two separate effects are combined in the final figure: the price impact of the trade itself and market movement during the confirmation delay.

In a constant product automated market maker, the pool keeps the product of its two reserves constant, expressed as x * y = k. Each unit bought makes the next unit more expensive, so a larger trade relative to the pool moves the average execution price further from the starting spot price. This part is deterministic and visible in the quote before signing.

The second part is uncertain. Between signing and inclusion in a block, other swaps, arbitrage and liquidity withdrawals can alter the reserves. On a busy chain this window ranges from a few seconds to several minutes, depending on fees and network congestion.

The following table separates the main sources of slippage and shows which ones a trader can anticipate.

SourceMechanismPredictable before signing
Price impactTrade size shifts the pool reserve ratioYes, shown in the quote
Market volatilityAsset price moves on other venuesPartly
Competing swapsEarlier transactions change the reservesNo
Sandwich attacksA bot trades before and after the victimNo, but limited by tolerance
Token transfer feesFee-on-transfer tokens reduce received amountsYes, if the token is known
Sources of slippage in DeFi swaps

Slippage tolerance and its parameters

Slippage tolerance is the maximum adverse deviation a trader accepts, and the exchange interface converts it into a hard limit inside the transaction. For an exact-input swap the contract receives a minimum output amount, and for an exact-output swap it receives a maximum input amount. If execution would breach the limit, the whole transaction reverts and only the gas fee is lost.

Choosing the tolerance is a trade-off between execution certainty and exposure to extraction. The values below are common starting points, not universal rules, and they depend on pool depth and market conditions.

Market situationTypical toleranceReason
Stablecoin pairs0.05 to 0.1 percentPrices are tightly pegged and pools are deep
Major liquid pairs0.3 to 0.5 percentModerate volatility, deep liquidity
Mid-cap tokens0.5 to 2 percentThinner pools and faster price moves
New or illiquid tokens2 to 5 percent or moreHigh impact and frequent failures
Fee-on-transfer tokensFee plus a safety marginTransfer fee counts as slippage
Typical slippage tolerance by market situation

A transaction deadline complements the tolerance. It sets a timestamp after which the swap is invalid, which prevents a transaction stuck in the queue from executing much later at a stale but still technically acceptable price.

Slippage is only one component of the total cost of a swap, and it is often confused with fees or with losses borne by liquidity providers. Separating these costs helps traders compare venues and routes correctly.

CostWho bears itHow it differs from slippage
SlippageThe traderGap between quoted and executed price
Swap feeThe trader, paid to liquidity providersFixed percentage, known in advance
Gas feeThe trader, paid to the networkCharged even if the swap reverts
Bid-ask spreadThe trader on order book venuesExists before any order is placed
Impermanent lossLiquidity providersLoss versus holding, not a trade cost
Slippage and other costs in DeFi trading

On centralized exchanges with order books, slippage appears when a market order consumes several price levels. On DEX platforms the same effect follows from the pricing curve, which is why pool depth matters as much as order book depth does elsewhere.

Reducing slippage in practice

Traders reduce slippage mainly by lowering their price impact and by limiting how long and how visibly a swap waits before execution. Each technique carries its own cost, so the right combination depends on trade size and urgency.

  • DEX aggregators split one order across several pools and routes to reduce price impact.
  • Splitting large trades into smaller tranches over time keeps each swap within a shallow part of the curve.
  • Concentrated liquidity pools offer deeper liquidity near the current price, which lowers impact for typical sizes.
  • Limit orders and RFQ systems fix the execution price in advance and shift the risk to a market maker.
  • Private transaction routing hides the swap from bots that would otherwise exploit a loose tolerance.

A practical rule is to keep price impact well below the chosen tolerance. If the quote already shows an impact of 2 percent, a tolerance of 2.5 percent leaves almost no room for market movement and invites failed transactions, while a tolerance of 10 percent invites extraction.

Common mistakes with slippage settings

Most avoidable slippage losses come from configuration errors rather than from market conditions. The table lists frequent symptoms, their causes and suitable corrections.

SymptomLikely causeFix
Swap repeatedly revertsTolerance below real volatility or token feeRaise tolerance slightly or check token mechanics
Consistently worse fillsTolerance set far too highLower tolerance and use private routing
Huge loss on a small tokenTrading against a very shallow poolCheck pool depth and price impact first
Old swap executes lateMissing or distant deadlineSet a short transaction deadline
Slippage problems and how to correct them

Another misconception is that auto slippage settings are always optimal. They estimate a reasonable value from recent volatility, but they cannot know the trader’s priorities, so large or sensitive trades still deserve a manual review of the limit.

The idea in brief

When you ask for a price quote and then buy a moment later, the price you finally pay may be slightly different. That difference is slippage. On decentralized exchanges it happens because your purchase itself moves the price, and because other people trade in the seconds before your order is confirmed.

The slippage setting works like telling a shop assistant: buy this for me, but not if the price goes up by more than half a percent. A sensible limit protects you from bad fills, while a limit that is too generous gives others room to take advantage of you.

A practical scenario

A small investment fund wants to convert 250,000 dollars of a stablecoin into a mid-cap token on a decentralized exchange. The single pool quoted by the interface shows a price impact of 3.8 percent, which the analyst considers too costly.

Instead, the analyst routes the order through an aggregator, which spreads it across three pools and two fee tiers and reduces the expected impact to about 1.1 percent. The trade is also split into five equal swaps over one hour, each with a tolerance of 1.5 percent and a deadline of ten minutes, submitted through a private endpoint.

All five swaps settle within the limit, with an average realized slippage of 1.2 percent. Compared with the original single swap, the fund receives roughly 6,500 dollars more of the token, which more than covers the additional gas fees for the extra transactions.