Monday, February 24, 2020

BitMex Funding Rate Arbitrage

Last year I wrote about the peculiar BitMEX ether perpetual swap. The average funding rate paid by long ETH swap holders has been 50% annualized since it started trading in August 2018, considerably higher than the BTC swap rate of 2%. BitMEX makes enough money off their day trading users via their latency edge to insiders, so they let their rube traders fight over the basis: the shorts get what the longs pay. At 30k feet, it seems you can go long ETH, short the BitMEX ETH perpetual swap, and make 50% annualized with no risk. Arbitrage!

Actually, there's no arbitrage. This 50% funding rate anomaly is just the result of the simplistic pricing algorithm they used, which generates a convoluted payout. That is, as a crypto exchange, everything is denominated in BTC, but their ETH perpetual swap references the USD price of ETH. This generates the following USD return:

  • ETHswap USD return=[1+ret(BTC)]*ret(ETH)
where ret(BTC) and ret(ETH) are the net returns for bitcoin and ether. The expected value of this swap, assuming a zero risk premium for ETH and BTC, is just the covariance of the ETH and BTC:

  • E{ETHswap USD return}=covariance(ret(ETH),ret(BTC))=ρb,eσbσe
This is unfortunate because wary investors have to look at the current funding rate and expected correlation to make sure they are getting a good deal. Luckily, BitMEX insiders have arbitraged this pretty well historically, so you would have done well be simply ignoring the correlation and funding rate, and trusting arbs to sort it all out for you. If we look at the historical returns on ETH/USD, and compare them to the BitMEX ETH swap, we see this fits the data perfectly:



This shows the additive total return, in USD, for someone who was simply long ETH, and one long the ETH perpetual swap at BitMEX. The differences are insignificant. 


Note that this uses BitMEX's published funding rates, which update every 8 hours. It uses BTC and ETH prices from Windex, and the covariance is derived from BTC and ETH returns. So just as arbitrage pricing theory would suggest, the BitMEX ETH swap returns--without the funding rate--are 50% higher than the raw ETH returns in this sample period (annualized). Yet when you subtract the funding rate, it brings things back into alignment. 

In other words, the average annualized funding rate and the covariance (annualized) have been 50%. The 50% made via the convexity adjustment is taken away by the funding rate (vice versa for the short). 

Several people have contacted me after searching around the web for information on arbitraging BitMEX's ETH swap, thinking I too discovered the arbitrage opportunity. Obviously, I wasn't clear: there's no arbitrage here. I'm supplying a link to an Excel workbook with this data to make this easier to see. 

While this is a nice example of efficient markets, going forward, it's not good to trust anyone on the blockchain, especially when you probably lied about your home country (to trade from the US, one uses a VPN and pretends to be from Costa Rica), and they are domiciled in Seychelles (the Panama of Africa?). 

5 comments:

Anonymous said...

What about the BTCUSD funding?

If you buy x BTC somewhere and then short x worth of BTCUSD on Bitmex you get a synthetic dollar bond (no exposure to the BTC price as seen in dollars) with the funding as coupon, and when I looked at it a little while ago it seemed to hove around 10% annualised.

Sounds too good to be true, even though you get the risk of the whole BTC ecosystem blowing up and some of the risk of Bitmex doing a runner, although you can hedge that to an extent by not fully funding the short using the Bitmex leverage, e.g. have x% of the BTC as margin on Bitmex and the rest in a cold wallet, and rebalance as the rate moves, or you could diversify the Bitmex risk by taking similar positions at other crypto derivative exchanges (which seem to have the same funding, as expected).

Eric Falkenstein said...

The BTC swap does seem to present a potential arbitrage. the Funding rate does bounce around, but it is serially correlated.

Anonymous said...

Indeed, the apparent elevated funding rate isn't such an easy arbitrage. But to say it is parity is missing many components to executing the arb. You need order book tick level data, and a dynamic strategy to hedge xbtusd exposure on the quanto.

Prawalika said...

very informative article post. much thanks again
blockchain training in hyderabad
blockchain course in hyderabad
blockchain coaching in hyderabad
blockchain training institute in hyderabad
blockchain institute in hyderabad

Komal said...

very informative article post. much thanks again
blockchain training in hyderabad
blockchain course in hyderabad
blockchain coaching in hyderabad
blockchain training institute in hyderabad
blockchain institute in hyderabad