Empirical Analysis of Indirect Internal Conversions in Cryptocurrency Exchanges

02/27/2020
by   Paz Grimberg, et al.
0

Algorithmic trading is well studied in traditional financial markets. However, it has received less attention in centralized cryptocurrency exchanges. The Commodity Futures Trading Commission (CFTC) attributed the 2010 flash crash, one of the most turbulent periods in the history of financial markets that saw the Dow Jones Industrial Average lose 9% of its value within minutes, to automated order "spoofing" algorithms. In this paper, we build a set of methodologies to characterize and empirically measure different algorithmic trading strategies in Binance, a large centralized cryptocurrency exchange, using a complete data set of historical trades. We find that a sub-strategy of triangular arbitrage is widespread, where bots convert between two coins through an intermediary coin, and obtain a favorable exchange rate compared to the direct one. We measure the profitability of this strategy, characterize its risks, and outline two strategies that algorithmic trading bots use to mitigate their losses. We find that this strategy yields an exchange ratio that is 0.144%, or 14.4 basis points (bps) better than the direct exchange ratio. 2.71% of all trades on Binance are attributable to this strategy.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

12/05/2019

Fools Rush In: Competitive Effects of Reaction Time in Automated Trading

We explore the competitive effects of reaction time of automated trading...
01/15/2021

Is it a great Autonomous FX Trading Strategy or you are just fooling yourself

There are many practitioners that create software to buy and sell financ...
04/28/2022

Adaptive Multi-Strategy Market-Making Agent For Volatile Markets

Crypto-currency market uncertainty drives the need to find adaptive solu...
11/25/2018

The Anatomy of a Cryptocurrency Pump-and-Dump Scheme

While pump-and-dump schemes have attracted the attention of cryptocurren...
04/24/2020

Trading Foreign Exchange Triplets

We develop the optimal trading strategy for a foreign exchange (FX) brok...
09/22/2021

Who are the arbitrageurs? Empirical evidence from Bitcoin traders in the Mt. Gox exchange platform

We mine the leaked history of trades on Mt. Gox, the dominant Bitcoin ex...
09/23/2021

Towards Private On-Chain Algorithmic Trading

While quantitative automation related to trading crypto-assets such as E...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Abstract

Algorithmic trading is well studied in traditional financial markets. However, it has received less attention in centralized cryptocurrency exchanges. The Commodity Futures Trading Commission (CFTC) attributed the flash crash, one of the most turbulent periods in the history of financial markets that saw the Dow Jones Industrial Average lose of its value within minutes, to automated order “spoofing” algorithms. In this paper, we build a set of methodologies to characterize and empirically measure different algorithmic trading strategies in Binance, a large centralized cryptocurrency exchange, using a complete data set of historical trades. We find that a sub-strategy of triangular arbitrage is widespread, where bots convert between two coins through an intermediary coin, and obtain a favorable exchange rate compared to the direct one. We measure the profitability of this strategy, characterize its risks, and outline two strategies that algorithmic trading bots use to mitigate their losses. We find that this strategy yields an exchange ratio that is , or basis points (bps) better than the direct exchange ratio. of all trades on Binance are attributable to this strategy.

Ii Introduction

Cryptocurrency exchanges today handle more than $50b in daily trade volume [coinmarketcap_daily_volume]. Most of it occurs on centralized exchanges, which hold assets and settle trades on behalf of their customers. Traders on these exchanges can convert different coins at certain exchange ratios, just like traditional foreign exchange (FX) markets. The ability to convert between coins creates potential arbitrage opportunities, where traders can make a profit through a series of conversions. The case involving three conversions, coin converted to coin , which is then converted to coin and back to , is called triangular arbitrage if the proceeds of the conversions are greater than the initial quantity. The existence of triangular arbitrage in foreign exchange markets is well documented [tri_arb2] [tri_arb3] [tri_arb1] [Gebarowski2019]. The characteristics of cryptocurrency exchanges and their relationship to traditional foreign exchange markets have been studied as well [Drozdz2019SignaturesOT]. However, to the best of our knowledge, triangular arbitrage has never been studied within the context of a centralized cryptocurrency exchange.

In this paper, we measure arbitrage activity in Binance, a centralized cryptocurrency exchanges, by empirically exploring its complete historical trade data. Since different traders cannot be identified from trade data, we cluster sequences of consecutive trades that match in their quantities and timing and attribute them to the same trader. To the best of our knowledge, we are the firsts to employ a clustering methodology for identifying triangular arbitrage traders, based on trade-by-trade data.

