Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
A beginner’s guide to one of the original sources of yields in crypto
Order book basics
Market making in crypto is not radically different from traditional finance, as most of the same concepts apply. First and foremost it is necessary to understand the main order types:
- Market orders: active orders that execute the trade at the best buying or selling price available.
- Limit orders: passive orders that place the order at a desired price that is worse than the current best price available.
Both types of orders are matched in a central limit order book (CLOB), which is the exchange method used by most centralized exchanges, where buying and selling orders meet at a best price. Those executing limit orders are known as liquidity makers, since they are creating liquidity in the orderbook. Likewise, the ones executing market orders are known as liquidity takers. A CLOB has two sides, the ask side is known as the limit orders placed to sell, while the bid side are the limit orders placed to buy. The difference between the lowest ask price and the highest bid price available is known as the spread. The true underlying price of the asset is often taken as the midprice, which is the arithmetic average between best ask and best bid:
An example of a hypothetical BTC CLOB
In this example the spread would be 1.16–1.14 = 0.01, while the midprice would be 0.5 * (1.16 + 1.14) = 1.15. An order book profile gives an accurate view of how market makers are currently quoting. In the next indicator can be seen a real combined orderbook for the spot BTC markets across exchanges, currently slightly skewed towards the bid side, but fairly balanced:
Combined orderbook of spot BTC indicator according to IntoTheBlock order books indicators.
The Market Making Profit
The objective of a market maker (MM) is to provide liquidity, while profiting from the price spread by placing limit orders on both sides of the market. This cross of the spread happens when another market participant sends a market order. This market order will be matched with the limit order initially placed by the market maker. The next chart measures the number of trades where the buyers “crossed the spread” and bought at the ask price vs the number (of trades where sellers “crossed the spread” and sold at the bid price, per minute.
Trader per Side indicator according to IntoTheBlock ETH spot order books indicators.
As can be seen, in the most liquid exchange for spot ETH, Binance, the spread is crossed both buying and selling usually more than 100 times per minute. Liquidity provision is incentivized mainly thanks to this price spread. As can be seen below, the spread in Binance is currently at around $0.015, that would mean that market makers in Binance can benefit from these market orders around $1.5 per minute, or $1000 daily (supposing a perfect scenario where they are quoting constantly on both sides). Of course this will vary greatly due to seasonality and the current market state (such as US equities closed/open or bear/bull market with high/low volume and high/low liquidity, and other associated costs):
Bid-Ask Spread of ETH on Binance according to IntoTheBlock Order Book indicators.
This is why the main profit drivers of a MM are trading volume and volatility. Other incentives might be some exchanges that offer ‘rebates’ to liquidity makers. Another world of incentives is the one of Professional MMs, who usually have contracts with exchanges where they commit to provide liquidity within terms such as constant availability of a certain size over a period of time, for example.
Strategies And Risks
Most of the of strategies that can be found around play basically with three main variables:
- How much to size the bids/asks.
- When to place the bids/asks.
- At which price to position the bids/asks.
An example of a well known basic strategy would be the “Ping-pong strategy”. It consists in alternating between buying and selling orders, hence the name. It tries to keep balance by sending limit orders to the opposite side of the book each time that an order has been filled:
In the current situation and strategy like this one would require a bit more thought in order to be deployed safely and profitably in production, adding circuit breakers and improving the balancing logic, but serves to illustrate the point that in terms of risk, a MM is always exposed to:
- Inventory risk due to the uncertainty on the future asset value.
- Adverse selection due to asymmetric information, where market takers take the winning side since they know the price direction in advance.
The inventory risk of this strategy would be for a MM to end up accumulating the asset that is devaluing more in price (similarly to impermanent loss in AMMs). This imbalance could easily happen in a situation where the market starts to trend towards a direction, and more of the quotes on one side of the orderbook are filled than the other. This is why a MM must be quick to adapt to changing market conditions and balance his inventory.
Similarly, an example of adverse selection would be a MM having a limit sell order that is filled right before the price of the asset goes up quickly in price. This could result in a MM trying to rebalance while being “run over”. This is why it is often common to see orderbook imbalances with more liquidity on one side after large market moves, suggesting that MMs are trying to rebalance their inventory. Other leading factors for orderbook imbalances are signals that the price might still move strongly in a certain position and it is not in the MM’s best interest to offer selling or buying at that moment, since their inventory is filled with the best performing asset of the pair and they can prevent an imbalance by removing momentarily the liquidity on one side of the order book.
A practical example would be a MM operating in a pair where most of the leading price action and volume happens in another exchange. If the price on that leading exchange starts to trend up, most of the sell orders of the market maker might be taken. Not sending sell orders would allow the MM to not have a large part of their inventory sold in that market move, and also would allow them to preserve the asset that is appreciating in price.
Further steps
Much of the literature that can be found about market making (or broadly known in academia as ‘market microstructure’) is based on traditional finance markets and not crypto markets, so take it with a grain of salt (one of the most cited papers is the one from Avellaneda & Stoikov). Although the basics are the same, there are many differences among both: crypto markets trade 24/7, there are more than 10,000 different coins trading across more than 500 exchanges, so it is common to find coins with low liquidity, or with an unusual flux of traders hitting market orders. The API access to trade in these exchanges is usually equal and open to anyone, so the order books are often contended both by professionals and amateurs. And as an advice, after the basics are layed out, there is no tutorial or book that is going to initially give as much insight as to constantly watch the market movements of your favorite coin and exchange.
Regarding the technical infrastructure tips, anyone starting in market making is going to have it easier using some of the most popular open source software around crypto such as Hummingbot or CCXT, in test environments with no loss risk such as the ones offered by some of the top exchanges. After that, the black hole of knowledge is deep, from proprietary high frequency trading algorithms that heavily rely on math, to data science techniques for backtesting as accurately as possible, to experience in systems and networking in order to have a set up a bot that runs in a system that can tolerate connection dropouts or outage scenarios. If you decide to try, good luck and have fun!
Crypto Market Making 101 was originally published in IntoTheBlock on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.