What is cross exchange market making?

hummingbot
Hummingbot Blog
Published in
6 min readSep 29, 2020

This blog was originally posted on the Hummingbot blog on September 23, 2020.

Welcome back to our Educational Center, where we aim to help you to learn more about market making, arbitrage, and everything related to algorithmic trading.

Today we will talk about one of the core strategies that can be used with hummingbot: cross-exchange market making.

The objective of this article is to help you understand:

  • What is the cross-exchange market making strategy?
  • What is the difference between cross-exchange market making and arbitrage?
  • How is cross-exchange market making different from pure market making?
  • Why and when should I use this strategy?

If you already understand how arbitrage and pure market making work, cross-exchange market making (“XEMM”) becomes really simple: it’s simply a hybrid of the two.

So what is cross-exchange market making?

Here’s a simple explanation of the concept of cross-exchange market making:

  1. My friend Alice wants to sell her guitar and she’s offering it for $100.
  2. I go around to all of my other friends and tell them that I am selling a guitar for $110.
  3. If one of my friends, say Bob, agrees, I immediately buy the guitar from Alice for $100 and sell it to Bob for $110.

Pretty neat right? I made $10 of profit selling something I didn’t own by simply doing a back-to-back, simultaneous buy and sell of the guitar.

Wait… that sounds a lot like arbitrage, so what’s the difference?

OK, here’s how this situation would be for arbitrage:

  1. My friend Alice wants to sell her guitar and she’s offering it for $100.
  2. I go around and try to find if someone, anyone, is offering to buy a guitar for some price higher than $100. After looking around, I find an ad posted by my other friend Carol; she wants to buy a guitar and is willing to pay $110.
  3. Great, I immediately buy the guitar from Alice for $100 and sell it Carol for $110.

Did you notice the subtle difference? For step #2 in cross-exchange market making, I was the one proactively telling people I had something to sell and I was setting my price. Does this concept sound familiar? In the transaction with Bob, I was the maker and Bob was the taker.

On the other hand, for step #2 in arbitrage, I was simply going around and searching to find if someone else had already said they wanted to buy a guitar at a higher price. In the arbitrage scenario, Carol was the maker, and I was the taker.

In my transaction with Alice in both scenarios, I was a taker: I accepted her offer for a guitar and her price.

💡 An arbitrageur acts as “taker/taker”; he is the taker on the buy and the sell transaction. Arbitrage is more passive because an arbitrageur just monitors prices and searches for opportunities to act on. On the other hand, a cross-exchange market maker acts as “maker/taker”; he proactively tries to create trade opportunities by creating maker orders on one side of the trade.

What does this have to do with market making?

In our previous article on pure market making, we explained that a market maker is someone who places both bid and ask orders in order to facilitate trading. You can see that in the cross-exchange market making example above, I am acting as a maker, offering a guitar to sell and specifying a price. So that’s one half of what a market maker does.

But I can also do the same transaction for the buy side. I have another friend, Dave, who wants to buy a guitar, but he is only willing to pay $95. At this price, he and Alice can’t trade, because his budget of $95 is below Alice’s asking price of $100. Since I know that I can sell a guitar to Dave, at the same time I’m going around trying to sell Alice’s guitar, I can go around offering to buy another guitar that I can sell to Dave.

Now I have both sides: I can offer to buy a guitar for $85 and sell a guitar for $110. I am now acting as a market maker. The interesting thing about cross-exchange market making that you may have noticed is:

  • I don’t even own a guitar in the first place; if someone wants to buy a guitar from me, I just buy the one from Alice to sell them and,
  • I don’t even need to have the money to buy a guitar on the buy side; if someone wants to sell me a guitar for $85, I can pay for that purchase by selling that same guitar immediately to Dave!

💡 In cross-exchange market making, a trader acts as a normal market maker on one exchange (the “maker exchange”), creating buy and sell orders. However, the trader eliminates the inventory risk usually associated with market making by using another exchange (the “taker exchange”) to simultaneously offset (or “hedge”) any trades filled on the maker exchange.

That is why we mentioned earlier that cross-exchange market making kind of looks like a combination of pure market making + arbitrage.

So how does this translate to order book markets?

A financial environment where the same asset is traded in different marketplaces is susceptible to what is known as market inefficiency, where the information about the value of the asset takes some time to dissipate to all the exchanges.

This can be easily noticed by looking at the differences between bid and ask prices offered on each order book, as can be seen on the screenshot of the BTC/USDT order book on two different exchanges at the moment in time:

Bid prices:

  • Exchange A: $10,475.97
  • Exchange B: $10,476.40

Ask Prices

  • Exchange A: $10,475.98
  • Exchange B: $10,476.60

Applying the cross-exchange market making concept on the situation above:

  1. I use one exchange (Exchange A) as my taker exchange. In the example above, Alice and Dave, collectively, acted as my “taker exchange”. Basically, I need one exchange where there are buy and sell orders created by other people. Using the above situation, the best bid price on Exchange A for Token A is currently $10,475.98 and the best sell price is $10,475.98.
  2. On another exchange (Exchange B), I act as maker and create orders. Since I know that I can sell as a market taker for $10,475.97 and buy for $10,475.98 on Exchange A, I place a buy order for BTC for $10,474,97 and sell order for $10,476.98 on Exchange B.
  3. If my buy order on Exchange B is filled, then I immediately sell Token A on Exchange A for a $1.00 profit. If my sell order on Exchange B is filled, then I immediately buy BTC on Exchange A for a $1.00 profit.

You can see that the only term I set here is my profit margin of $1. The price of the order I place on Exchange B will always be based on the market price offered on Exchange A.

For example, if the ask price on Exchange A falls to $10,400.00, then I would adjust my price ask offer on Exchange B to $10,401.00 (= $10,400.00 + $1):

(Exchange B maker price) = (Exchange A taker price) + (profit margin)

Notice that $1 may not be a realistic margin; more likely margins would be more in the low percentages or even fractions of percentages. But even at lower margins, why would this strategy work?

💡 As with arbitrage, the potential to generate “risk-free” profits through cross-exchange market making strategies happens due to market inefficiencies. The highly fragmented nature of the crypto markets (different types such as CEX/DEX, different regions/jurisdictions, the sheer number of different exchanges) lends itself to even more market inefficiencies.

Read the full blog

Join our community

If you want to learn more, make sure to follow our blog updates for new articles every week.

While you wait for the next post, remember to join our Discord server, a place where our community talks about market making and arbitrage, and all the possible ways you can use Hummingbot to improve your trading strategies.

Also, if there is any specific topic you want us to cover on the Hummingbot Academy, contact our team on Discord, or send an email to academy@hummingbot.io.

See you soon, and I wish you all a profitable trading session!

--

--

hummingbot
Hummingbot Blog

hummingbot, an #opensource #crypto #marketmakingbot. Decentralize #marketmaking: hummingbot.io