We find that triangular arbitrage is rarely accomplished. Participants predominantly engage in an alternative strategy, which we call indirect internal conversions, where coin is converted to coin through an intermediary coin , at a favorable exchange ratio compared to directly converting to . This activity accounts for % of the total daily volume, and offers an exchange ratio that is bps better on average.

We believe that the fee structure in cryptocurrency exchanges makes it unprofitable for participants to engage in triangular arbitrage. Instead, participants turn to indirect conversions as an efficient way to rebalance their holdings.

Iii Background

Iii-a Exchanges

An exchange is an organized market where tradable securities, commodities, foreign exchange/cryptocurrencies (or “coins”) and derivatives are sold and bought (collectively referred to as instruments). In a centralized exchange, the deposits and assets of participants are held and settled by the exchange. In decentralized exchanges (or “DEXes”), a smart contract (a program executing on a blockchain) or other form of peer-to-peer network executes exchange functionality. In DEXes, funds cannot be stolen by the exchange operator, because their custody and exchange logic is processed and guaranteed by the smart contract.

In centralized cryptocurrency exchanges, different cryptocurrencies can be exchanged to others, such as Bitcoin and Ethereum. In addition, some exchanges list ERC20 tokens, or simply “tokens,” that can also be exchanged to cryptocurrencies. Tokens are essentially smart contracts that make use of the Ethereum blockchain [ERC20_def].

Participants can place orders on an exchange. An order is an instruction to buy or sell some traded instrument. These instructions can be simple or complicated, and can be sent to either a broker or directly to an exchange via direct market access. There are some standard instructions for such orders. For example, a market order is a buy or sell order to be executed immediately at the current market prices, i.e., buy at the lowest asking price or sell to the highest bidding price. Market orders are typically used when certainty of execution is a priority over the price of execution. A limit order is an order to buy an instrument at no more than a specific price, or to sell at no less than a specific price (called “or better” for either direction). This gives the trader control over the price at which the trade is executed; however, the order may never be executed (“filled”). Limit orders are typically used when the trader wishes to control price rather than certainty of execution.

Each instrument traded on an exchange has an order book. The order book refers to an electronic list of buy and sell orders for a specific security or financial instrument organized by price level. An order book lists the number of shares being bid on or offered at each price point, or market depth [order_book_def].

Iii-B Arbitrage

The traditional financial industry has settled on three main types of quantitative strategies that are sustainable because they provide real economic value to the market: arbitrage, market-making and market-taking [headlands_tech_blog]. In market-taking strategies, traders post both buy and sell orders in the same financial instrument, hoping to make a profit on the bid-ask spread [radcliffe1997]. In market-taking strategies, traders engage in longer-term trading, subject to some rules-based investment methodology. Market-taking strategies on centralized cryptocurrency exchanges have been studied in [krueger2019event].

Arbitrage and its economic benefits have been well understood for quite some time and documented by academia [shleifer1997limits] [bjork2009arbitrage]. Competitive arbitrageurs on centralized exchanges have at least one of three advantages.

  1. Scale: participants who trade large volumes are often compensated in the form of kickbacks, rebates, and low (or zero) trading fees, which provide such participants the opportunity to make profits in cases where others with less scale cannot.

  2. Speed: the ability to access order book information and trade faster than others provides an opportunity to gain from mispricings. For example, triangular arbitrage on FX products is a major impetus for the Go West and Hibernia microwave telecommunications projects [go_west] [hibernia], where multi-million dollar network infrastructure was developed for the purpose of shaving off milliseconds in electronic trading latency.

  3. Queue position: being able to enter one leg of an arbitrage trade by placing orders ahead of time, without crossing the spreads, i.e., placing orders that execute immediately without being queued in the order book, significantly reduces fees, which enables profitable completion of triangular arbitrage trades. Participants are compensated for the risk of queuing orders in the order book.

Arbitrage strategies involving multiple centralized cryptocurrency exchanges, exploiting different prices of same assets, have been studied [kruckeberg2018decentralized] [kroeger2017law] [MAKAROV2020293] [fischer2019statistical].

Arbitrage strategies on decentralized exchanges are executed by bots who pay high transaction fees and optimize their network latency to front-run ordinary users’ trades [flashboys].

At time of writing, the vast majority of cryptocurrencies trading volume (over ) is done in centralized exchanges [coinmarketcap_daily_volume], therefore in this paper, we focus on triangular arbitrage in a single centralized cryptocurrency exchange (Binance). Triangular arbitrage is an arbitrage strategy resulting from a discrepancy between three coins that occurs when their exchange rates give rise to a profitable sequence of trades, i.e., trades of the form , where are coins, and the ending balance of is greater than the initial balance. We call the base coin, and intermediary coins, and the sequence a cycle [tri_arb_def].

