Key Summary

BitDEX is a specification for a decentralized, permissionless margin trading platform to rival centralized counterparts such as BitMEX.

The framework requires no centralized operator with no centralized price feed through the introduction of priceless financial contracts.

The whitepaper comes at a pivotal point in DeFi as BitMEX and other centralized exchanges run into security, privacy, and regulatory issues.

The UMA Protocol team is not building BitDEX but they hope to inspire other developers to take on this challenge with the published specification.

Introduction

With over $1 trillion in annual volume, BitMEX has established itself as the go-to centralized exchange for risk-seeking crypto investors looking to trade on margin. For those unfamiliar, BitMEX offers up to 100x leverage on major digital assets with no contract expiry dates and minimal KYC/AML requirements. This has led to an explosion of user growth across the crypto community as traders search for higher exposure to the world’s most popular digital assets.

Graph via The Block

While BitMEX has seen its fair share of success, the exchange has recently come under fire by compromising user privacy in an email leak on November 1st, 2019. With this, BitMEX users received an email update that featured a laundry list of exposed user email addresses in the “To:” field. While the email addresses were the only information leaked, it still reaffirms the risks associated with centralized exchanges – data privacy. Outside of BitMEX, we’ve also seen regulatory tightening across all global exchanges in terms of leniency with US traders. Many centralized crypto exchanges, including Bittrex, Poloniex, and the main Binance exchange, have closed shop for US participants.

All of these events and issues lead to the growing importance of decentralized, permissionless finance. With the current problems surrounding user privacy and the hell-hole that US crypto companies (and investors) have to operate in, it drastically increases the value proposition for DeFi in the coming future.

As such, having permissionless access to leverage on crypto assets could be a massive benefit for not only US investors, but also the rest of the world.

A Brief Overview on Perpetual Swaps

The most widely traded asset on the BitMEX is perpetual swaps. A perpetual swap is a derivative product similar to traditional futures contracts, however, there are a few key differences.

The biggest difference with perpetual swaps is that they have no expiry or settlement date, allowing the contracts to go in perpetuity (thus the name). The second major difference is that perpetual swaps use a margin-based spot rate and therefore trade close to the underlying index price. Compare this to traditional futures contracts where the contract normally trades at significantly different prices, perpetual swaps offer a rather intuitive derivatives contracts for crypto investors.

Mechanisms

To touch on this briefly, BitMEX’s perpetual swaps have a few different mechanisms that are important to understand before diving deeper into UMA’s proposal. The most important mechanisms to understand are the “initial and maintenance margin” which determine how much leverage the trader can access along with the liquidation price.

The other mechanism is “funding rate” which are periodic payments between the buyer and seller based on the performance of the underlying asset. This can almost be seen as an interest rate between counterparties for having an open contract. With this, if the funding rate is positive, the longs will pay the rate while shorts receive the rate and vice versa.

Understanding UMA Protocol

UMA (Universal Market Access) is an Ethereum protocol for permissionless financial contracts and other financial products. In short, UMA has two main components to the protocol: a framework for issuing synthetic tokens and secure oracles with economic guarantees. These two components provide a robust protocol for issuing synthetic assets in a secure, decentralized fashion.

When building with UMA, only creativity is in shortage. In essence, developers can build literally a synthetic version of any financial assets in existence along with other DeFi-native assets which would never be possible in traditional finance.

As such, two interesting conceptualized products using UMA include tokenized yield curves and what we’ll cover here: BitDEX, a decentralized protocol for trading perpetual swaps.

Introducing BitDEX

In early October, the team published the whitepaper for BitDEX. The specification uses priceless financial contracts which are a single smart contract, per market, responsible for custody for all counterparties margin while publicly displaying the net deposits for each counterparty. Priceless financial contracts are the core innovation with the BitDEX whitepaper as it allows position data to be publicly available and ultimately allows anyone to audit and dispute positions. With that in mind, the majority of computation occurs off-chain as the ledger only needs to record position and margin data (in addition to trigger disputes when positions are under-collateralized).

In other words, BitDEX is a single smart contract that transparently records the position and margin data on Ethereum where certain parameters define the risk and rules of engagement for both counterparties.

With BitDEX, counterparties are matched off-chain where they post 10% of the position they would like to take as margin, creating up to a 10x leveraged position. As outlined above, with perpetual swaps, as the price of the underlying asset fluctuates, one side will be required to post additional collateral to prevent their position from being liquidated and avoid incurring a penalty fee.

Image via BitDEX whitepaper

It is important to note that there is no centralized price feed and no centralized authority to ensure proper collateralization. As such, counterparties “bring their own price” as they are responsible for monitoring the other counterparty’s position to ensure they are properly collateralized.

By knowing that if the other person is not properly collateralized, a dispute resolution process can be initiated which would result in a penalty payment for the under-collateralized counterparty.

This is one of the core innovation with BitDEX as with oracles, everyone must vote on the correct price and incur a delay. With priceless financial contracts, the system avoids the need for anyone to vote unless something has gone wrong and there’s a dispute which drastically streamlines the computation required for the system to function.

With all of this in mind, BitDEX essentially relies on game theory and financial incentives to secure margin trades in a transparent and open manner. Moreover, no one is trading against BitDEX in a “black box” like centralized alternatives but simply the other counterparty who agrees to the contract and its terms in a completely open and public manner.

Image via BitDEX whitepaper

Dispute Resolution

At any point, any long position can dispute any short position and vice versa. With this, the only requirement for submitting a dispute resolution is that the disputer and the disputed are both counterparties to BitDEX and have some degree of offsetting risk.

When the dispute function is called, the contract immediately terminates the trade for both counterparties and initiates the dispute resolution process. As outlined in the whitepaper, the dispute resolution can be implemented as follows:

BitDEX logs a request with an oracle (like UMA’s) to retrieve accurate price data When the oracle verifies the price, the BitDEX contract calculates the margin requirements If the dispute was accurate, the disputer is paid the NPV (multiplied by their risk) in addition to a penalty fee If the dispute was inaccurate, the disputer is paid the NPV (multiplied by their risk) less a penalty fee

Conclusion

In summary, BitDEX provides a powerful alternative for building a decentralized BitMEX. This is vital for the proliferation of DeFi as permissionless access to leverage creates more opportunities for more people and the system can soak up a portion of the $1.1T in annual volume from centralized alternatives.

More importantly, the innovation of priceless financial contracts creates an extensible framework for other financial contract designs outside of perpetual swaps. The notion that counterparties have the proper incentives to work as operators themselves (rather than centralized, black boxes) can be applied to other financial products including futures, synthetic tokens, and other swaps.

We’re extremely excited to see the BitDEX on Ethereum in the future and the developers that will step up to implement one of the foundational building blocks for a decentralized financial system.

If you’re interested in learning more about DeFi and staying on top of emerging topics, be sure to follow DeFi Rate on Twitter!

Resources