[Tutorial] Arbitrage? Hedging? Perpetual Contracts from Beginner to Master

2021-08-11, 09:07




Summary: Nowadays, as perpetual contracts offer two direction trading, high leverage, and long-term holdings, it has become the most popular category of derivatives in the crypto market. In this article, Gate.io will introduce the history and characteristics of perpetual contracts, and teach you how to use the contract market to hedge or arbitrage.

Key Words: perpetual contract, derivatives, leverage, arbitrage, hedging

In the previous article (The Necessary Terminology for Investing in Cryptocurrency: Financial Derivatives), we introduced several financial derivatives such as futures and options in terms of history and usage. Today we will take a deeper look at one of the star products in the crypto market - perpetual contracts.

Futures: the predecessor of perpetual contracts
As mentioned earlier, futures are commodity contracts in which two parties agree to trade a quantity of a commodity at a specific price on a future delivery date. By purchasing a standardized futures contract, people “book” (or lock-in) a future commodity’s price and pay for it in the future at the agreed price. Futures allow producers to lock in profits or costs in advance, thereby hedging price risk. At the same time, due to the margin mechanism of such products, these financial products provide leverage without interest, so futures become a profit-making tool for speculators and investors.

(For more on price risk, see: Science: From Market Maker to Liquidity Mining, How Important is Liquidity?)

For some producers, the delivery of futures is essential. But for investors seeking to speculate or hedge, delivery leads to a significant problem. In 1992, Nobel laureate Robert Shiller theorized a futures product with no expiry date, allowing illiquid products to be traded in the derivatives market. In 1993, the Chicago Mercantile Exchange (CME) developed Rolling Spot Futures, a product for its exchange products with little delivery demand, in which the system automatically rolls over positions at the end of each trading day. Rolling contracts can also be seen as the predecessor of perpetual contract products.

Before the perpetual contract was born, there were only delivery contracts in the market (first launched by OKCoin in 2013). The designs of derivatives in the crypto market are often based on a certain financial product in the real world. However, as a brand-new asset, crypto derivatives such as perpetual contracts do not have a high amount of commercial producers or hedgers for such a new asset class category.

BitMEX and the birth of perpetual contracts
In January 2014, Arthur Hayes, a former employee of Citibank, founded BitMEX. At that time, bitcoin had just experienced a surge and gained worldwide attention, and began to be regulated by governments due to money laundering and dark web trading. In February of the same year, Mt. Gox, the leading exchange that accounted for 70% of bitcoin trading, announced its bankruptcy because of the theft of 740,000 of their bitcoins, leaving the entire crypto market in ruins. In such a volatile market, that is oscillating back and forth, derivatives that can be traded in both directions are in urgent need.
Arthur is proficient in financial derivatives, so BitMEX is built as a futures contract trading platform. Since there were no stable coins such as USDT at the time, in order to bypass the banks, all BitMEX transactions were settled in bitcoin. On November 24, 2014, BitMEX was officially launched, but at its beginning, BitMEX was not successful. Till 2016, once BitMEX launched its perpetual contract product and increased the maximum leverage from 3 to 100, then its trading volume skyrocketed.



Image: Overview of BitMEX's monthly trading volume from 2016 to 2017


The leverage of up to 100 times in perpetual contracts also poses a challenge to the exchange's technology. As price fluctuates, high leverage will change the user's account data significantly, and the server needs to calculate and audit to ensure the account balance is sufficient. In the early development of crypto trading, BitMEX provided a stable and reliable trading experience and novel derivatives, which led to its rapid growth. At its peak in 2018, the exchange even rented the 45th floor of the Yangtze River Center in Hong Kong, the world's most expensive office, and shared a room with traditional financial giants such as Goldman Sachs.

The mechanism of perpetual contracts
For ordinary futures contracts, the price will converge to the spot price on the expiry. This is because the closer is to the delivery time, the better the forecast of the spot price will be. Frequent tradings by speculators require that the expiring futures contract price be consistent with the spot price. However, this is not a mandatory requirement. Traders with enough funds have the ability to push up or down the futures price by themselves, causing a large price deviation, especially when the delivery is approaching. This is also called a forced selling.

As perpetual contracts have no expiry, it allows investors to track crypto prices constantly. Perpetual contracts are closely pegged to the spot price through funding fees, which make their price less possible to be manipulated by large investors. To control the price of perpetual contracts within an exchange, one would have to change the bitcoin price for the entire market. As crypto currencies were under-traded and under-recognized, these features were particularly important.

Take the Gate.io perpetual contract as an example, the funding fee mechanism works like this:

The funding fee is not paid to the exchange, but is paid by the long to the short, or by the short to the long, depending on the contract-spot price deviation (a.k.a basis difference). The funding fee is paid three times a day, at 00:00, 08:00 and 16:00 UTC. The fee rate is calculated with a specific formula, mainly determined by the basis difference, and the larger the basis difference, the higher the funding rate.



In the Gate.io perpetual contract trading page, the funding rate and the time of the next execution are shown in the red box.

When the contract price is higher than the spot price, the rate is positive and the long needs to pay the short. With such an incentive structure, the price is likely to fall. When the contract price is lower than the spot price, the rate is negative and the short needs to pay the long, under such incentives, the price is likely to rise. So, under this market structure, the perpetual contract price will be pegged to the spot price.