To the best of our knowledge, we are the firsts to employ a clustering methodology for identifying triangular arbitrage traders.

Iv Dataset

We use historical cryptocurrency trade data and order book data provided by Kaiko from Nov th, through Aug th, [kaiko]. We conducted our measurements on Binance’s exchange data, as it is the largest centralized exchange by daily volume and has the highest number of listed symbols (the “ticker” of an exchange pair). Kaiko’s data consists of trade-by-trade data and market depth data for all cryptocurrencies and ERC20 tokens traded on Binance. There are trades. Figure 1 shows the monthly number of trades executed on Binance.

Figure 1: Number of monthly trades, in millions, executed on Binance, based on Kaiko’s data set.

Every coin in Binance is denominated by at least one of the following coins: BNB (Binance’s native token), Bitcoin, ALTS (Etheruem, Ripple, Tron) and stable coins. Stable coins are fiat-pegged cryptocurrencies designed to minimize the volatility of price fluctuations. We call these coins anchor coins, as these coins can be directly exchanged to many other coins and have historically had the greatest market value (in US dollar terms) [binance_markets].

There are different coins and different possible conversions. We denote such conversions by , where and are two different coins. We call , a pair. For example, if and = ETH, then the pair is denoted . Traders can exchange their BTC to ETH (or vice versa) using this conversion. We write when considering the side of the holder.

There are 6,534 possible cycles in Binance, i.e., sequences of the form . In of them, one of and is an anchor. In of them, both and are anchors. There are no cases where both and are non-anchors. can be anchor or non-anchor.

Cycle statistics in Binance are summarized in Table I. There are cycles with a non-anchor coin as the base coin. These cycles have the potential to create arbitrage gains in non-anchor coins. However, anchor coins represent over of the total market value of all listed coins and historically had lower volatility, compared to non-anchor coins. Therefore, we focus on cycles with anchor base coins. As future work, we could explore cycles with no-anchor base coins. However, we note that there is inherent risk in operating in non-anchor coins, due to volatility.

Base coin Number of cycles
BTC 986
BNB 818
ALTS 908
Stable coins 1,840
Other coins 1,982
Total 6,534
Table I: Number of cycles in Binance by base coin. BTC,BNB,ALTS and stable coins represent over of the total market value of all listed coins and historically had lower volatility. Therefore, we omit other cycles in this study.

Iv-a Data Fields

Kaiko’s historical trade data fields are described in Table II. The granularity of the date field is in ms. Since multiple trades can execute within the same ms, we use the monotonically increasing trade ids as a way to order the trades.

Field Description
id Incremental trade id
exchange Exchange id
symbol Pair symbol
date

Time (in epoch) when the trade took place

price Trade price
amount Trade quantity (quoted in base asset)
sell
Binary. If TRUE, then the
holder of , swapping to ,
was a liquidity taker, and is the
base asset in the pair
listed on the exchange
Table II: Kaiko’s trade data fields.

Kaiko’s historical order book data is given on a 60-second basis, that is, for every pair listed, its entire order book is given in 60 second increments of the date field. Note that the quotes’ depth are not given and need to be reconstructed separately. The data fields are described in Table III.

Field Description
symbol Pair symbol
date Time (in epoch) when the order was placed
type Bid or ask
amount Order quantity (quoted in base asset)
Table III: Kaiko’s order book data fields.

Iv-B Data Limitations

Kaiko’s order book data is given on a -second interval basis and Binance’s API does not provide historical order-book data [binance_api]. Complete order book data could reveal all arbitrage opportunities, not just the ones executed with actual trades, as it would accurately paint the traders’ view of the market at any point in time. When merging Kaiko’s historical trade data with its order book, only about of the trade data has matching order book data available within a interval. (During our measurements, we used smaller time intervals than .) For profitability measurements, about of the time, we were able to use the order book’s bid/ask directly. For the remainder, we approximated the bid/ask price with the volume-weighted average price of that time interval, based on the trade data. In addition, Kaiko does not include trade fees or historical fee schedules, so we had to reconstruct Binance’s historical fee time series.

Iv-C Binance Trading Fees

