Earn Underwater NFTs on Orderly & WOOFi campaign!
GET STARTED
Check your $ORDER allocation
CHECK NOW
Earn Orderly Merits to boost your share of the airdrop!
LEARN MORE
Aug 10, 2023
Product
Orderly Network: Powering the Future of DeFi with Perpetual Futures
by Orderly Network
learn-about-perps-trading-on-orderly-network

In the fast-paced world of Decentralized Finance (DeFi), developers need the right tools to really make a difference. That’s where Orderly Network steps in. We’re all about giving those developers what they need to build game-changing apps. One big way we’re doing this? With our Perpetual Contracts, or Perps, that are set to take DeFi trading to new heights.

### TL;DR

  • Highly-Efficient Off-Chain Oracle: Orderly ensures high-frequency, accurate pricing via price feeds from multiple centralized exchanges, with plans to incorporate decentralized oracles.
  • Oracle Improvement: Orderly’s unique blend of off-chain efficiency and upcoming on-chain solutions mitigates common oracle issues, reducing toxic arbitrage risks.
  • Transparency and Security: Orderly documents all transactions on-chain, eliminating the need for blind trust and promoting transparency.
  • Revolutionizing Liquidations: Orderly allows any account holder to serve as a liquidator, further decentralizing the process.
  • Enhanced Scalability: Orderly supports any pair with high open interest, safeguarding liquidity providers and boosting trading potential.

Understanding Perpetual Contracts: Key Differences and Advantages

Perpetual futures (Perps) are essentially contracts between two counterparties, where the long side is obliged to pay an interim cash flow called the ‘funding rate’ to the short side. The short side, in turn, rewards the long side based on the timing of the futures price’s entry and exit.

Perps have distinct advantages over traditional spot trading:

  • Bidirectional Trading: Unlike the one-way profit mechanism of the spot market (where you profit only from price appreciation), Perps allow traders to make profits from price fluctuations in either direction.
  • Leverage: Perps offer greater capital efficiency in trading. For instance, if the price of BTC stands at 30,000 USDC, you can open a position equivalent to 1 BTC with only 3,000 USDC (using 10x leverage) as opposed to paying the full amount in a spot market.
  • Enhanced Liquidity: The futures market volume generally outperforms that of spot trading, meaning you can access deeper liquidity and trade with minimal price impact.

Orderly Network provides USDC-based Perpetual Futures contracts, quoted and settled in USDC.

We currently support a cross-margin mode, meaning the USDC collateral you deposit is used across all open positions to calculate the margin ratio.

Initially, we’re rolling out leverages of 1x, 2x, 3x, 4x, 5x, and 10x. Additionally, we permit only one-sided positions, i.e., you can’t hold both long and short positions for a single Perpetual Futures contract.

Why Offer Perpetual Futures?

Perps have already proven market share. They occupy 75% of all crypto trading volume. DEXes have now done over $240 billion in trading volume, and generated over $280 million in fees for protocols. It is a product that you know will be around, it is a bigger risk to not offer perps.

learning-about-perps-trading-on-orderly

Orderly’s PerpMaster SDK

Unlock the power of rapid deployment with the Orderly PerpMaster SDK. Our SDK offers builders a straightforward path to introduce perpetual futures into their DEXes. Leveraging our white-labeled solutions, you can add advanced trading options to your platform seamlessly and efficiently.

Why DEXes Choose Orderly Perps?

Leverage Orderly’s Off-Chain Oracle for Reliable Market Data At the heart of Orderly Perps is our efficient off-chain oracle, which accumulates price feeds from numerous centralized exchanges for high-frequency, precise pricing. By ensuring reliable market data and protecting against market manipulation, we equip builders with a robust foundation for their DApps.

By utilizing several CEX price feeds, we can avoid market manipulations whereby a bad character can manipulate market prices on one CEX particularly during periods of low liquidity.

This is something that happens all too often on protocols using inefficient price feeds.

The price mechanism for Perpetual Futures contracts on Orderly Network involves three key prices: Index Price, Mark Price, and Last Price.

