paint-brush
Perpetual Swaps - Origins in CEX, with a Future in DeFi!by@mickeymaler
1,991 reads
1,991 reads

Perpetual Swaps - Origins in CEX, with a Future in DeFi!

by Mickey MalerAugust 26th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This article unfolds the history of perpetual futures contracts and their first appearance on big centralized trading platforms such as BitMex. From there, we look at the scalable Bitcoin DeFi version that Sovryn offers for users who prefer privacy and asset control over the comfort provided by centralized platforms.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Perpetual Swaps - Origins in CEX, with a Future in DeFi!
Mickey Maler HackerNoon profile picture


Introduction to the world of Perpetual Contracts


Perpetual Swaps, the single biggest primitive still missing from the Bitcoin DeFi puzzle, are coming to Bitcoin-based DeFi thanks to Sovryn. Sovryn spotted the gap and reacted accordingly. The original idea to just cherry-pick what is working on Ethereum and take it on the Bitcoin side chain was not an option here. They decided to integrate the RSK 2-way-peg that brings Bitcoin to the RSK network, the Bitcoin side-chain based on which Sovryn perpetual swaps operate.


This article unfolds the history of perpetual futures contracts and their first appearance on big centralized trading platforms such as BitMex. From there, we look at the scalable Bitcoin DeFi version that Sovryn offers for users who prefer privacy and asset control over the comfort provided by centralized platforms.

What are they?

In finance, a perpetual futures contract, also known as a perpetual swap, is an agreement to non-optionally buy or short a contract that represents an asset and settle the trade in the near or more distant future. Perpetual futures are cash-settled and differ from regular futures in that they lack a pre-specified delivery date and can thus be held indefinitely without the need to roll over contracts as they approach expiration. Payments are periodically exchanged between holders of the two sides of the contracts, long and short, with the direction and magnitude of the settlement based on the difference between the contract price and that of the underlying asset, as well as, if applicable, the difference in leverage between the two sides.


Economist Robert Shiller first proposed perpetual futures in 1992 to enable derivatives markets for illiquid assets. However, perpetual futures markets have only developed for cryptocurrencies following their introduction in 2016 by BitMEX.


In July 2022, perpetual futures entered the realm of Bitcoin DeFi On Sovryn. Sovryn is a platform built on RSK, a Bitcoin EVM-compatible side-chain. Perpetual futures added a significant new feature to the most feature-rich DeFi platform for Bitcoin.

So, what are they?

A perpetual swap is somewhat similar to a futures contract in that it allows traders to speculate on the future price movements of cryptocurrencies. The core difference is that perpetual swaps do not have expiration dates unlike a typical futures contract.


Like other types of derivatives, including futures and options, perpetual swaps provide a means to speculate on the value of assets while the contract is held.


  • Derivatives are financial instruments that derive their value from an underlying asset.


For perpetual swaps, the idea is that the buyer is entering a long exposure to an asset, and the seller is entering a short exposure to the asset. The word Perpetual implies the contract has no expiration, unlike a futures contract which has a predetermined date at which the derivative settles. A perpetual swap seeks to maintain the exposure for the buyer and seller perpetually until they exit the contract.

How are they used?

They can be traded in different ways based on how they are structured.

It is a way for participants in a market to come together and exchange risk.

How can the perpetual contract successfully track the underlying index price?

A futures contract specifies an index at which the derivative will settle at expiration, see, for example [CME Bitcoin Futures Specification]. If, shortly before expiry, the futures price is above the spot price, people can buy the spot at a low price and sell the futures contract at a high price. At expiration, the trader has to deliver the underlying, which they bought at a low price. This is an arbitrage profit (which works similarly if the futures price is below spot and if the futures contract is delivered in cash and not in kind).

Because many market participants make this trade, the futures price will move towards the spot at expiry. Perpetual swaps, however, have no expiry, and another incentive is needed for buyers and sellers for the price to converge towards spot. If most market participants are long, empirically, prices move above spot. For the perpetual futures price to converge towards spot, we would want to incentivize sellers to enter the market. For this incentivization, perpetual futures featurefunding payments. If people are bullish, the long traders pay interest to the short, which is defined as a positive funding payment. Payments occur at different frequencies depending on the trading venue—for example, every eight hours for BitMEX, every hour for FTX, and continuously for Terabit. This funding payment creates an arbitrage opportunity for the seller because the seller can come in and short these perpetuals and buy the spot. Now they have essentially generated a crypto dollar since their position is no longer dependent on the price moves of the underlying and hence they locked in the price in terms of dollars and are collecting interest while holding the contract. If traders collect an interest rate that is attractive to them, then they are happy to be in that position; if not, they will unwind.


That is one reason why perpetual swaps are so interesting; you can enter the position and know that your value is locked in.


In the case of a futures contract, you know that the price will converge to the index price at expiry, whereas in the case of a perpetual futures contract, you don't know that the price will converge to the index at a certain point in time.


The price is driven by the ratio between longs and shorts. When there are many more shorts than longs, shorts must pay a fee to longs based on the price discrepancy between the spot and contract price.If there are more longs than shorts, then longs pay shorts.

Summary so far

If a futures contract is on the bitcoin price, traders don't trade bitcoin itself but use its value to define the trade. This is called cash settlement. Futures contracts are derivatives, which means their market prices are derived from the price of an underlying instrument. So unlike traditional markets, you don't trade assets, only contracts that represent them. When a trade is open, the trader obtains an unrealized profit that compounds if the trade goes in the desired direction. In that case, the Maintenance Margin level of this trade is positive, and the trader can stay in the trade as long as desired. In the opposite case, when trade does not play out well for you, the Maintenance level decreases, and the trader is asked to increase his Maintenance margin to maintain the position and protect it against liquidation. Liquidation is the forced closure of a position in which the trader's position is liquidated as the penalty for an unsuccessful market forecast and trading in the opposite position.

Perpetual swaps in DeFi - Sovryn

Till now, you have learned about perpetual swaps, also known as perpetual futures on centralized exchanges. Let's look at how this product behaves on Sovryn, the DeFi platform, which utilizes Automated Market Makers instead of the classical order-book approach.


What do Sovryn perp swaps allow?

Sovryn perp swaps allow you to go long or short with respect to any defined trading pair while using Bitcoin as collateral. The first trading pair is USDT/BTC, but the future potential goes beyond that. Sovryn plans to add more assets, such as various stock shares backed by Bitcoin.


You can take on the risks and rewards of the spot price movement without actually buying or selling the asset. You cover the risk by supplying margin assets that cover any losses you experience if the price moves against your position. Sovryn perpetual futures are similar to traditional futures contracts but without any expiration date.

What makes Sovryn Perps different?

Sovryn perpetual futures use a different mechanism to track the spot price. When market pressure creates more long demand than short demand at the spot price, longs pay a funding rate to shorts for the privilege of holding the long position at (or near) the spot price. If shorts outweigh longs, shorts pay a funding rate to longs. Like other derivatives, including futures and options, perpetual swaps provide a means to speculate on the value of assets while the contract is held and managed.


Then, Sovryn employs an Automated Market Maker (AMM) for fully decentralized perpetual futures contracts with the BTC/USD pair. Perpetuals with the same collateral currency can share a liquidity pool, leading to a capital-efficient setup. Liquidity is provided initially by protocol governance and is then protocol owned. External liquidity providers can participate in the AMM profit and loss but don't impact prices and face no impermanent loss. The AMM accepts perpetuals collateralized in any token and hence any type of synthetic assets that has an oracle-based index can be added as a perpetual as long as the model assumptions adequately represent the asset characteristics.


The AMM pricing approach is based on risk-neutral valuation, which differs from the current

DeFi implementations.


  • Sovryn perpetual swaps work on the above-defined principle when using the Automated Market Maker approach instead of classical order books.


  • Sovryn, because it is built on the RSK Bitcoin side-chain, uses BTC for the perpetual swaps trading.


What challenges is Sovryn currently working on to enhance the user experience?

  • Enhance UX - Simplified, more polished version
  • Better TXs speed - Utilizing The Graphtechnologies for faster indexing


Perps are currently introduced as a Labs product on the Sovryn platform, using the BSC blockchain to avoid the current limitations on the RSK network that affect the required functionality. The end goal for Sovryn Perp swaps is to migrate to ZK-rollups on RSK once available.

Why are Automated Market Makers (AMM) so popular these days, and what benefits do they bring against the use of traditional order books?

One reason why AMMs, as opposed to traditional order-book systems, became so popular in DeFi is that they require much less blockchain interactions to make a trade happen. That is, in traditional financial markets, market makers post their limit orders. When new information arrives or trades happen, the market makers cancel and replace open orders. In contrast, with AMMs the role of the market maker is taken on by passive liquidity providers. If a trader wants to swap tokens, this can be done cheaply with one transaction on the blockchain—no limit orders have to be replaced by market makers.

Advantages of AMMs Perpetual Swaps

With AMMs no active market makers are needed to provide a good trading experience. On top of that, unlike traditional constant-product AMMs, there are AMMs for perpetuals that do not suffer from the impermanent loss problem. So an AMM is a viable solution for Perpetuals trading in the presence of L2 solutions too. It is possible that some hybrid model will evolve that allows for market makers and order matching per the traditional model, which is then combined with an AMM that fills liquidity gaps.

Where can we try this out?

Other useful links about Sovryn

Documentation