An important data point for our analysis are the trading fees collected by Binance [binance_fees]. For every trade executed, Binance collects a fee from the proceeds of the trade. The fees are collected either in the currency of the proceeds or in Binance’s native ERC20 token, BNB, depending on the trader’s BNB balance. If the trader has enough BNB balance, Binance will calculate the conversion rate between the proceeds and BNB, and withdraw the fees from the BNB balance. In general, Binance rewards participants who trade large volumes by charging them a lower fee. In addition, for high-volume traders, Binance distinguishes between liquidity-taking trades, i.e., market order trades or limit order trades that were matched immediately at the best bid/ask level, and market-making trades, which are trades that were placed somewhere in the order book but were not executed immediately. Binance charges less fees for market-making trades, as they wish to encourage participants to “fill up” the order book, thereby narrowing the bid/ask spread and increasing liqudity. This is a common practice; however, in traditional financial exchanges, market-makers pay zero or even negative fees (rebates, kickbacks).

We assume that arbitrageurs are operating at the lowest fee level. To track Binance’s fee schedule, we used the Wayback Machine [wayback], a digital archive of the World Wide Web, to view Binance’s fee web page historically. In our analysis time span, Binance’s fee web page changed times. However, the lowest fee level remained constant at bps for makers and bps for takers.

V Methodology

In this section, we describe our methodology for discovering triangular arbitrage trade sequences in Binance by examining the trade data. During our analysis, we discovered that a sub-strategy of triangular arbitrage, involving only the first two conversions, is widely deployed. We refined our original methodology to identify such conversions. These conversions exhibit some risks, one of them is the scenario where multiple traders compete for the same intermediary coin, potentially harming laggards’ profitability. We identify these risks and outline a methodology for clustering competing events. Lastly, we observe different strategies traders take to mitigate this risk and describe a methodology to detect it.

V-a Discovering Triangular Arbitrage Trading Sequences

To discern triangular arbitrage trading sequences, we design a methodology to identify likely arbitrage trading sequences. We look for trading sequences of the form , where is an anchor coin (BTC, BNB, ALTS, Stable coins). Arbitrageurs start with some quantity of , exchange it to at price , resulting in units of . In practice, Binance deducts the fee upon conversion, therefore will be slightly lower than the conversion price. Next, units of are converted to , resulting in units, minus fees. Lastly, units of are converted back to , minus fees, resulting in units of . If , then the arbitrage sequence is profitable.

To successfully profit from this opportunity, arbitrageurs need to execute trades, , and . First, an arbitrageur needs to calculate the initial quantity of , such that during conversions, fee payments and other trading constraints will leave no or minimal residue in the intermediary coins. Second, since Binance does not support batch trading, i.e., grouping multiple orders in a single request, arbitrageurs need to ensure correct timing of their trades. For example, if the order arrives before , then it will fail as the arbitrageur does not hold yet. Furthermore, the arbitrageur competes with other arbitrageurs for these trades, so speed is an important factor.

In order to identify triangular arbitrage sequences, we first need to ensure that the same quantity is flowing through different coins, ending at the base coin. Binance quotes quantities based on how the pair is listed. Different pairs have different quantity/price restrictions, namely, minimum, maximum and increment size. Since quantities and prices change in discrete steps, a small quantity might not be converted, leaving a residue. These small residues need to be accounted for when identifying trades with equal quantities. While these residues have a (small) value, in practice, they cannot be converted immediately to anchor coins, due to minimum size restrictions. As residue accumulates beyond the exchange threshold, arbitrageurs can convert it back to anchor coins. We found that less than of the time, the profitability was decided by the residue. Therefore, in our detection process we ignore the residue value. To illustrate coin exchanges, we follow an actual trade example from Binance.

V-A1 BtcETH Exchange Example

Consider the conversion between BTC and ETH. It is listed as ETH/BTC in Binance. ETH is called base asset and BTC is called the quote asset. The quantity is always given in base asset terms. This pair has a minimum quantity (base asset), maximum quantity, quantity increments, minimum price (quote asset), maximum price and price increments. At the time of writing, the last trade of ETH/BTC was executed at a price of and quantity . The “sell” flag was on, meaning that the holder of ETH was the one to initiate the trade and met the buyer at the buyer’s bid price. Assume both participants are at the cheapest fee level, currently at bps for takers and bps for makers.

From the ETH holder’s perspective: Since ETH is the base asset and the “sell” flag is on, this means the ETH holder initiated the trade and met the buyer at the buyer’s bid price, therefore paying a liquidity taking fee of bps. The holder exchanged units of his ETH at a price of BTC per ETH. This means the holder ended with units of BTC. Note that if BTC are to be exchanged for some other coin, only could be converted, leaving BTC residue.

From the BTC holder’s perspective: Since BTC is the quote asset and the “sell” flag is on, this means the BTC holder provided the liquidity for the trade and his price was met by the seller, thus paying a liquidity making fee of bps. The BTC holder exchanged units of BTC at a price of BTC per ETH, while paying bps fee, resulting in ETH.

