TL;DR 

Bid-ask spread is the difference between the lowest price asked for an asset and the highest price bid. Liquid assets like bitcoin have a smaller spread than assets with less liquidity and trading volume.

Slippage occurs when a trade settles for an average price that is different than what was initially requested. It often happens when executing market orders. If there's not enough liquidity to complete your order or the market is volatile, the final order price may change. To combat slippage with low-liquidity assets, you can try to split your order into smaller parts.


Introduction

When you buy and sell assets on a crypto exchange, the market prices are directly related to supply and demand. Apart from the price, other important factors to consider are trading volume, market liquidity, and order types. Depending on the market conditions and the order types you use, you won't always get the price you want for a trade.

There is a constant negotiation between buyers and sellers that creates a spread between the two sides (bid-ask spread). Depending on the amount of an asset you want to trade and its volatility, you might also encounter slippage (more on this later). So to avoid any surprises, getting some basic knowledge of an exchange's order book will go a long way.


What is bid-ask spread?

The bid-ask spread is the difference between the highest bid price and the lowest ask price of an order book. In traditional markets, the spread is often created by the market makers or broker liquidity providers. In crypto markets, the spread is a result of the difference between limit orders from buyers and sellers.

If you want to make an instant market price purchase, you need to accept the lowest ask price from a seller. If you'd like to make an instant sale, you'll take the highest bid price from a buyer. More liquid assets (like forex) have a narrower bid-ask spread, meaning buyers and sellers can execute their orders without causing significant changes in an asset's price. This is due to a large volume of orders in the order book. A wider bid-ask spread will have more substantial price fluctuations when closing large volume orders.


Market makers and bid-ask spread

The concept of liquidity is essential to financial markets. If you try to trade on low-liquidity markets, you might find yourself waiting for hours or even days until another trader matches your order.

Creating liquidity is important, but not all markets have enough liquidity from individual traders alone. In traditional markets, for example, brokers and market makers provide liquidity in return for arbitrage profits.

A market maker can take advantage of a bid-ask spread simply by buying and selling an asset simultaneously. By selling at the higher ask price and buying at the lower bid price over and over, market makers can take the spread as arbitrage profit. Even a small spread can provide significant profits if traded in a large quantity all day. Assets in high demand have smaller spreads as market makers compete and narrow the spread.

For example, a market maker may simultaneously offer to purchase BNB for $350 per coin and sell BNB for $351, creating a $1 spread. Anyone who wants to trade instantly in the market will have to meet their positions. The spread is now pure arbitrage profit for the market maker who sells what they buy and buys what they sell.


Depth charts and bid-ask spread

Let's take a look at some real-world cryptocurrency examples and the relationship between volume, liquidity, and bid-ask spread. In Binance's exchange UI, you can easily see the bid-ask spread by switching to the [Depth] chart view. This button is in the upper right corner of the chart area.


The [Depth] option shows a graphical representation of an asset's order book. You can see the quantity and price of bids in green, along with the quantity and price of asks in red. The gap between these two areas is the bid-ask spread, which you can calculate by taking the red ask price and subtracting the green bid price from it.


As we mentioned before, there is an implied relationship between liquidity and smaller bid-ask spreads. Trading volume is a commonly used indicator of liquidity, so we expect to see higher volumes with smaller bid-ask spreads as a percentage of an asset's price. Heavily traded cryptocurrencies, stocks, and other assets have much more competition between traders looking to take advantage of the bid-ask spread.


Bid-ask spread percentage

To compare the bid-ask spread of different cryptocurrencies or assets, we must evaluate it in percentage terms. The calculation is simple:

(Ask Price - Bid Price)/Ask Price x 100 = BidAsk Spread Percentage

Let's take BIFI as an example. At the time of writing, BIFI had an ask price of $907 and a bid price of $901. This difference gives us a bid-ask spread of $6. $6 divided by $907, then multiplied by 100, gives us a final bid-ask spread percentage of roughly 0.66%.


Now suppose that bitcoin has a bid-ask spread of $3. While it’s half of what we saw with BIFI, when we compare them in percentage terms, Bitcoin’s bid-ask spread is only 0.0083%. BIFI also has a significantly lower trading volume, which supports our theory that less liquid assets tend to have larger bid-ask spreads.

Bitcoin's narrower spread allows us to draw some conclusions. An asset with a smaller bid-ask spread percentage is likely to be much more liquid. If you want to execute large market orders, there is usually less risk of having to pay a price you didn't expect.


What is slippage?

Slippage is a common occurrence in markets with high volatility or low liquidity. Slippage occurs when a trade settles for a different price than expected or requested. 

For example, suppose you want to place a large market buy order at $100, but the market doesn't have the necessary liquidity to fill your order at that price. As a result, you will have to take the following orders (above $100) until your order is filled entirely. This will cause the average price of your purchase to be higher than $100, and that’s what we call slippage.

In other words, when you create a market order, an exchange matches your purchase or sale automatically to limit orders on the order book. The order book will match you with the best price, but you will start going further up the order chain if there’s an insufficient volume for your desired price. This process results in the market filling your order at unexpected, different prices.

In crypto, slippage is a common occurrence in automated market makers and decentralized exchanges. Slippage can be over 10% of the expected price for volatile or low-liquidity altcoins.


Positive slippage‍

Slippage doesn’t necessarily mean that you’ll end up with a worse price than expected. Positive slippage can occur if the price decreases while you make your buy order or increases if you make a sell order. Although uncommon, positive slippage may occur in some highly volatile markets.


Slippage tolerance‍

Some exchanges allow you to set a slippage tolerance level manually to limit any slippage you might experience. You’ll see this option in automated market makers like PancakeSwap on BNB Smart Chain and Ethereum's Uniswap.


The amount of slippage you set can have a knock-on effect on the time it takes your order to clear. If you set the slippage low, your order may take a long time to fill or not fill at all. If you set it too high, another trader or bot may see your pending order and front-run you. 

In this case, front running happens when another trader sets a higher gas fee than you to purchase the asset first. The front runner then inputs another trade to sell it to you at the highest price you are willing to take based on your slippage tolerance.


Minimizing negative slippage

While you can't always avoid slippage, there are some strategies you can use to try to minimize it.

1. Instead of making a large order, try to break it down into smaller blocks. Keep a close eye on the order book to spread out your orders, making sure not to place orders that are larger than the available volume.

2. If you're using a decentralized exchange, don't forget to factor in transaction fees. Some networks have hefty fees depending on the blockchain's traffic that may negate any gains you make avoiding slippage.

3. If you're dealing with assets with low liquidity, like a small liquidity pool, your trading activity could significantly affect the asset’s price. A single transaction may experience a small amount of slippage, but lots of smaller ones will affect the price of the next block of transactions you make.

4. Use limit orders. These orders make sure you get the price you want or better when trading. While you sacrifice the speed of a market order, you can be sure that you won't experience any negative slippage.


Closing thoughts

When you trade cryptocurrency, don’t forget that a bid-ask spread or slippage can change the final price of your trades. You can’t always avoid them, but it’s worth factoring into your decisions. For smaller trades, this can be minimal but remember that with large volume orders, the average price per unit might be higher than expected.

For anyone experimenting with decentralized finance, understanding slippage is an important part of the trading basics. Without some basic knowledge, you run a high risk of losing your money in front-running or excessive slippage.