Counter-Offensive Predictions in Cross Exchange Market Making

Crypto Chassis
Open Crypto Trading Initiative
5 min readMay 30, 2023
Photo by Gabriel Lenca on Unsplash

Greetings, Ladies and Gentlemen! In one of our previous publications entitled “The Cancel-Order Failure: A Bad Headache for Market Makers”, we detailed a couple of our thoughts and experiments on how to reduce the occurrences of and the damages from adverse selections from a market maker’s perspective. The article originated from several discussions on our Discord channels (https://discord.gg/b5EKcp9s8T) on the topic of cancel-order failures: i.e. a trader tries to immediately cancel an order when the market moves against him/her, but only to find that his/her order has just been fulfilled. This is a classical example of becoming the victim of an adverse selection “attack”. Using various techniques that we introduced in the article entitled “The Cancel-Order Failure: A Bad Headache for Market Makers” as shields and defenses, we could mitigate those negative effects. Yet, we were still just passively running around under the enemy’s bombardment, is there any possibility that we might be able to conduct a counteroffensive? In this article, we will discuss a very interesting way of doing this by launching our defense missiles before the enemy take their “positions” (pun intended).

Throughout the remaining of this article, we will put our discussions under the context of cross exchange market making because it is relatively easy to demonstrate the idea within this type of strategy. Let us begin by first recalling how cross exchange market making works. We identify several markets whose prices are almost always 1:1 pegged to each other. The simplest example is the same spot instrument traded on different exchanges. We place maker orders on a less liquid, larger spread market. When the maker order is hit, we place hedging taker orders on a more liquid, smaller spread market. The net profit is the spread difference less trading fees. The strategy isn’t too hard to code. Give it a try on some Shitcoin and you’ll find that it can work out nicely. Then give it a try on Bitcoin or some major Altcoin and you’ll find that it doesn’t work any more. The major failure mode goes like this: when the market all of a sudden moves against our maker order, we try to cancel it, then the exchange tells us that the order cannot be canceled because it has been filled, then we have no choice but to send out our taker order to the hedging market, and find out that our taker order is filled at a bad price. These events are not coincidents. It tells us that someone else more powerful is operating against us. For example, high-level VIP users can enjoy low latency API and therefore have a given advantage over regular users (e.g. https://www.binance.com/en/support/faq/what-are-binance-futures-low-latency-api-services-7df7f3838c3b49e692d175374c3a3283). From a smaller user’s perspective, the higher-level VIP users possess nuclear weapons. If we don’t have better weapons against our competitors, we have to devise better “strategies” (pun intended) in order to beat them. The idea is that the consistencies of the failure mode mentioned above implies some sort of consistencies of the trading behaviors of our competitors. Consistencies make predictions possible. If we can predict that under certain conditions our maker order is for sure going to be filled in the next moment, perhaps we don’t even bother to cancel this maker order, instead we just send out our hedging taker order without maker order’s fill confirmation. Let us take a look at a concrete example. The following string of events happened around UTC time 2023–05–16T19:36:39. The timestamps shown below only represent the milliseconds part. We were cross exchange market making on the spot markets of LTC/USDT between Kucoin and MEXC. We placed maker orders on Kucoin and used MEXC as the hedging exchange (if you wonder why MEXC as the hedging exchange, it is here). At 762 milliseconds, we had a maker buy order resting on Kucoin’s spot LTC-USDT order book at price 89.543. All of a sudden within one tick, Binance’s USDT-margined-perpetual-contract LTCUSDT’s best bid price changed to 89.47, which was 8.2 bps below our maker buy order on Kucoin’s spot LTC-USDT order book. At this exact moment, we haven’t received any private or public information from Kucoin indicating that this maker buy order has been filled. However, we predicted that it would, because 8.2 bps in price differences was a very large value. At this exact moment, MEXC’s spot LTCUSDT’s best bid price was 89.56 and we sent out a hedging taker sell order to it. At 773 milliseconds (i.e. 11 milliseconds later), we received the order fill confirmation from Kucoin, which verified that our prediction was correct. Then at 826 milliseconds, we received the order fill confirmation from MEXC at a price of 89.55: not too bad. Our study on such experiments based on anticipations is still work-in-progress. However, the simple demonstration shows that such a non-conventional idea is quite feasible and executable.

762 binance-usds-futures LTCUSDT best bid price changed to 89.47
762 "predict" close kucoin LTC-USDT buy order at price 89.543, quantity 0.1514
762 mexc LTCUSDT best bid price 89.56
762 mexc LTCUSDT request sell quantity 0.151
773 Private trade - kucoin LTC-USDT buy price: 89.543, quantity: 0.1514
826 Private trade - mexc LTCUSDT sell price: 89.55, quantity: 0.151

Before ending our discussions, we want to highlight the nature of these predictions. They aren’t based on any technical indicators, or financial news, or machine learning models. Instead they are based on observations of our own trading failure modes. Therefore if the failure modes tend to be consistent, such predictions tend to be consistent as well. However, like any other kinds of predictions, they aren’t risk-free and are always accompanied by a question: what if the predictions are incorrect? In the concrete example shown above, might it lead to a better outcome if at 762 milliseconds we choose to simply cancel the maker order on Kucoin?

If you are interested in our work or collaborating with us, join us on Discord: https://discord.gg/b5EKcp9s8T and find us on Github: https://github.com/crypto-chassis/ccapi 🎉. We specialize in market data collection, high speed trading system, infrastructure optimization, and proprietary market making.

Disclaimer: This is an educational article rather than investment/financial advice.

--

--