Index Price: The Index Price is the volume-weighted average of the underlying asset prices across major spot exchanges. To prevent market manipulation or the impacts of exchange outages, we cap/floor the price deviation from the median at 5%. If multiple sources show more than 5% deviation, we use the median. If a source is unresponsive for over 10 seconds, it is excluded from the Index Price calculation.

Mark Price: The Mark Price is our best estimate of a Perpetual Futures contract value, designed to prevent unwarranted liquidations due to market manipulation.

We calculate it in two steps:

First, we take three different pieces of information and find the Median Price. Just think of this as finding the middle ground between three numbers. Then, we put a limit (or a “cap”) on how much the Mark Price can differ from the Index Price. The Index Price is like the average price of an asset across major exchanges. This cap depends on something we call a Factor, and it also involves looking at Cap/Floor funding. The Factor changes depending on which Perpetual Futures contract (or “Perp Market”) we’re looking at. For Bitcoin (BTC) and Ethereum (ETH), we don’t let the Mark Price go more than 3% above or below the Index Price. For NEAR, we’re a little more lenient, with a limit of 5.25%

Last Price: The Last Price is simply the most recent traded price of a Perpetual Futures contract.

Looking ahead, we plan to augment this off-chain efficiency with the incorporation of decentralized oracles, mitigating issues often associated with fully decentralized oracles like toxic arbitrage. This synergistic approach to pricing data offers a dependable and resilient foundation for your DApps.

Ensuring Trust with Full Transparency

Transparency stands as a cornerstone of the DeFi ethos, and Orderly embodies this fully. Every transaction, from trades and settlements to liquidations, is posted on-chain. This guarantees full transparency and easy verification, thus fortifying the trust your users place in your DApps.

We have also implemented limits for Orders to ensure fair and secure trading

Price Range: Think of this as the “safe zone” for setting the price of your buy and sell orders. If you’re buying, your order price can’t be more than the current Mark Price (akin to the ‘fair’ price) times (1 + Price Range).

On the flip side, if you’re selling, your order price needs to be at least the Mark Price times (1 — Price Range). Right now, the Price Range is set at 3% for everything. But if the market goes crazy and prices start jumping all over the place, some parts of market orders might be filled only up to these limits. And if you’ve got open limit orders that end up going outside the “safe zone”, we’ll have to cancel them. In really extreme cases, we might have to change the Price Range.

Price Scope: This rule is all about how much lower or higher than the Mark Price your buy or sell limit order can be. If you’re buying, your order price shouldn’t be lower than the Mark Price times (1 — Price Scope). If you’re selling, your order price can’t be higher than the Mark Price times (1 + Price Scope). Right now, the Price Scope is 40% for everything.

By imposing these price limits, Orderly Network aims to ensure the robustness and reliability of our trading platform and protect our users from market manipulations.

Rethinking Liquidations for a More Equitable DeFi Space

In a bid to democratize finance, Orderly introduces a fresh approach to liquidations. Unlike platforms where liquidations are centralized, Orderly permits any account holder to serve as a liquidator. This innovative measure promotes a more equitable DeFi environment, further instilling trust and offering your DApps a competitive edge.

Scalability: The Key to Unlocking Your DApps’ Potential

Scalability is essential for the longevity and success of any DeFi application. Orderly accommodates pairs with high open interest, thereby bypassing the limitations of platforms with a fixed open interest cap. This scalability protects liquidity providers from substantial losses while significantly boosting the trading potential of your DApps.

Orderly has a unique way of making sure that the price of a futures contract (the ‘Futures Price’) stays close to the actual price of the asset it’s based on (the ‘Index Price’). This method involves two parts: the ‘Premium’ and the ‘Interest Rate’.

The ‘Premium’ is basically the difference between the Futures Price and the Index Price. It’s calculated every 15 seconds, not just based on the highest bid (offer to buy) and lowest ask (offer to sell), but considering the average fill prices for both selling and buying orders, which are represented by the ‘Impact Bid Price’ and ‘Impact Ask Price’ respectively.

