Everything You Need to Know About DeFi Derivatives

CN
8 hours ago

This article will outline the basics of perpetual contracts, covering various aspects from basic execution (on-chain) to order books/price discovery, oracle, liquidation, fees, and more.

Written by: Diogenes Casares

Translated by: AididiaoJP, Foresight News

Since dYdX and GMX launched in April 2020 and 2021 respectively, the usage of DeFi derivatives platforms has grown exponentially, with HyperLiquid now challenging centralized exchanges in terms of trading volume and open contract volume. Despite being established later, its total value locked (TVL) has increased by 100 times. Currently, the total TVL of derivatives platforms and emerging prediction markets reaches $5.37 billion, with daily trading volumes in the hundreds of billions.

However, in-depth analysis of the microstructure of the DeFi market is relatively scarce, such as the synergy principles between liquidity supply mechanisms like GLP and DMM with perpetual contracts, the differences between DCLOB and (X)LP/"market maker" model exchanges, varying margin requirements, and interoperability issues. Existing reports are mostly written by non-traders or non-engineers, often lacking depth.

This article will outline the basics of perpetual contracts, covering various aspects from basic execution (on-chain) to order books/price discovery, oracle, liquidation, fees, and more. Finally, we will discuss the differences between the current DEX infrastructure and TradFi.

What are perpetual contracts?

Perpetual contracts allow traders to amplify their asset exposure through leverage. This means that when the price of BTC rises by 10%, users may profit by 30% or more, but if the price drops by 10%, losses will also be magnified proportionally. For example, with 3x leverage, profits and losses are magnified threefold.

Specifically, a perpetual contract is a derivative futures contract with no fixed expiration date. Unlike most American futures that settle monthly and require physical delivery (like crude oil), perpetual contracts maintain price anchoring through a funding rate mechanism. This mechanism determines whether longs or shorts need to pay interest (calculated based on nominal value, i.e., principal * leverage) based on the premium or discount of the perpetual contract price relative to the underlying asset. When the contract price is above the underlying, shorts will receive the funding rate, and vice versa. The static funding rate for such contracts generally hovers around an annualized 10.9%. Protocols like @ethena_labs and @ResolvLabs utilize this mechanism for basis trading: shorting in the perpetual market while collateralizing the underlying asset to achieve delta-neutral returns.

