Bitfinex Flash Crash Postmortem

Screen Shot 2015-08-20 at 4.18.33 PM

On August 18th a trader(s) capitalised on the general malaise over the BitcoinXT debate, and the Bitfinex margin trading platform. Bitfinex USD swaps remained at ATH levels even as spot began falling after the Grexit drama washed over. The average “kill zone” slowly creeped higher as traders bought in at the top of the last rally. Pushing the price into the kill zone would set off a wave of cascading margin calls. In addition, traders using Bitcoin as collateral would enter into a negative feedback loop. The value of their collateral declines at the same time as the Bitcoin price falls.

The chart above is from BFXData. I have circled the flash crash event. A trader(s) borrowed a much XBT as possible with the intention of slamming the book to go short. That is the spike in the red line, which is the total XBT swaps outstanding. The blue line, which is the XBT price, tanked as the seller hit bids. We know that that a majority of leveraged longs got cleared out because the green line, the outstanding amount of USD swaps, declined. Traders began getting margin called and Bitfinex had to liquidate their positions and their XBT collateral in some cases.

If that weren’t bad enough for longs, cracks in Bitfinex’s margin trading software became apparent. From Phil Potter’s, the Bitfinex CEO, conversation on Whaleclub TeamSpeak after the event, I speculate there was a miscommunication between the spot trade matching engine and the system that handles margin trading. A latency between the two systems would cause more liquidations to be enacted because the margin engine had stale data. If the margin engine thinks the price is lower than it actually is, it will continue to liquidate traders causing a flash crash.

In Bitcoin, it always pays to have dry powder ready. Bitfinex is still the number one Bitcoin/USD exchange by volume. Violent flash crashes and short squeezes will continue happening on Bitfinex. As of Friday, BitMEX will settle all contracts based on TradeBlock’s XBX Index. When another similar situation occurs, read below on how to capitalise using BitMEX futures contracts.

Assume that Bitfinex’s price is $160 while the other major exchanges are trading at $220. Buying spot on an unlevered basis at $160 and selling at $220 gives an arbitrage profit of $60. Without using derivatives, buying cheap on Bitfinex and selling expensive elsewhere leaves time risk. In the time it takes to transfer Bitcoin between two exchanges, the price on the expensive exchange could fall to the level of Bitfinex.

Instead buy spot at $160, then sell XBT7D (BitMEX’s weekly XBTUSD futures contract) at $220. You have locked in a profit of $60. Once the coins have been transferred from Bitfinex to the expensive exchange, you sell spot and buy back your XBTUSD futures. If the rest of the global exchanges fell to the level of Bitfinex, then your XBT7D short position would profit. This would maintain your $60 arbitrage profit.

BitMEX Switches To TradeBlock’s XBX Index

Effective Friday 28 August 2015 at 12:00:01 GMT, XBT (Speculation), XBU (Hedging), and BVOL (Volatility) contracts will expire based on the TradeBlock XBX Bitcoin/USD Index. All contracts expiring on 28 August 2015 will expire as per normal on the Bitfinex Bitcoin/USD price.

XBX Overview

The TradeBlock XBX Index represents a real-time, USD-equivalent spot rate for Bitcoin. The underlying algorithm is uniquely designed to provide a reliable reference rate by tracking the Coinbase, Bitfinex, itBit, OKCoin, and Bitstamp exchange rates, and to reduce the impact of anomalies at individual exchanges.

Why Change?


The risk of manipulation, exchange outages, and bad API data are compounded when only using one Bitcoin reference exchange. We believe that TradeBlock has created an excellent and robust index on which BitMEX can build industry leading derivative products.

API Consumers


There will be no changes to the API endpoints. All BitMEX indices will accept prices from XBX Index instead of Bitfinex. Weightings of each exchange will be published.

If you have any questions about the switch to the XBX index, please don’t hesitate to contact us.