The fancy name for this calculation is ‘Impact Margin Notional’, and it’s based on the amount you could trade with $1,000 of collateral, depending on the maximum leverage of the specific market. For example, in the NEAR-USDC market, the leverage is 10x, which means you could trade up to $10,000 with a $1,000 collateral.

The ‘Interest Rate’ is simpler. It’s fixed at 0.01% for all markets.

The next step is to take the average of all the Premium values collected in an 8-hour period (there are 1,920 of these values because the Premium is calculated every 15 seconds). This ‘Average Premium’ is then used to calculate the ‘Funding Rate’ using a special equation called the ‘Funding Function’. This function has three parts, and it’s designed to respond faster when prices are changing a lot.

Finally, the ‘Interest Rate’ is added to the ‘Funding Function’ to get the ‘Funding Rate’. But the Funding Rate can’t go above or below certain limits, which are different for each market (0.3% for BTC, 0.375% for ETH, and 0.75% for NEAR).

Every 8 hours, a ‘Funding Fee’ is calculated for every position on a Perpetual Futures contract based on the ‘Funding Rate’. This fee is essentially a payment that goes from traders who are holding long positions to those holding short positions (or vice versa), and it’s settled when a ‘PNL settlement’ is called on the account.

Tap into our Robust Liquidity Layer and Network of Market Makers

Orderly’s Perps don’t just offer advanced trading features. Our liquidity layer ensures your DApps can operate smoothly even in high-demand situations. Furthermore, our vast network of market makers offers competitive spreads and deep liquidity, providing a conducive environment for your DApps to thrive.

In addition to deep liquidity we have and insurance fund and ADL (Auto-Deleveraging)

Orderly’s Insurance Fund and Auto-Deleveraging (ADL) mechanisms work together to prevent insolvency and protect users in the event of market volatility.

The Insurance Fund acts as a safety net for traders, stepping in to cover debt and take over positions when an account’s collateral value becomes negative. Typically, it grows by collecting a portion of liquidation fees from sufficiently margined accounts. In extreme market conditions, when positions may not be liquidated promptly, causing traders to go bankrupt, the fund covers those losses.

In certain cases, when an account’s margin ratio can’t cover the minimum liquidator fee, all positions and remaining balance are transferred to the Insurance Fund. Liquidators can then claim these positions at a slight discount.

The Insurance Fund operates differently from a standard account, as it does not share the same margin requirements.

In rare cases, if liquidators haven’t claimed positions from the Insurance Fund and its margin ratio drops below the minimum threshold, Auto-Deleveraging (ADL) kicks in.

This process targets the top traders with the most profits and leverage, gradually offsetting the Insurance Fund’s positions in each perpetual market. This helps to maintain the overall health and stability of the Orderly trading environment.

Uncompromising Security for Your DApps

Security is paramount in the DeFi space. Orderly is architected with robust security measures to guard against potential threats, ensuring your DApps function safely and reliably. Furthermore, our commitment to security is proven by stringent audits performed by esteemed cybersecurity firms. We’ve been vetted by Halborn, ethical blockchain hackers recognized for their excellence, and other industry-leading security audit companies. Our audit details can be reviewed here https://docs.orderly.network/welcome-to-orderly/security ]. Rest assured, with Orderly, you’re building on a foundation of verified security.

Through Orderly Network’s Perpetual Contracts, we’re providing DeFi builders with a path to influence the future of DeFi trading. We’re excited to see more builders harness the power of our Perps, and together, we can steer the course of the DeFi landscape towards greater innovation and inclusivity. With Orderly, the potential of your DApps is limitless.

For a deeper exploration into the technical aspects of Orderly Network’s Perpetual Contracts, we invite you to peruse our official documentation. Gain a comprehensive understanding of our cutting-edge tools and how they can empower you in the realm of DeFi. Begin your deep dive here: Orderly Network’s Official Documentation. https://docs.orderly.network/welcome-to-orderly/what-is-orderly-network

All systems operational.
Developers
Traders
Ecosystem
About
Legal
© 2024 Orderly Network.