At its most basic, slippage is the difference between the expected price of an asset when making a trade, and the price at which the trade is actually executed.
The term 'slippage' has a negative connotation because it is often used to denote when the trade executes at a less favorable price than intended. Technically, this would be an example of 'negative slippage'. But a trade could also execute at a more favorable price than intended. In such an instance it would be considered 'positive slippage'.
It’s important to distinguish slippage from price impact. Price impact is expected: when we buy or sell something we usually expect it to affect the price. Slippage, on the other hand, is not expected or desired, though there are strategies to anticipate and mitigate its effects.
What Causes Slippage?
In a nutshell: volatility, trade size, and liquidity (or a lack thereof).
While market orders placed on a trading platform may seem to execute instantaneously, they do not. There are a number of processes occurring behind the scenes which must take place in order for a trade to execute. While modern exchanges make market orders appear to occur instantaneously, the fact is they are occurring very quickly–not instantly.
This is important because price is dynamic, meaning it is not guaranteed to remain static while waiting for any given trade to execute. So, the price at which the trade is ultimately executed may vary from the price which was anticipated. Volatility is an even larger factor in the crypto markets, which are notorious for quick and violent swings in price.
Relatively smaller sized trades are usually less prone to slippage than larger sized ones. Why? Because trades of larger size necessitate an equally sized counterparty to fill. This means that if a trade is large enough, it may exceed the existing counterbalance necessary to be filled at the expected price.
When an order on a trading platform is executed, it is purchased or sold at the most favorable price offered by the exchange. This means if there isn't enough liquidity available at the desired price, the order will be split–some filled at the desired price and some at the next best possible price, resulting in either positive or negative slippage.
If relatively larger-sized trades are more prone to slippage, they are also exacerbated by a lack of liquidity.
Liquidity is the ease with which an asset can be bought or sold without affecting its price. Think of liquidity as a pool of the asset you can buy from or sell into. The bigger the pool, the smaller the effect of your order, and vice-versa.
Given this understanding, it's easy to see how a lack of liquidity might lead to higher slippage. With a larger gap between the highest price a buyer is willing to pay and the lowest price at which a seller is willing to sell, the higher the potential difference between the desired and executed price of a market order. The design differences between AMM and CLOB model exchanges make controlling and anticipating slippage easier to do in the former because price is determined by a formula instead of a market maker.
How to Mitigate Slippage
Use limit orders. One way to avoid slippage is by using a limit order, which will only fill at your desired price. The downside to using this strategy is that price is not guaranteed to hit the entry or exit price required in order for your trade to execute, so there is a trade-off.
Trade markets with deep liquidity. By trading only highly liquid markets and avoiding thinly traded ones you can decrease the amount of slippage you may incur.
Wait for relatively low periods of volatility. Easier said than done, but if you can, try and avoid making trades during especially violent price swings.