From Binance’s perspective: They collect bps of the BTC proceeds from the ETH holder, i.e., units of BTC. If the ETH holder also holds BNB, then this amount is actually converted to BNB terms (using an average of recent exchange ratios between BTC and BNB), and deducted from the BNB balance. If the ETH holder does not own BNB, then BTC are deducted from the proceeds. In addition, Binance also collect bps of the ETH proceeds from the BTC holder, i.e., units of ETH. If the BTC holder also holds BNB, this amount is collected in BNB terms as well. Note that if the seller/buyer did not hold BNB, the fee would have been higher. In our analysis, we assumed arbitrageurs operate at the lowest fee level.

V-A2 Identifying Equal Quantities in Triangular Arbitrage Sequences

We identify sequences of trades, , where the same quantity is passed. The quantity is quoted in the base asset and depends on whether or is listed, whether or is listed and whether or is listed. When matching quantities between trades of two pairs, having a common coin, and , we translate the quantities to the common coin’s terms, , and check if they are equal, up to fees and residue resulting from the trade. In Table IV, we describe the translation process, based on different listing scenarios in Binance.

Binance listing Matching condition
,
,
,
,
Table IV: Matching equal quantities in conversions with common coin. and are the quantities and prices quoted in the trade data.

V-A3 Identifying Trade Latency in Triangular Arbitrage Sequences

When a triangular arbitrage opportunity presents itself, arbitrageurs compete amongst each other to be the first to execute the trade sequences. There are three trades to be executed, , and . Since Binance does not support batch trading, an arbitrageur will have to send three limit orders with prices and quantities . These quantities are equal in the conversion process, in the sense explained previously and the prices match the prices quoted in the order book. To ensure that trades are received in their original order, the arbitrageur will take into account network latency and wait a small amount of time between sending consecutive orders. Analysis of the trade data suggests that the average latency between consecutive trades is

ms with a standard deviation of

ms. Around of trades with matching quantities are executed within ms-ms of each other. Therefore, clustering trades using longer latency does not have material impact on the number of trades identified. We find that using ms as an approximation for arbitrage latency between consecutive trades maximizes precision and minimizes recall.

We found that less than of triangular arbitrage sequences contain a liquidity-making trade. We believe this behavior is caused by Binance’s fee model, which charges traders a commission even for liquidity making trades. If traders used liquidity-making orders, they would need to pay the fee in case they were filled. At that point, it is not guaranteed that an arbitrage opportunity will exist, while the fee is already paid and exposure to what is mostly an illiquid coin is already established. To further enhance our precision, we require arbitrage trade sequences to be all liquidity-taking.

Furthermore, we found a surprisingly low number of triangular arbitrage trades, 1,381,928 in total, accounting for of total number of trades. However, in the course of clustering triangular arbitrage trades, we witnessed a much larger number of partial arbitrage sequences, 20,892,825, or of total trades, where traders executed the first two trades, and , but did not execute the third trade, . Executing the first two trades effectively converts to at an exchange ratio of , minus fees and residue. Interestingly, of the time these trades resulted in an exchange ratio that was favorable to the exchange ratio of the direct trade . We call this trading strategy indirect internal conversions and explain below in more details what is means to have a “favorable” rate.

We refine our methodology to identify indirect internal conversions and study the root cause of unprofitable instances. We elaborate on the risks associated with this trading strategy in the discussion section.

V-B Discovering Indirect Internal Conversion Attempts

We refined our original methodology for discovering triangular arbitrage sequences by relaxing the constraint for the third trade to be executed. We identify equal quantities in the first two trades in the same way as before. To determine the trade latency, we empirically explored different time constraints. of trades with equal quantities have a latency between ms and ms. Latency lower than ms gives poor recall, with less than of total attempts. Latency greater than ms only accounts for of all attempts. The average latency is ms with a standard deviation of ms. We find that, as before,

ms is an approximation that likely provides both high precision and recall for identifying indirect conversion trading sequences. However, we lack ground truth to definitively evaluate this part of our methodology.

V-B1 Determining Profitability of Internal Conversions

