Slippage is a highly misunderstood term in crypto. Many people seem to think it’s some sort of fee you pay for every transaction. This isn’t the case.
If you’re confused about slippage (and crypto trading in general), we’re here to help.
What Does Slippage Mean in Crypto?
Just like in all markets, in crypto, slippage is the difference between the expected price of a trade and its real price.
There are two main ways of trading cryptocurrencies: on a centralized exchange (CEX) or a decentralized exchange (DEX). Slippage happens on both but the risks are different (as are the reasons for its occurrence).
To truly understand how slippage functions on CEXs and DEXs, we need to cover some basic trading terms and concepts. We’ll be going through both scenarios one-by-one with detailed examples:
The Basics of Slippage On a CEX
Centralized exchanges (CEXs) use order books to coordinate trades. They require market participants (known as “market makers”) to create markets and “market takers” to keep the orders flowing.
What Are Order Books?
CEXs and some DEXs use lists of bids and asks (ie. buy and sell offers) to facilitate trading. These lists are called order books.
In order to buy any asset, another party needs to be ready to sell it at your specified price. Conversely, to sell, another trader must match your asking price.
The difference between the highest bid (ie. buy order) and the lowest ask (ie. sell order) is called a bid-ask spread.
Market Makers & Market Takers
Bid-ask spreads are created by the so-called “market makers”, otherwise known as traders who place buy and sell limit orders.
Limit orders are trade orders that require a specific price in order to be filled.
Market makers “make” the market by setting the price ranges in which assets can be traded.
But market makers need a counterpart to fill up their orders. This is where the “market takers” come in. Rather than placing limit orders, these traders place market orders.
Market orders are trade orders set to buy or sell an asset at the current best available price.
How Do Order Books Work?
Market orders “fill up” the limit orders placed by market makers. Here’s a practical example:
Market makers Alice and Bob place two limit orders to sell one Bitcoin each at $20,000 and $20,050, respectively. As a market taker, you place a market order to buy two Bitcoin at the current market price. The current market price will be shown as $20,000, as this is the lowest available asking price (by Alice).
Since Alice is selling only one Bitcoin, they can’t fulfill your entire order. For this reason, the exchange takes the first Bitcoin (the one owned by Alice) and transfers it to you at their specified price. Following that, it will transfer Bob’s Bitcoin to you (for which you’ll pay Bob’s specified price).
How Does Slippage Work on a CEX?
If your buy order is larger than the amount being sold by the market maker (with the lowest price offer), the remainder will be bought from the next market maker in line. Alternatively, if you want to sell a bigger amount of crypto than the amount offered to be purchased by a single market maker, you will have to trade with multiple buyers, further down the list, at different prices.
In the example above, the average price you’d purchase one Bitcoin for is $20,025. The slippage will be a difference of $25 (or 0.125%) from the price you expected.
Basics of Slippage on a DEX
While slippage works the exact same way on DEXs which incorporate an order book trading model, it’s completely different with automated marker makers (AMMs).
How Do AMMs Work?
Automated market makers (AMMs) are an innovation first detailed by Ethereum founder Vitalik Buterin on his personal blog. They’re a type of decentralized exchange that uses token-holding smart contracts instead of traditional market makers to provide liquidity to the market.
AMMs are protocols with smart contracts that hold pools of cryptocurrencies called liquidity pools.
Imagine an AMM like a scale with two piles of different tokens on either side. These tokens are in a perfect one-to-one balance. The total price of one side remains equivalent to the other.
All the market-making in this system is done by the smart contracts which are programmed to increase or decrease the price of the assets (on either side of the scale to keep the balance).
Example of Trading on an AMM
Traders don’t trade with each other. Instead, they take one asset from one side of the scale and leave more of the other on the opposite side. Here’s an example of crypto trading on an AMM:
Alice wants to buy one Token A with Token B. For simplicity’s sake, one Token A costs the same as one Token B (in reality, prices will vary). Let the price of A and B be $10. In our example, there are two tokens on either side of the scale: $20 on the left and $20 on the right.
When Alice buys one Token A, it’s taken off the scale and the equivalent amount of B is placed on the other side, disrupting the balance. Suddenly, one Token A costs the equivalent of three Token Bs.
Asset A is now trading at a very big discount in this pool (compared to elsewhere on the open market). This is a great opportunity for arbitrage. Arbitrageurs take advantage of the lower price, buying token A to make a profit by selling on other exchanges.
How Slippage Works on a DEX
On AMM-based decentralized exchanges, slippage happens as a result of trades occurring between the time when a market order is posted and when it’s executed.
On-chain crypto transactions don’t flow one after the other. Due to the distributed nature of the blockchain, transactions are processed in semi-ordered groups.
If you see Ether (ETH) trading at $2000 on a DEX and buy it, your transaction might occur after someone else’s. Theirs could be a huge “buy”, which would substantially increase the price of ETH at the very moment your transaction is processed, causing you to overpay.
What Is Slippage Tolerance?
For the reasons detailed above DEXs have implemented functionality, allowing you to set a slippage tolerance. It’s there to protect traders from overpaying.
The slippage tolerance is a percentage that represents a slippage amount you find acceptable. In other words, it’s the maximum amount of slippage you’re comfortable with having on any given transaction.
The standard setting is 10%. This would mean that the transaction won’t go through if the price changes by more than 10% before your order is executed.
What Is Front-Running in Slippage?
There is one drawback to slippage tolerances (known as front-running). It’s a result of the way transactions are processed on the blockchain.
Every transaction costs a gas fee. This is the fee the network operators require in order to pay for the processing power that’s necessary to complete a transaction. You can speed up your transaction by offering to pay a higher gas fee. This is usually done to get ahead of the other traders and secure a better price.
Sadly, bots or other traders can occasionally see transactions that are waiting to be processed and front-run you. They may speed up their purchase by paying a higher gas fee than you and then sell you the tokens at a higher price.
This is why you should never set big slippage tolerances: You might end up getting a lot fewer tokens than you expected.
How to Reduce Slippage in Crypto
One simple way to combat slippage is by breaking your transactions up into smaller chunks. This method can be done on both centralized and decentralized exchanges. Instead of one big order, try to split it into a few smaller ones next time.
On CEXs, you need to be mindful of the available volume. Look at the order book to see how many of the opposite bids will be filled up by your order, then factor in the average price you’ll be paying for each transaction.
On DEXs, you need to consider the gas fees. In times of high network usage, congestion can lead to considerable fees. Use this gas tracker for Ethereum to determine current fees for different transaction processing times. You could also pay a bit more for gas to get in front of the waiting list. Whatever the case, the longer you wait, the more the price can change. Consider if avoiding the slippage is worth spending more on gas.
Reasons for Slippage in Crypto
On CEXs, slippage is a direct result of low liquidity. Markets with a lot of trading volume experience less slippage because the bid-ask spreads are smaller. Additionally, these markets have larger limit orders meaning that you can buy or sell larger amounts of crypto without having to fill up too many bids of different prices.
When trading on DEXs, you can experience massive slippage due to small liquidity pools. When a liquidity pool’s size isn’t sufficient for stable trading, prices can fluctuate wildly. This is because even small trades move a lot of funds in and out of the pool, impacting the balance and the price.
How Is Slippage Calculated?
Slippage is most commonly calculated as a percentage. It represents the difference between the expected price of your trade and the actual price.
More liquid markets incur less slippage due to a narrower bid-ask spread. Those with less trading volume can cause bigger slippage.
Can Slippage Be Positive?
Yes, slippage can sometimes be positive. On an order book, someone could post a more favorable task while you’re filling up orders.
For example, if you’re making a purchase on an AMM, someone’s sell order could execute right before (resulting in a more favorable price for you).
How Does Sonar Help You Manage Slippage in DeFi?
Sonar is a Web3 company that’s developing an innovative, all-in-one platform for crypto users. One of our upcoming products is a fully customizable trading solution for Decentralized Finance (DeFi). We’re also developing our own DEX aggregator which will provide users with the best possible prices from across numerous exchanges. Our extra security features will also help users understand the potential slippage of every trade (and how to manage it).
Use the form below to subscribe to our newsletter and follow our progress. You’ll be the first to know about upcoming products and exclusive features. We’ll never spam you or share your information, and you can opt out at any time.