Ethereum THORChain Arbitrage
Introduction
THORChain is a decentralized cross-chain liquidity protocol that relies on users taking on a few roles that ensure the proper functioning of the network. One of these roles monitors liquidity pools and by continually trading between protocol pools and external markets maintains a proper balance.
In this report we will have a closer look at the activity of users taking on the Trader
role and use the Ethereum network in the process of arbitrage for the THORChain protocol.
Results
Over the past three months, there were a total of 133 addresses acting as arbitrageurs, executing at least a transaction swapping the same asset between Ethereum and THORchain. The most activity can be observed at the beginning of the observed period, with daily arbitrage and arbitrageurs counts following a general downward trend to the end of the period.
With Ethereum transactions being generally slower and more expensive, the option naturally sits lower on the preference list of arbitrageurs who can just as well engage in the activity and balance pools by trading between THORChain LPs. For this reason, we can see that only a relatively low number of actions are being taken on a daily basis where arbers need to access the Ethereum liquidity pools.
Below we have a further breakdown of active arbitrageurs for each of the selected time frames. There has been a general decline over the observed timeline, but it currently seems like it has found an equilibrium zone.
Because of the massive market downturn experienced throughout 2022, trading activity and volume also shrunk down, directly impacting the number of opportunities presented to arbitrageurs. Out of all the arbers that have made an arb over the observed three months, only 14% were still active during the last 30 days. The percentage goes under 7% for arbers still active during the last week.
Most of the arbitrageurs have only executed a few transactions between the two blockchains, with an average arbs count of 4.5. However, there are a few that have been much more active and made up to 104.
Below we can see the distribution of the USD value of the initial assets used by arbitrageurs over the observed period. Although we could see they make on average only a very small number of trades, the amounts used are fairly large. On average, an arbitrageur has used a total of 21.9k USD worth of assets when starting an arbitrage trade between Ethereum and THORChain.
With ETH being the gas token of the Ethereum token, it naturally is the most abundant asset of the blockchain and one of the most gas-efficient assets to swap. Similarly, THOR is a central piece of the THORChain protocol, with a lot of liquidity locked in many pools. For this reason, we ca see most activity involving one of the two tokens.
Although conventional arbitrage demands that the end-asset is the same as the one the trade started with, we can see in the breakdown below that is not always the case. After all, the purpose of the THORChain traders is to rebalance TC pools by buying or selling the mispriced asset and of course turning a profit in the process.
A somewhat surprising finding is that with the exception of a single transaction, all arbs were made with non-synth pools.
Arbitrage has always been a highly competitive and difficult activity given the high possible upside and the number of eyes chasing each opportunity giving each trade only a small window to profit. Over the observed period, certainly not all arbs were profitable, but over the long term arbers were able to make a cumulative profit of over 12k USD.
Most profit was made during the month of April, but we can also spot a few spikes later on, including during the UST
/LUNA
crash of May.
tl;dr
- Over the last 3 months, there have been 133 different addresses making arbitrage trades between Ethereum and THORChain. However, the activity has been slowing down, with just under 7% of them still active during the last week.
- On average, an arb account made 4.5 transactions with a total amount of assets worth close to 22k USD.
- The most used asset in arbitration trades were ETH and THOR, the most abundant and liquid assets of the two networks. The start and end assets of arbitrage transactions are not always the same, with accounts using a wide variety of tokens to seize the arbitrage opportunity of just one of the assets in a pair.
- Only one arbitrage transaction interacted with synths.
- Many of the arbitrages prove to be unprofitable, but over the long term this activity generated over 27k USD in profit.
Methodology
The time frame
used in this report covers the previous three months to the time of writing.
As defined in the THORChain Documentation, “Traders
compare the exchange rates on THORChain with the rates on external markets. If they find the price is lower on THORChain they can buy there and sell on an external market. If they find the price is lower on external markets they can buy there and sell on THORChain.” Therefore we will be looking for swaps that are executed on either of the two chains and is continued with the same asset in a secondary swap on the other chain.
The process of tracking down arbitrage transactions starts with the flipside_prod_db.thorchain.swaps
table where we will be looking for swaps involving an Ethereum address. This will give us a list of swaps, but more importantly a list of swapper addresses that we can use in the next step to find corresponding swaps of the Ethereum blockchain.
Using the aforementioned list of swapper addresses, we are going to use the ethereum.core.ez_dex_swaps
table to look for swaps made by these users. The table currently only holds swaps made on Uniswap and Sushiswap, leaving out a large number of other liquidity sources arbitrageurs might use. However, these two are some of the largest exchanges on Ethereum and will still help us build a relevant conclusion over the arbitrage activity between the two chains.
Once we have the list of swaps on both networks, we can start combining them to obtain those that we can be certain to be a continuation of the other. To do so, we will match swaps where the next swap uses the same amount of the same asset but on a different blockchain. To account for small discrepancies, the amounts will be matched rounded to two decimals.
The profit of arbitrage transaction is the difference between the value of the final assets compared to that of the initial assets used in the process.