The first two trades of a triangular arbitrage sequence, are and . Executing these two trades gives an indirect exchange ratio between and . If this exchange ratio, net of fees and residue, is greater than the exchange ratio of , then this conversion offers a favorable exchange ratio to the direct one. We call such favorable conversions indirect internal conversions. Since the exchange ratio between and fluctuates, it is important to define the time it is taken. We wish to approximate the trader’s view of the market upon executing the internal conversion. Therefore, we take the exchange ratio at a short period of time prior to the first trade’s execution time. As discussed above, ms is a good delay approximation for the trader’s view. Kaiko’s order book data is given on a -second basis, so it is unlikely that this ms time window falls within Kaiko’s data intervals. To approximate the order book’s best bid/ask price at the time, we take the volume weighted average price (VWAP) [vwap] of , over the period of ms, prior to the execution time of the first trade. These trades tell us the best bid/ask level at that time, and taking an average, weighted by volume, is a good approximation of the trader’s view of the order book. However, it is possible that within that time period, other participants posted bids and asks and then cancelled them, giving the trader a completely different view of . In our analysis, we assume that this did not occur. If there were no trades during that period and order book data is unavailable, we cannot determine if the conversion is profitable and did not include such conversions in our profitability analysis.

We found indirect conversions, which is of the total number of trades. of the indirect conversions resulted in a favorable exchange ratio. We hypothesized that unprofitable conversions occur when multiple traders obtain the same intermediary coin , and simultaneously attempt to convert it to . For example, one trader is looking to convert for a favorable exchange ratio to , and a second trader is looking to convert at a favorable exchange ratio to ( could be the same coin as ). When both traders obtain , there could be a scenario where only one trader is able to convert to at the best bid/ask level. This happens when the first one to execute consumes the entire quantity of the best bid/ask and causes the order book to change. The laggard in this case engages in a loss mitigating strategy. One option is to convert to at a worse exchange ratio than originally intended, potentially resulting in a conversion that is worse than the direct one. Another option is to convert to several other coins, with the goal of minimizing the potential losses from unfavorable exchange ratios. We call the former strategy a full-exit strategy and the latter partial-exit strategy.

To corroborate our hypothesis with the trade data, we refine our methodology to cluster competing conversions and identify loss-mitigating exit strategies.

V-C Clustering Competing Indirect Internal Conversion Attempts

Using our methodology to discover indirect conversions, we identified conversions that were initiated around the same time and had an overlapping intermediary coin. This is because competing conversions try to complete the same second trade. Therefore, for a given second trade , we look at indirect conversions attempts of the form that started within ms of each other.

Every cluster of competing conversions can have winning conversions, i.e., indirect conversions that were completed at a favorable rate to the direct rate and losing conversions, conversions that completed at an unfavorable rate to the direct rate.

Losing conversions can have many causes, such as mistiming or an inaccurate view of the order book. We believe that one of those reasons is that traders who successfully completed the first trade, and failed to complete the second trade, are unloading their coin at an unfavorable rate to avoid having directional exposure to .

V-C1 Identifying Loss-Mitigating Trading Strategies

For losing conversions, we wanted to see if the loss was the result of a competing winning conversion that utilized all the capacity of . Determining whether a conversion utilized all capacity is impossible without knowing the order book at that time. However, we can approximate it by observing the next trade of . Since we have the trade id, which is monotonically increasing with the trades, we can tell whether the next trade of

was completed at the same price or not. If it was not completed at the same price, it is likely that the previous trade used up the capacity of the previous level. This is only a heuristic, as traders can post and cancel orders at any time.

Loss-mitigating conversions are losing conversions where a winning conversion in the same cluster used up the intermediary’s coin capacity.

By analyzing the trade data, we found that of all losing conversions corresponded to loss-mitigating traders.

We identified two sub-strategies of loss-mitigating traders.

V-C2 Full-Exit Loss Mitigating Strategy

These are conversions that converted an equal quantity from and , i.e., these are traders who converted all their into one coin.

V-C3 Partial-Exit Loss Mitigating Strategy

These are conversions that converted a quantity from at price , but converted a lower quantity from , i.e., these are traders who unloaded some, but not all of their into one coin. This strategy can be attributed to traders solving the following minimization problem: Find a set of coins having exchange ratios , and a set of quantities , where

such that the following loss function is minimized:

where is the direct exchange ratio of . To detect partial exits, we iterate over all different combinations of trades from having quantities less than , such that they sum exactly to , up to fees and residue.

We found that of loss-mitigating strategies are partial exits and are full exits. It also turns out that solving a loss minimization problems is effective, as the average partial-exit loss is bps while the full-exit average loss is bps.

Vi Results

Vi-a Volume

We found indirect conversions, which is of total trades. We found triangular arbitrage sequences, accounting for of total trades.

The time series of the number of favorable indirect conversion attempts as a percentage of number of direct conversions, on a daily basis, is shown in Figure 2. The number of favorable indirect conversion attempts, on a daily basis, in shown in Figure 3. The number of triangular arbitrage attempts, on a daily basis, in shown in Figure 4.