(For details on how to calculate the funding rate, please see: Perpetual Contract Trading Fees - Gate.io Help Center)

To a certain extent, the funding rate reflects users’ willingness to pay to obtain high leverage. Although the perpetual contract allows both long and short trading, the two directions are not symmetrical. In a bullish market, people tend to use leverage, so the funding rate is generally positive.

Based on the quoting currency used for settlement, perpetual contracts can be divided into forward contracts (USDT margin contracts or U-based) and reverse contracts (coin-based margin contracts). For example, the base currency of both forward and reverse contracts is BTC. For forward contracts, users only need to hold USDT to participate in contract trading, which is simpler and more convenient, very similar to spot trading. Forward contracts have linear returns, so they are also known as Liner Futures.

But for inverse futures, users need to hold bitcoin as margin to trade. In addition to the book profit or loss, the fluctuation of bitcoin prices against USDT will bring a certain gain or loss in margin value. Therefore the yield needs to be calculated by the inverse of the bid/ask price and the return will be non-linear. For derivatives, the degree to which a change in the underlying asset will affect the price of the derivative is known as convexity (also known as Gamma). Mathematically, convexity is the second-order derivative of the asset value with respect to the price of the underlying asset.


Image: BitMEX


The above chart shows the comparison of returns in the long (left chart) and short (right chart) cases. The red line indicates the forward contract, which has a linear return, while the blue line indicates the reverse contract, which has a non-linear return. You can see that for contracts going short, convexity makes the return better overall.

Arbitrage based on perpetual contracts
Due to the inefficiency of the crypto coin market, there is a certain basis difference between the contract price and the spot price, so there are arbitrage opportunities.
The first type of arbitrage is based on the convergence of basis. For example, assuming at a certain moment when the price of the bitcoin perpetual contract is $41,000 and the spot price is $40,000, arbitrageurs can buy 1 bitcoin in the spot market and sell 1 contract in the contract market. Arbitrageurs can liquidate their positions in both markets at the same time, earning a basis of $1,000 as the prices converge. Taking the convergence to $38,000 as an example, selling 1 bitcoin in the spot market will lose $2000, and closing the contract position will earn $3,000, -$2,000+$3,000=$1,000.

The second type of arbitrage is based on the funding fee. Suppose the funding rate is a positive 0.1% for a given time period, i.e. the long pays the short. It is possible to buy $10,000 of bitcoin in the spot market (long) and sell $10,000 worth of bitcoin contracts (short). By the time the funding rate is paid, the spot price of bitcoin has increased by 10%, while the contract price has also increased by 10%. Then the profit in the spot market is 10% and the loss in the contract market is (-10+0.1)%. As long as the funding rate is positive, going short in the contract market will earn the funding fee.

In addition, such arbitrage can erase the basis difference, thus making arbitrage opportunities disappear.

How to hedge with perpetual contracts
In the perpetual contract market, it is also possible to hedge, as in the futures market, to avoid losses arising from adverse price movements. Such hedging operations can be divided into two categories: long hedging to hedge the risk of price increases, and short hedging to hedge the risk of price decreases.

Let's take two examples to understand what hedging is:
Imagine the current bitcoin spot price and contract price are both 40,000 USDT. A miner will get 1 bitcoin in a month, and was worried that the price of the currency would fall sharply within a month, resulting in a loss. The miner wants to lock up the current high price, so he chose to short the perpetual contract worth 1 bitcoin in advance. One month later, the currency price plummeted to 30,000 USDT. One bitcoin produced by the miner was sold for 30,000 USDT in the spot market, but his contract earned 10,000 USDT. In this way, his total income is consistent with the price one month earlier, 40,000 USDT. This is what we call short hedging to avoid the risk of falling prices.
Another miner already holds 100 Bitcoins. The current price of bitcoin is 30,000 USDT. Now he has to sell 10 Bitcoins to pay for the costs (such as electricity bills), but he is worried that the price will spike within one month. So he chose to sell 10 bitcoins, paying the electricity bill, and at the same time, buy a long 10x leveraged contract with a margin value of 1 bitcoin in advance. One month later, the currency price soared to 40,000USDT, and the miner earned 10,000USDT*10 in the perpetual contract market, which just made up for the loss he sold bitcoin in advance. This is what we call long hedging to avoid the risk of rising prices.

To properly hedge risk, one needs to trade adversely in the spot and contract markets, and the total quantity of the commodity should be equal (including the quantity after leverage).

Conclusion
Nowadays, as perpetual contracts offer two direction trading, high leverage, and long-term holdings, it has become the most popular category of derivatives in the crypto market. According to TokenInsight data, in the first quarter of 2021, the perpetual contract volume of 51 crypto exchanges which provide the product reached 14.32 trillion dollars, surpassing the annual trading volume of cryptocurrency derivatives last year.

In order to facilitate our users, Gate.io also provides perpetual contracts for multiple coins.

Welcome to trade perpetual contracts in Gate.io. Transaction address:
https://www.gate.io/en/futures_trade/USDT/BTC_USDT


Author: Gate.io Researcher Edward. H

* The article only represents the researcher’s views and does not constitute any investment advice.
* Gate.io reserves all rights to this article. Reposting of the article will be permitted provided Gate.io is referenced. In all other cases, legal action will be taken due to copyright infringement.

Bagikan
gate logo
Credit Ranking
Complete Gate Post tasks to upgrade your rank