Triangular Arbitrage
2023-09-18 12:43:07
Let's assume there are three cryptocurrencies - A, B, and C. An opportunity for triangular arbitrage arises if you can sell currency A for currency B, then sell currency B for currency C, and finally, sell currency C for currency A at a profit. A -> B -> C -> A. All these transactions are performed sequentially and quickly to capture the arbitrage opportunity before the price differences adjust.
One of the primary reasons why triangular arbitrage opportunities arise is due to the decentralized nature of cryptocurrency markets. Different trading pairs can have slightly different exchange rates, and not all pairs are equally liquid. Moreover, Binance, like other exchanges, operates in real-time with trades being executed by thousands of users from all over the world. These users have different trading goals, strategies, and information, leading to temporary price inefficiencies.
We have created a simple tool to find arbitrage deals in history and examine them trade by trade. Clone this script and change parameters/code to make your own calculations!
Here is a trades what could be considered triangular arbitrage:
2023-09-19 00:00:00 -> 06:00:00 UTC.
2023-09-19 00:00:00 -> 06:00:00 UTC.
Let's take a look at the data that this script generates. Here are 3 triangular arbitrage situations:

duration means how long it takes for the market to execute all three trades inside the triangle. You could use this as a basis for latency requirements.
You can click on the triangle dt and be redirected to the observer service for a visual look at the trade history that was executed at those moments.
It's just one of the possible representations of triangular arbitrage executed on Binance. Feel free to run your own code with your own aggregation logic, filters, and metrics.