Figure 2: Percentage of daily volume of direct conversions trades that is also done indirectly. Typically, of the daily volume of a direct conversion pair is also executed via indirect conversion sequences.
Figure 3: Daily number of indirect conversion attempts. From October - October , the number of indirect conversions has been trending down and since October has been trending up.
Figure 4: Daily number of triangular arbitrage attempts. From October - April , the number of triangular arbitrage attempts has been trending down and since April has been trending up, with a sharp spike in July

Vi-B Latency

We found that indirect conversion sequences have, on average, ms of delay between the first trade and the second, with a standard deviation of ms. have a latency of ms or less. Triangular arbitrage sequences are faster than indirect conversions. This could be an indication that this space is more competitive. We found that triangular arbitrage sequences have, on average, ms of delay between consecutive trades, with a standard deviation of ms. have a latency of ms or less. The latency statistics of triangular arbitrage sequences and indirect conversions are shown in Table V.

Type Metric Value
Triangular Arbitrage Latency Average ms
Triangular Arbitrage Latency Stdev ms
Triangular Arbitrage % Below ms
Indirect Conversion Latency Average ms
Indirect Conversion Latency Stdev ms
Indirect Conversion % Below ms
Table V: Latency statistics for triangular arbitrage and indirect conversions. The triangular arbitrage strategy exhibits lower latency than indirect conversions, possibly a sign that this strategy is more competitive

The latency distribution, in ms, of indirect conversions and triangular arbitrage is shown in Figure 5.

Figure 5: Left: Latency distribution, in ms, of indirect conversion trade sequences. Right: Latency distribution, in ms, of triangular arbitrage trade sequences. Indirect conversion trades exhibit higher latency with a fatter tail, indicating that triangular arbitrage is more competitive.

Vi-C Profitability

We calculate the equal-weighted return and the return on capital for triangular arbitrage trades and indirect conversions. The equal-weighted return is the average of returns. The return on capital is the arithmetic average of returns, weighted by quantity of base coin committed to the trade, i.e., larger trades receive higher weight.

Indirect conversion attempts were profitable of the time with an equal-weighted net return of bps. The return on capital for indirect conversions is greater, at bps, which means that traders efficiently commit more coins to more profitable opportunities.

Triangular arbitrage trades were profitable of the time with an equal-weighted net return of bps. The return on capital for triangular arbitrage sequences is greater, at bps, which is slightly higher than the equal-weighted return, but not significantly.

It appears that triangular arbitrage traders are unable to significantly allocate more coins to more profitable opportunities. One potential explanation is that the space is more crowded, or “arb-ed out,” than the indirect conversions strategy.

Vi-D Loss-Mitigating Strategies

We saw instances of indirect conversion completed at an unfavorable rate compared to the direct rate, or of the total number of indirect conversions. of such conversions were loss-mitigating trades, triggered by a competing indirect conversion that used all the intermediary coin’s capacity. When this happened, there were competing conversions on average. The highest number of competing conversions we saw in one cluster was .

In of such cases, the entire base quantity was unloaded into another coin, i.e., they were full exits. The return on capital for the full exit strategy was bps. of the time, the base coin quantity was unloaded to several other coins, i.e., they were partial exits. On average, the number of coins used to exit was , and the return on capital was bps. Intuitively, this shows that solving a loss minimization problem mitigates losses by bps compared to a full exit. Note, however, that a full exit could potentially be the solution to the minimization problem as well.

Vii Discussion

The existence of triangular arbitrage in traditional foreign exchange markets is well documented and studied in academia. In centralized cryptocurrency exchanges such as Binance, triangular arbitrage happens at a small scale. However, we found that a different strategy is taking place, which converts two coins through an intermediary coin, at a favorable rate to the direct conversion rate. This strategy comes with a risk, however, that multiple competing conversions occur at the same time, preventing slower ones from completing their conversions. We saw that when this happens, traders engage in a loss-mitigating strategy. We believe that the rationale for this strategy stems from Binance’s fee structure, where there is a fee for market-making, thus creating frictions for the triangular arbitrage strategy. We believe arbitrageurs adapted to the fee structure by executing the indirect conversions strategy. While triangular arbitrage increases the arbitrageur’s holding in the base asset, indirect conversions simply provide a more favorable ratio to the direct one. Participants who already have a stake in the cryptocurrency ecosystem and wish to rebalance their portfolio might choose to engage in this strategy.

Viii Conclusion

We found that of daily trades on Binance can be attributed to triangular arbitrage trades. We found that a different strategy is times more prevalent, at of daily trades, which involves exchanging coins through an intermediary coin at a favorable rate to the direct exchange rate. We designed a methodology to measure such events and discovered that of the time the rate obtained from these conversions is bps better than the direct one. When it is not, of the time traders engage in loss-mitigating strategies, and we identified two of them.

