What is slippage in crypto?

Slippage in crypto is the difference between the expected price of a trade and the actual price at which the trade is executed.

When you place an order, the market may move before your order is filled, causing you to pay more (or receive less) than you anticipated. This is especially common on decentralized exchanges (DEXs) and during periods of high volatility.

Why does slippage happen?

Slippage happens because of market volatility and the mechanics of order execution.

Market volatility means prices can change in the seconds between when you submit an order and when it is executed. Liquidity also plays a role: if there isn't enough liquidity in the trading pair, the order may be filled at a different price than expected. On DEXs, slippage is also influenced by the automated market maker (AMM) algorithm, which adjusts prices based on the size of the trade relative to the liquidity pool.

How does slippage work on decentralized exchanges (DEXs)?

On DEXs like Uniswap or PancakeSwap, slippage works through the AMM model, where the price of a token is determined by the ratio of assets in a liquidity pool.

When you make a trade, the AMM calculates the price based on the current pool ratio. If your trade is large, it can significantly shift the ratio, resulting in a worse price than the quoted one. DEXs allow you to set a slippage tolerance, which is the maximum percentage of price change you are willing to accept. If the actual price change exceeds your tolerance, the transaction will fail and you won't lose funds.

What is a good slippage tolerance?

A good slippage tolerance is typically between 0.5% and 1% for most trades, but it can vary depending on market conditions and the token's liquidity.

  • For highly liquid pairs (e.g., ETH/USDC), a tolerance of 0.5% is usually sufficient.
  • For less liquid tokens or during high volatility, you might need to set a higher tolerance, such as 2% to 5%.
  • Setting a very high tolerance can expose you to front-running and poor execution, so it's best to keep it as low as possible while ensuring your trade goes through.

How can I reduce or avoid slippage?

You can reduce slippage by using limit orders, trading on centralized exchanges, and choosing highly liquid trading pairs.

Here are some practical tips:

  • Use limit orders: On centralized exchanges, limit orders allow you to specify the exact price you want, and the order will only execute if the market reaches that price, eliminating slippage.
  • Trade on centralized exchanges (CEXs): CEXs typically have deeper order books, resulting in lower slippage compared to DEXs.
  • Choose liquid pairs: Trade tokens with high trading volumes and deep liquidity pools.
  • Set a lower slippage tolerance: On DEXs, set a lower tolerance to protect against unexpected price changes.
  • Avoid trading during extreme volatility: Major news events can cause rapid price movements, increasing slippage.

What is the difference between slippage and spread?

Slippage is the difference between the expected price and the executed price of a trade, while spread is the difference between the bid and ask prices in an order book.

Slippage occurs during trade execution, whereas spread is a constant feature of the market. On an order book, the spread represents the gap between the highest price a buyer is willing to pay (bid) and the lowest price a seller will accept (ask). When you place a market order, you may pay the ask price (if buying) or receive the bid price (if selling), and the spread is part of the cost. Slippage can occur in addition to the spread, especially in fast-moving markets.

Can slippage be negative?

Yes, slippage can be negative, meaning you get a better price than expected, but it is rare.

Negative slippage can occur when the market moves in your favor between the time you submit the order and when it is executed. For example, if you place a buy order and the price drops before your order is filled, you might get more tokens for your money. However, most of the time slippage is positive (you get a worse price), and traders usually focus on minimizing it.

Is slippage a fee?

No, slippage is not a fee; it is a price difference.

Fees are explicit costs charged by exchanges or networks (e.g., trading fees, gas fees). Slippage is the difference between the market price you expect and the price you actually get. It is an implicit cost that arises from market dynamics. On DEXs, you may also pay a network fee (gas) and a trading fee to the protocol, which are separate from slippage.

How does slippage affect trading bots?

Trading bots are highly sensitive to slippage because they execute trades automatically and in large volumes.

For bots, slippage can significantly impact profitability, especially in arbitrage strategies. A small price difference can be wiped out by slippage if the trade is large. To mitigate this, bots often use limit orders, split orders into smaller sizes, or set conservative slippage tolerances. Some advanced bots use algorithms to predict and account for slippage when placing trades.

What is the best way to set slippage on Uniswap?

On Uniswap, the best way to set slippage is to use the 'Auto' option for most trades, but for less liquid tokens or during high volatility, you may need to adjust it manually.

Uniswap's default auto-slippage is 0.5%, which works for many trades. However, if you are trading a token with low liquidity, you might see a warning that your trade may fail. In that case, you can increase the slippage to 1% or 2%. Be cautious about setting it too high (e.g., 10% or more), as it can make you vulnerable to MEV (Miner Extractable Value) attacks. Always check the expected price and compare it to the current market price before confirming.