(Illustration of Ethena's delta-neutral trading) Delta-neutral traders and market makers are the main providers of liquidity in the perpetual market.

Trading Mechanism and Collateral

Perpetual contract trading primarily uses stablecoins as collateral. While assets like BTC and ETH can also be used as margin, different platforms have significantly varying standards for cross-margin management in spot markets (especially in DeFi), and for most traders, the rates for such collateral are usually higher than directly using stablecoins. This will be discussed in detail in the "Maintenance Margin and Liquidation" section.

Although perpetual contracts can amplify returns, high leverage also increases the risk of liquidation. As the most profitable financial product in the crypto space, competition for perpetual contracts in DeFi is becoming increasingly fierce.

Classification Logic of DeFi Perpetual Protocols

The core contradiction of DeFi perpetual protocols centers around three major functions: the relationship between liquidity acquisition, execution efficiency, and latency. Taking @avantisfi as an example, a low-latency trading system may negatively impact liquidity pools, as all trades in the protocol are betting against the protocol's own liquidity pool. If pricing deviates, fast-reacting professional traders may erode the protocol's profits through "toxic order flow."

Shifting from B-Booking (the protocol taking on all trades) to A-Booking (building a market) can eliminate systemic risks in liquidity pools but does not guarantee continuous liquidity supply. HyperLiquid's HLP has undergone this transformation: initially taking on all trades, it gradually introduced market makers to optimize pricing as trading volume increased.

In theory, off-chain order books can provide more efficient and cheaper trading, but if validators or order sorters act maliciously when processing order flow, it can still lead to execution failures. While these issues can be resolved, the solutions are not perfect and consume resources.

Liquidity Cold Start Dilemma

Participants in the Trading Market

First, each order varies in expected returns and risks. Traders wish to make directional bets on the underlying asset or the likelihood of an event in the prediction market. Market makers aim to profit by completing the cycle of buyers and sellers, collecting fees and managing positions (i.e., exposure to different assets at a given time). Lenders wish to provide leverage in the spot market while assuming minimal risk, prioritizing repayment in the capital structure.

Based on diverse risk preferences, one can roughly imagine three different tiers of participants, each with different risk-return ratios. Traders can achieve returns exceeding 3000% through directional bets but may also lose their entire position. Large market makers (if hedged properly) expect an annual return rate in the double digits in dollar terms, but poor risk management can still lead to losses. Lenders in the crypto space (expecting returns higher than U.S. Treasuries, currently around 5.3%, close to junk bond rates of about 7-8%) provide this leverage to traders or market makers to support their activities.

In the case of price volatility and liquidation, lenders take priority over market makers and traders, whose positions will be liquidated.

The True Role of Market Makers: Creating Liquidity vs. Acquiring Liquidity

Market makers do not profit by "betting against retail." Their core profit model is completing the buy-sell loop: for example, buying asset X at $9 and selling it at $10, profiting through small spreads and quantitative trading. Market makers need to dynamically manage position risk; if hedging fails, they may incur unrealized losses due to asset depreciation.

To incentivize liquidity, exchanges generally adopt a "maker-taker" fee model, charging liquidity takers to compensate market makers.

Traders essentially need and use market makers, as they typically complete orders set by market makers. Unlike market makers, traders primarily bet directly on the price movements of assets and hope for liquidity to open positions, being able to use leverage to amplify returns when trades are correct.

For example, if a trader is confident that BTC will rise by 30% and will not drop more than 10%, then using a perpetual contract with 5x leverage could yield a 150% return (after fees/funding rates), while spot trading would only yield 30%. The only difference is that if the trader is wrong, they face liquidation risk.

DEXs, as market platforms, face the classic "chicken and egg" problem: it is difficult to attract traders without market maker liquidity, and without trading volume, market makers are unwilling to settle. There are typically two solutions:

Liquidity Pool Model: Such as Ostium, early HyperLiquid's HLP, GMX, etc., where the protocol itself acts as the counterparty. However, in the long run, this will create a zero-sum game—profits for (X)LP must come from losses of traders.

Market Maker Protocol: Such as dYdX and Aevo, which adopt high-cost and dilutive cooperative agreements. Once incentives stop, liquidity may plummet (as seen with dYdX V3, where the basis sharply widened after stopping market maker support).

The two main methods to solve the "which came first, the chicken or the egg" problem first address the liquidity issue. One method resolves the inherently profit-driven liquidity market maker protocol, while the other effectively attracts users and establishes an inverse correlation between user profits and losses and liquidity provider profits and losses (see Figures 1 and 2). Neither of these models has completely escaped the initial model's constraints.

Figure 1, HLP Profit and Loss:

Figure 2, Net Profit and Loss of HyperLiquid Traders:

Figure 3, Composite Figure:

Essential Differences Between Perpetual Contracts and Spot

Spot trading can circulate freely after settlement, but perpetual contracts are essentially a continuous obligation relationship. There are significant differences in clearing standards, margin requirements, and price formation mechanisms across exchanges, and the clearing process is generally internalized, which is starkly different from traditional derivatives markets.

In traditional finance, order matching and clearing are separate: exchanges are responsible for matching, while central clearing parties (like DTCC) manage position health. In contrast, DeFi derivatives platforms typically bundle the two, forming non-standardized contracts that hinder interoperability development.

Price Discovery Mechanism Comparison

Price discovery is the process by which market participants and exchange mechanisms determine prices. Different exchanges have very different order management methods, which can affect price discovery and subsequent clearing. Some exchanges operate through a "liquidity pool" system, where LPs deposit assets into the pool to bet against traders.

The order book of an exchange is similar to the order matching layer of an AMM, where price discovery for perpetual contracts occurs, and it is also where buyers and sellers "agree" on prices. The order book is "constructed" by limit orders continuously set by users, market makers, and the liquidation engine, with pricing determined by total demand.

AMMs are automated, thus determining price discovery based on their pricing models, although an increasing number of systems that primarily source liquidity from AMM-based systems allow order books to form around AMM pricing.

Order books vary significantly in how they handle orders and the environment:

  • Central Limit Order Book (CLOB): Prices are formed through the continuous game of buying and selling limit orders. For example, the off-chain order book of dYdX V4 can eliminate gas fees, but validators may manipulate block sorting.
  • Automated Market Maker (AMM): For instance, GMX's GLP prices through preset curves, with profits entirely derived from traders' losses (via fees or liquidation). HyperLiquid innovatively combines both: allowing limit orders to coexist with AMM quotes, dynamically adjusting spreads through algorithms.

Examples of related projects:

CLOB Perpetual Contract Trading Example

Assuming Alice wants to go long on BTC with 1,000 USDC at 10x leverage, resulting in a nominal position size of 10,000 USD. Bob goes long on BTC, and Alice pays a taker/platform fee of 5 basis points (0.05%) to enter at a price of 50,000 USDC / 1 BTC. Note that this does not include the bid-ask spread, as this pricing does not represent an actual loss. Assuming Alice is using 10x leverage, she will actually incur a slippage of 50 basis points (0.5%) (0.05 x 10). This amounts to 5 USD, so Alice's effective margin is now 995 USD. Intuitively, if the price drops by 10%, Alice will be liquidated; if the price rises by 10%, Alice will achieve a 100% return on her 995 USD (10% * 10). However, in reality, Alice will be liquidated when the price drops by around 7-8%. This is because the liquidation layer must ensure that Alice can repay Bob at any time; otherwise, the position will be unable to meet its obligations, and Bob, despite having traded and taken on risk, cannot profit. If the liquidation engine happens to liquidate Alice when her position drops by 10%, it is likely that the full value of the position cannot be recovered, meaning Bob can still profit. Conversely, the exchange has a maintenance margin, which varies by exchange but typically combines a basic margin (e.g., 2% of the principal) and another multiplier based on leverage, usually in a progressive scale to prevent high-leverage positions from causing bad debts.

In this system, Bob and Alice find each other through the CLOB, which simply matches users willing to buy and sell an asset. In this case, Bob and Alice can place orders without paying trading fees, indicating that the order was placed through an off-chain order book, similar to how IntentX and dYdX operate. If Bob and Alice need to adjust their orders on-chain, they will also need to pay gas fees and compete for block space.

Here, Bob and Alice's orders have been fulfilled, even though they do not know each other and are obligated to each other. To fulfill these commitments and avoid bad debts/system health issues, the liquidation layer has maintenance margin and liquidation procedures in place.

Evolution of the Liquidation Mechanism

When an account's margin falls below the maintenance threshold, the liquidation engine will close positions at a discount price. Different platforms handle this in various ways:

  • dYdX Model: Liquidated positions enter the public order book, maximizing recovery rates through competition.
  • GLP/HLP Model: Protocol affiliates take over at a fixed discount, sacrificing efficiency for loyal liquidity.

In extreme cases, when the insurance fund is insufficient, loss socialization may be triggered, forcing profitable positions to be reduced to cover system deficits. Although this practice has gradually been replaced by capital reserves, DeFi platforms still face challenges due to the overlap of liquidity incentives and insurance funds.

Complexity of Cross-Margin Systems

Full margin can be roughly divided into perpetual full margin and spot full margin. Perpetual full margin refers to unrealized profits and losses (PnL) of different positions being able to offset each other. For example, if the total deposit is 1,000 USD, with one position losing 1,100 USD and another position gaining 1,200 USD, these two positions can offset each other, and you will not be liquidated (provided your maintenance margin is safe). Perpetual full margin is currently widely implemented and used by perpetual platforms. The only major consideration is to adjust based on liquidity to avoid scenarios like the DyDx Yearn attack, where manipulating token prices allows the manipulative trader to withdraw collateral and then sell the spot back to zero, causing losses and impacting the platform's insurance fund when the marked price adjusts.

The second type of cross-margin is spot cross-margin. Exchanges allow positions to settle with margin but not with other assets. The most obvious example is Ethena. Ethena uses BTC and ETH/LSD as collateral to short BTC/ETH, effectively creating USDe through these negatively correlated positions, which is very beneficial for the exchange. If someone shorts 1 BTC and has 1 BTC as collateral, the perpetual contract must decouple by more than 90% for this trade to potentially create bad debt. Using spot assets that differ from the settlement asset for cross-margining perpetual contract positions is relatively complex because, theoretically, negatively correlated positions (which require funding payments) are not easily liquidated. If there are large withdrawals of the settlement asset, the exchange's health may theoretically be affected. Most exchanges use unified trading accounts to address this issue for larger accounts, allowing deposits of non-yielding assets and functionally lending out most of these assets, profiting not only from existing trading fees but also from the fluctuations of these assets, although larger institutions and traders may be able to deposit yielding assets as collateral.

In DeFi, the issue of spot cross-margin is mainly addressed through the UTA model (positions offsetting each other) or lending models. The lending model is functionally simpler because it allows the lending positions to be separated from the margin of perpetual contracts, effectively creating a lending system that is closely integrated with an independent risk engine (rather than directly integrated). For example, in this system, you can provide 1 BTC as collateral for shorting BTC and then borrow USDC as margin for shorting. The exchange system has USDC to meet demand, but this system is inefficient for traders, especially for those like Ethena who are trying to engage in delta-neutral trading, as the borrowed amount will reduce the funding rate for shorting on Ethena.

  • Perpetual Cross-Margin: Allows profits and losses of different positions to offset each other (e.g., in a 1,000 USD deposit, a 1,100 USD loss can balance with a 1,200 USD gain).
  • Spot Cross-Margin: For example, Ethena uses BTC/ETH as collateral to short similar assets, needing to manage the risk of settlement asset (like USDC) runs.

The current DeFi options market is lagging due to high margin requirements and a lack of cross-collateralization features, with CeFi platforms like Deribit still dominating the field.

Currently, unlike centralized exchanges, there is not much lending support for UTA-style cross-margin. Although the lending positions of USDe/sUSDe (essentially behind-the-scenes operations) are supported by delta-neutral trading, the situation remains the same. CME and Deribit operate using risk matrices, while the margin requirements of DeFi protocols are relatively static and non-dynamic. This means that options must be fully covered, while most major short-term options only require 50% of the nominal value to be covered in 99% of cases. If you are a trader on dYdX or HyperLiquid and have achieved an annualized return of over 80% based on delta-neutral financing strategies, you still cannot borrow at a rate of 10-20% to continue this strategy, even if you hold negatively correlated positions and are fully hedged. The liquidation layer of the exchange must adapt to these issues to remain competitive.

Aevo Cross-Collateralization Model

In Aevo's model, there is a centralized participant that sells your collateral to pay for profits and losses and funding rates. This situation occurs when health risk requirements arise at the exchange or when positions are liquidated. The system is more efficient because it still settles in USDC but allows positions collateralized in other currencies to be "credited" in USDC within the system. When funding rates and profits and losses must be paid, these positions will be sold to meet the obligation of USDC. This transfers the responsibility of these positions to Aevo's liquidation system.

Drift Collateral Model

Drift's lending product supports multi-asset cross-collateralization functionality for perpetual contract exchanges. All perpetual contract trades on Drift are settled in USDC. Whenever assets other than SUDC are used as trading collateral, USDC is automatically borrowed until the trade is completed. Additionally, users can lend and borrow assets on Drift according to their specific use cases, just like using other lending protocols. Depositors (lenders) can earn returns on their assets. Drift's model allows you to borrow USDC using Solana and other assets (depending on LTV) as collateral, with interest rates determined by the interest rate model, similar to Aave. Since all trades are still settled in USDC, this brings deeper liquidity and more convenient settlement. However, this effectively means there are two potential debtors: the spot lender and the platform, which creates inherent conflicts of interest.

In-depth Exploration of the GLP Mechanism

Although the GLP model has become common in crypto derivatives protocols, the mechanism behind GLP is not fully understood by GMX itself or most market participants.

Unlike the liquidation layers of most exchanges that exist between users, in the GLP model, the liquidation layer and liquidity provision are managed by the exchange through GLP. GLP is essentially a capital pool, similar to an AMM. Unlike trades filled by traders with spreads set by market makers, trades are filled by GLP, with slippage and most fees attributed to GLP rather than to market makers as in the maker-taker model.

Traders on GMX must pay borrowing fees in addition to normal fees. This means that under the (X)LP model, users may be forced to pay fees for both long and short positions simultaneously, and during periods of high volatility, traders may receive a funding rate of 7% on net value, while short sellers may pay 14% on net value, whereas typically funding rates are relatively stable; if you go long and the funding rate is positive, you pay X%, and if negative, you receive X%. This allows the protocol to earn from the spread between payments to traders and payments received from traders, while GLP does not incur such borrowing costs, thus giving it a fundamental advantage in long-term liquidity provision.

GLP and GMX are severely exploited due to a lack of proper risk management. Dishonest traders like Avi Eisenberg manipulate the spot prices of assets like Avax to alter the vAMM on GMX, thereby closing positions at a huge profit at the expense of GLP and its depositors.

Price Discovery - CLOB vs. AMM

Price discovery describes the process of asset pricing, with auctions being an example of price discovery. In an auction, the final price reflects the willingness of the group to purchase a given quantity at a given price. For example, if there are five buyers and three items, with two buyers wanting to buy three times at $4, two items at $5, and one item at $6, the final prices for these three items would be $6, $5, and $5, respectively. This is intuitive. The order book operates similarly, but it is constantly changing and has no end. People continuously update the prices they are willing to pay for an asset and the returns they expect to receive for giving up that asset. Market makers place low buy orders and high sell orders, hoping to profit from the trades of users. In this model, market makers and traders are responsible for price discovery, which is the process of price formation.

Automated Market Makers (AMM) replace this system by creating price curves. Unlike in the past where everyone declared the price they were willing to pay, AMM orders are functionally "batch" orders, and liquidity is also "batch" based. There are primarily two modes of AMM: dynamic AMM and non-dynamic AMM. Non-dynamic AMM is typically used for price discovery. Memecoins are mainly launched in the form of non-dynamic price AMMs, which usually follow the pricing curve of X * Y = K, using the ratio of two tokens in a standard AMM to determine the price and the quantity of tokens to determine depth.

Dynamic AMMs are suitable for highly correlated assets. For example, Curve AMM or Uniswap V3 AMM, where Curve sets the price, while Uniswap V3 allows liquidity providers to choose their own prices.

While there is a broad understanding of the use of AMMs in the spot market, there is less understanding of their use in the derivatives market.

Although people understand at a macro level that systems like GMX's GLP provide liquidity for traders on the platform, they may not realize that the only way GLP profits is by directly harming the interests of users, either through fees or primarily through liquidation. Despite this zero-sum game environment, AMMs can provide extremely deep liquidity in the cryptocurrency derivatives space, especially for emerging projects. HyperLiquid is an interesting and obvious example that successfully merges these two price discovery systems. Users can still place limit orders on the order book, but it also functions as an automated market maker, allowing buy (long) and sell (short) orders to be placed on the same order book, typically choosing the opposite side of the order book. This automated system is highly dynamic, managed by former high-frequency traders who charge all liquidation and platform fees. Its functionality also serves as the platform's insurance fund. While HLP is a type of AMM, it differs from "dynamic" and non-dynamic AMMs. It is an automated model that can (presumably) adjust based on market volatility, adjusting spreads according to the volatility of other markets, using data from other markets to influence market-making decisions, etc. This is a new type of AMM that stands out among its peers due to its success on HyperLiquid and its closed-source nature.

Comparison of DeFi and Traditional Market Structures

Traditional finance has developed a highly specialized hierarchy over 126 years: retail platforms (like Robinhood) → market makers → exchanges (like CME) → clearing institutions (like DTCC). In contrast, DeFi protocols often attempt to cover multiple layers simultaneously, which is a reason for inefficiency.

However, DeFi has two major advantages:

  • Native: Can quickly launch crypto asset derivatives.
  • Permissionless: Provides access channels for regulated regions (like the U.S., Brazil) and establishes a fair settlement layer across borders.

As technologies like re-staking enhance infrastructure security, DeFi is poised to become the ultimate settlement network for global derivatives.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

ad
Bitget: 注册返10%, 赢6200USDT大礼包
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink