Perpetuals - The Crypto Derivates
All about perpetual contracts

Hello everyone…
Welcome back to another day of exploring Web 3 Engineering. It’s been a long since we have explored the defi world. Today let’s us getting into learning the famous crypto trading instrument that has been gaining volume recently and that is Perpetuals, popularly referred as Pers which are the derivatives on the cryptocurrencies.
What are Perps ?
Perpetuals or Perps are the derivate contracts that are usually traded in the crypto world. They work similar to the Futures Contracts on the traditional exchanges with a twist. Unlike the regular Futures contract, they don’t have an expiry date. Which means, a perps doesn’t expire and can be traded at any time in future once created.
How do they work ?
In order to understand the perpetuals, we need to understand the 6 distinct features of them. They are:
No Expiry - The perpetuals have no expiry date. Which means our positions remain active as long as we are able to pay the funding rate for it and we need to maintain required margin. If our account runs out of margin, the position will be closed and settled automatically by the exchange.
Funding Rate Mechanism -
To keep the price of a perpetual contract similar to its actual asset, exchanges maintain funding rate system.
Exchanges decide the funding cycle on their own. But in general, the funding cycle is 8 hours. And at the start of this cycle, traders are required to pay premium or receive discount depending on the difference between the contract price and the spot price.
If the contract price is higher than the spot price (contract is trading at premium), long contract holders are required to pay to the short holders.
If the contract price is less than the spot price (contract is trading at discount), short contract holders are required to pay to the long holders.
Leverage and Margin
Margin is the amount of the capital we are using to create positions.
Leverage is used to place a higher value contract order with little amount of money. For example, we can place a order of 1000USD with 100 USD margin using 10x leverage.
In perpetual trading, leverage has more impact than the leverage in the traditional future contract since the crypto exchanges provide leverage up to 40x. (some provide a significant of 100x leverage depending on the asset).
Long vs Short
You hold a long position when you expect the market price of asset goes higher. And you profit from it.
You hold a short position when you expect the market price of asset goes down.
Settlement and Liquidation
Unlike the traditional futures, perpetuals don’t have a predetermined expiry and settlement date.
Profits and losses are marked to market in real time and positions can be liquidated if your margin runs too low.
Market to Market Settlements
In the perpetuals world, exchanges typically settle the positions and FRM payouts at the end of their trading cycle (which is usually 00:00 UTC)
This is carried out to liquidate the positions which ran out of margin and also reflect the P&L of the user in real time possibly and constrain the risk of high price movements of the assets.
Margin balance is credited or debited with this P&L—so you must have enough margin to cover losses. MTM keeps your profit and loss current, preventing large carry-forward risks if prices move sharply overnight
Types of Perpetuals available
There are various types of perpetuals that are offered in the market. But we need to focus on the main 3 that are listed below.
Linear Perpetual Contracts - These are straight forward contracts on a pair and the P&L calculation is also linear in fashion. For BTC / USDT perpetuals, the BTC is the asset and USDT is the quote currency in which margin and P&L payouts are carried
Inverse Perpetual Contracts - These type of contracts are determined in terms of base assets rather than the quote assets. In simple words, for a BTC / USDT pair, the settlement and margin is taken in BTC and not USD. If the USD price of BTC is increasing, our profit in BTC decreases and vice versa
Quanto Perpetual Contracts - The contract’s P&L and margin are carried out in third currency which is neither base nor quote of the contract. For example, Margin and settlement being carried in ETH for the perps on BTC / USDT. This is most popular since exchanges accept USDC / USDT usually but carry out payments in the exchange release stable coins.
Trading
Since the perpetuals are not actual spot but derivates, it can only be traded using order matching. That means we have a seller and buyer for the trade and there are not DEX pools built so far. These order matching can take various forms that is specific to the exchange itself. The popular methodologies that I have seen so far are:
Order book market matching ( price time priority)
Auction based order matching
And also depending on the order flow, there are centralized and hybrid exchanges available in the market.
Fully centralized - Order placing, Settlement, Margin infusion and also order matching takes place through a centralized app. e.g., Binance Exchange
Hybrid - Order placing, position management and settlements takes place on blockchain where the actual order matching happens using off chain servers. e.g. dydx
With that, we have a basic understand on the working of the perpetual contracts. Comment down if you have any questions. Thank you