Acknowledgements

The authors would like to thank Andrew Papanicolaou and David Yermack for their feedback and suggestions to improve the quality of our manuscript. We acknowledge funding support under National Science Foundation award 1844753.

References

Ix Appendix

In this appendix, we define notations that are specific to the market microstructure of Binance and formally define triangular arbitrage and indirect conversions.

Let be the set of all pairs traded on Binance. Every pair facilitates two conversions; from to and from to , denoted by and , respectively.

Definition IX.1.

(exchange ratio) Let be the proceeds of converting 1 unit of coin to . We call the exchange ratio and it is given by

Definition IX.2.

(pair capacity) Denote the maximum quantity that can be converted to . We call the capacity of and it is given by

Definition IX.3.

(bid-ask spread) We write

the bid ask spread of pair

Definition IX.4.

(trade quantity) suppose we wish to convert units of to . The trade quantity passed to the exchange as a parameter is denoted and is given by

Definition IX.5.

(minimum trade lot size) Let be the minimum amount of that must be converted to in , i.e., when converting units of to ,

Definition IX.6.

(high-level parameters) the -th order book exchange ratio and capacity are denoted and , respectively.

Definition IX.7.

(minimum price increment) Denote the the minimum order book price increments of .

Remark.

It holds that .

In practice, when converting units of to , the trade quantity passed to the exchange as a parameter has to be a multiple of , therefore only units are passed. Denote the rounding operation of to the nearest multiple of .

Definition IX.8.

(residuals) Let be the quantity of left when converting units of to . We write

Therefore, converting units of yields units of and residual units of

Ix-a Cycle Arbitrage

The set of pairs is called a cycle, if and for . In the context of cycles, we use the shortened notation when referring to pairs of the form . A cycle with is called a triangular sequence.

Definition IX.9.

The capacity of cycle is the maximum quantity of that can be converted through its pairs.

The capacity of a cycle is given by

(1)

The balance of , denoted , is given by the recurrence relation

Remark.

Ix-B Binance Fee Structure

The fees paid on are where and is the last traded price of

The gain/loss in terms is given by

(2)

Note that is a function of as well as .

Definition IX.10.

a cycle is called an arbitrage free cycle if

Definition IX.11.

a cycle is called an open cycle if

Remark.

One can argue that there are additional costs for converting the residuals to and purchasing BNB tokens ahead of time to be able to pay fees, which are not accounted for in (2). However, this can be done in infrequent bulk trades. We make the assumption that small directional exposure to BNB and residuals is negligible compared to the accumulated gains over a period of time.

Remark 1.

If we assume zero residuals, i.e., then and (2) reduces to

Ix-C Indirect Internal Conversions

The set of pairs is called a conversion if for . In the context of conversions, we use notation when referring to pairs of the form . When the intermediate pairs are clear, we use the shortened notation

Definition IX.12.

The capacity of conversion is the maximum quantity of that can be converted through its pairs and is defined similarly to the capacity of a cycle.

Definition IX.13.

(conversion proceeds) Let be a conversion from to with capacity . The conversion proceeds of units of is the quantity of that results from converting through the pairs of , accounting for residuals and fees, i.e.,

Definition IX.14.

(profitable conversions) Let and be two conversions from to , with capacities and , respectively. Let . We say that is a profitable conversion w.r.t.  if the proceeds of conversion are greater than the proceeds of conversion , i.e.,

Ix-D Binance Order Types

Binance supports the following order types:

  1. LIMIT - an order to buy/sell a pair at a specified price and can only be executed at that price (or better). Not guaranteed to execute

  2. MARKET - an order to buy/sell a pair at the best current market price, i.e., lowest ask or highest bid.

  3. STOP_LOSS_LIMIT - an order to buy (sell) a pair, once its price exceeds (drops below) the specified price. In contrast to a LIMIT order, the price should be above (below) the lowest ask (highest bid). The execution price is guaranteed to be the specified price.

  4. STOP_LOSS - same as STOP_LOSS_LIMIT, but when the price threshold is breached, a MARKET order is executed and the execution price is not guaranteed.

  5. TAKE_PROFIT_LIMIT - equivalent to a LIMIT order

  6. TAKE_PROFIT - automatically places a MARKET order when the specified price level is met

  7. LIMIT_MAKER - LIMIT orders that will be rejected if they would immediately match and trade as a taker.

  8. ICEBERG - an order used for large quantities as it automatically breaks down to multiple LIMIT orders with different prices. The goal is to hide the actual order quantity and prevent trend-followers from unfavorably moving the price.