# Market Making in Crypto Exchanges: An Introduction

Market makers at stock exchanges are companies or individuals who stand ready to buy and sell securities. Similarly, market makers at crypto exchanges sell and buy crypto assets on a continuous basis at a publicly quoted price. Since everbody can place an order at crypto exchanges, like e.g. Binance or BitMEX, and order execution is managed automatically, everyone can easily become a market maker. From the perspective of traders, market makers are great, since they help to find counterparties. But what is the incentive to be a market maker? How do they make a profit from providing liquidity?

## A Bit More Formal

An approximative model of market making in limit order books can be taken from the seminal work of Avellaneda and Stoikov. The agent in this model is the market maker who proposes bid and ask quotes for an asset pair, e.g. imagine BTC/USDT. These bid and ask quotes are denoted by $S_t^b$ and $S_t^a$ which are sent to the order book at time $t$. The reference price $S_t$ of the asset can be assumed to be the mid-price, i.e., the average of the best ask price and the best bid price at time $t$. Denoting by $N_t^b$ and $N_t^a$ the number of assets bought and sold, we can define:

Change of Inventory: $$dI_t:=dN_t^b- dN_t^a$$ with initial inventory $I_0$ (e.g. in BTC).

Change of Cash: $$dX_t=S_t^a dN_t^a- S_t^b dN_t^b.$$

The market maker’s goal is then to maximize the value of his or her portfolio $V_T$, i.e. to maximize: $$V_T=X_T+ I_TS_T \hspace{0.5cm} (1),$$

where $X_T = \sum_{t=t_0}^T dXt$ is the total cash out and $I_T= \sum_{t=t_0}^T dI_t$ the inventory after passing from initial time $t_0$ to time $T$ (assuming a discrete time model).

This model oversimplifies the real situation. It does not take order fees of the exchanges into account. Hence, the formula needs to be adjusted as follows: $$V_T^f:=X_T^f+ I_T S_T \hspace{0.5cm} (2),$$

with $X_T^f= \sum_{t=t_0}^T dX_t^f$ and $dX_t^f:=dX_t – f_t$, where $f_t$ denotes the order fees at time $t$.

Still, formula (2) does not reflect any risk aversion model which takes concerns of market makers into consideration when they prefer to have a more predictable but lower profit. Also, the model in this form does not reflect the problem of running out of inventory. More information about these generalizations can be found for example in .

## General Challenges

Optimal Quotes: In the process of increasing the profit over time, market makers must do correct decisions at any time t about quotes  $S_t^b$ and $S_t^a$ based on the existing market spread, having in mind the trade-offs between:

• Aggressive vs conservative quotes to increase or reduce the possibility of buying and selling assets to not run out of inventory.

“Real” Markets: The maximization problem as discussed in academia is usually modelled by Brownian motions. But especially the dynamics of crypto markets might not follow these stochastic models, e.g.:

• Strong volatility with a downward trend. Volatility is in general not a problem for market makers, but as one can deduce from formulas (1) and (2), the portfolio value  $V_T$ suffers big loss when the value of $I_TS_T$ drops (e.g. when BTC loses in value).
• Some asset pairs have a very thin market. This implies that there is a low trading volume decreasing the probability to have a successful trade within the next time period. Moreover, market makers in these markets have a passive market impact, i.e. they produce a price perturbation by liquidity provision.
• Markets with a trading flow in only one direction. The main component of the increase of the portfolio value $V_T$ in (1) or (2) is the $X_T$ summand, which in this case is not passing through profit making “buy and sell” cycles.
• Market manipulation through spoofing (read here), wash trading, pump and dump, etc.

Market Microstructure: The working of the exchanges have to be reflected in order to evaluate market making strategies:

• Working of the order book with its queuing mechanism and order filling.
• Possible orders: market order, limit order, layered orders, OCO orders, cancel orders.
• Fees for the different order types which enters formula (2) and restrict market makers to continuously change their bid and ask offers.
• Compensation for providing deeper markets by market making  (e.g. HitBTC).

Risk aversion: In general, crypto markets are much more risky than classical stock markets. There are established ways to reduce risk:

• Instead of maximizing $V_T$ in (1), one can optimize a utility function taking risk aversion into account (e.g. CARA as in )
• One can try to hedge the risk by having a multi-asset market maker model (see for example )

## In a next post …

… we will get deeper into the details taking the market microstructures of diverse crypto exchanges into account, reflecting about risk aversion, and will discuss existing algorithms for bid and ask quote strategies in the context of crypto markets. So far we recommend having a look at the BitMEX market maker bot and reading the discussion of the Decred Market Maker proposals

## Interesting References

Literature

Market Maker Proposals

Market Maker Software

BitMEX Market Maker

Open Source Projects