
Everything You Need to Know About DeFi Derivatives
TechFlow Selected TechFlow Selected

Everything You Need to Know About DeFi Derivatives
This article will outline the basics of perpetual contracts.
Author: Diogenes Casares
Translation: AididiaoJP, Foresight News
Since dYdX and GMX launched in April 2020 and 2021 respectively, usage of DeFi derivatives platforms has grown exponentially. Today, HyperLiquid is challenging centralized exchanges in terms of trading volume and open interest. Despite being founded later, HyperLiquid’s total value locked (TVL) has increased 100-fold. The combined TVL of derivatives platforms and emerging prediction markets now stands at $5.37 billion, with daily trading volumes reaching tens of billions of dollars.
However, there remains a notable lack of in-depth analysis on the market microstructure of DeFi—topics such as how GLP and DMM-style liquidity provision mechanisms interact with perpetual contracts, differences between DCLOB and (X)LP/"market maker" exchange models, variations in margin requirements, and interoperability issues. Most existing reports are written by non-traders or non-engineers and tend to remain superficial.
This article outlines the fundamentals of perpetual contracts, covering everything from basic execution (on-chain) to order books/price discovery, oracles, liquidations, fees, and more. Finally, we will examine key differences between current DEX infrastructure and traditional finance (TradFi).
What Are Perpetual Contracts?
Perpetual contracts allow traders to amplify their exposure to assets using leverage. This means that when BTC rises 10%, a user could gain 30% or more; conversely, if the price drops 10%, losses are similarly magnified. For example, under 3x leverage, both gains and losses are tripled.

Specifically, perpetual contracts are derivative futures without fixed expiration dates. Unlike most American-style futures, which settle monthly and often require physical delivery (e.g., crude oil), perpetuals use a funding rate mechanism to keep prices anchored to the underlying asset. Depending on whether the perpetual's price trades at a premium or discount relative to the spot price, longs or shorts pay interest calculated on notional value (principal × leverage). When the contract trades above the index price, shorts receive funding; otherwise, longs do. Static funding rates typically hover around an annualized 10.9%. Protocols like @ethena_labs and @ResolvLabs exploit this for basis trading: by collateralizing the underlying asset while shorting it in the perpetual market, they achieve delta-neutral yields.

(Illustration of Ethena’s delta-neutral trade) Delta-neutral traders and market makers are primary liquidity providers in perpetual markets
Trading Mechanisms and Collateral
Stablecoins are primarily used as collateral in perpetual trading. While assets like BTC and ETH can also serve as margin, standards for cross-margining against spot holdings vary significantly across platforms—especially within DeFi—and for most traders, the cost of using these assets often exceeds that of directly using stablecoins. We'll explore this further in the section on “Maintenance Margin and Liquidation.”
While perpetuals offer amplified returns, high leverage also increases the risk of liquidation. As one of the most profitable financial products in crypto, competition among DeFi perpetual protocols is intensifying.

Classification Logic of DeFi Perpetual Protocols
The core tension in DeFi perpetual protocols revolves around three interrelated functions: liquidity acquisition, execution efficiency, and latency. Take @avantisfi as an example: low-latency trading systems may negatively impact liquidity pools because all trades are effectively against the protocol’s own pool. If pricing diverges even slightly, professional traders with fast reaction times can erode protocol profits through toxic order flow.
Moving from B-Booking (where the protocol takes all counterparty risk) to A-Booking (building a true marketplace) eliminates systemic risk to the liquidity pool but does not guarantee consistent liquidity supply. HyperLiquid’s HLP underwent exactly this transition: initially acting as counterparty to all trades, then gradually introducing market makers once volume grew sufficiently to improve pricing.
Theoretically, off-chain order books enable cheaper and more efficient trading, but if validators or sequencers act maliciously during order processing, executions can still fail. These problems are solvable—but no solution is perfect, and each comes with resource costs.
Liquidity Cold Start Dilemma

Participants in a trading market
Each order differs in expected return and risk profile. Traders aim to make directional bets on assets or events in prediction markets. Market makers profit by completing bid-ask cycles—earning fees and managing exposures (i.e., net positions in various assets at any time). Lenders provide leveraged capital in spot markets while assuming minimal risk, positioning themselves senior in the capital structure.

Given diverse risk preferences, participants can be broadly categorized into three tiers with distinct risk-return profiles. Traders might earn over 3000% on directional bets—or lose their entire position. Large market makers, assuming proper hedging, expect low double-digit annual returns in dollar terms, though poor risk management could lead to losses. Crypto lenders seek yields higher than U.S. Treasuries (~5.3%), closer to junk bond levels (~7–8%). This leverage is extended to traders or market makers to support their activities.

In cases of volatility and liquidation, lenders have priority over market makers and traders, whose positions get liquidated first.
The Real Role of Market Makers: Creating Liquidity vs. Extracting Liquidity
Market makers don’t profit simply by "betting against retail." Their core revenue model involves closing loops: buying asset X at $9 and selling it at $10, profiting from small spreads via high-frequency quantitative strategies. They must dynamically manage inventory risks—failure to hedge properly exposes them to unrealized losses if asset values decline.

To incentivize liquidity provision, exchanges commonly adopt a maker-taker fee model, charging takers to compensate makers.
Traders inherently rely on and utilize market makers—most orders execute against those posted by market makers. Unlike market makers, traders focus on directional bets on price movements and require sufficient liquidity to enter positions, leveraging correct calls for amplified gains.
For instance, if a trader believes BTC will rise 30% with downside limited to 10%, using a 5x leveraged perpetual could yield ~150% after fees/funding rates, versus only 30% in spot. The trade-off? Wrong predictions result in liquidation risk.
DEXs face the classic chicken-and-egg problem: attracting traders without market maker liquidity is hard, yet market makers won’t join without trading volume. Two main solutions exist:
-
Liquidity Pool Model: Protocols like Ostium, early HyperLiquid (HLP), and GMX act as counterparties. Long-term, this creates a zero-sum game—(X)LP profits come directly from trader losses.
-
Market Maker Agreements: High-cost, dilutive partnerships used by dYdX and Aevo. Once incentives end, liquidity often collapses (e.g., dYdX V3 saw widening basis spreads after ending market maker support).
The two primary approaches to solving the "chicken-or-egg" dilemma first address liquidity. One tackles inherently extractive market maker agreements; the other effectively attracts users while establishing an inverse relationship between user PnL and LP PnL (see Figure 1 and 2). Neither model has fully evolved beyond its initial design.
Figure 1, HLP PnL:

Figure 2, Net PnL of HyperLiquid Traders:

Figure 3, Combined View:

Fundamental Differences Between Perpetuals and Spot Markets
Spot trades settle freely after completion, whereas perpetuals represent ongoing obligations. Exchanges differ significantly in liquidation rules, margin requirements, and price formation mechanisms. Crucially, liquidations are generally internalized—a stark contrast to traditional derivatives markets.
In traditional finance, order matching and clearing are separated: exchanges handle matching, while central counterparties (like DTCC) manage position health. In contrast, DeFi derivatives platforms bundle both, creating non-standardized contracts that hinder interoperability.
Comparison of Price Discovery Mechanisms
Price discovery refers to how market participants and exchange mechanisms determine prices. Different exchanges employ vastly different order handling methods, affecting price formation and subsequent liquidations. Some operate via "liquidity pools," where LPs deposit assets to take the opposite side of trader positions.
Order books and AMMs function as layers for order matching—the venues where perpetual price discovery occurs and buyers/sellers "agree" on prices. Order books are continuously built by limit orders placed by users, market makers, and liquidation engines, with pricing driven by aggregate demand.

AMMs are automated and thus define price discovery based on their pricing models. However, increasingly, systems that source liquidity primarily from AMM-based designs allow order books to form around AMM-set prices.
Order books vary widely in structure and environment:
-
Central Limit Order Book (CLOB): Prices emerge from continuous bidding between buy and sell limit orders. For example, dYdX V4 uses an off-chain CLOB to eliminate gas fees, though validators could manipulate block ordering.
-
Automated Market Maker (AMM): Systems like GMX’s GLP use preset curves for pricing. Profits derive entirely from trader losses—via fees or liquidations. HyperLiquid innovatively combines both: allowing limit orders alongside AMM quotes, with algorithmic spread adjustments.
Example projects:

Example of CLOB Perpetual Trading

Suppose Alice wants to go long BTC with $1,000 and 10x leverage, resulting in a $10,000 notional position. Bob also goes long BTC. Alice pays a 5 basis point (0.05%) taker/platform fee to enter at $50,000 per BTC. Note this excludes bid-ask spread, which isn't actual loss. With 10x leverage, Alice incurs 50 bps (0.5%) slippage (0.05 × 10), costing $5—so her effective margin becomes $995. Intuitively, she’d be liquidated if price drops 10%, and earn 100% on her margin if it rises 10%. But in reality, she’ll likely be liquidated at a 7–8% drop. Why? Because the system must ensure Alice can always repay Bob—otherwise, the position defaults, harming Bob despite his risk-taking. If liquidation occurred precisely at a 10% drop, recovery might fall short. Hence, exchanges set maintenance margins combining base thresholds (e.g., 2%) with leverage-dependent multipliers, often progressive, to prevent bad debt from highly leveraged positions.
In this system, Bob and Alice find each other via a CLOB, which simply matches buyers and sellers. Here, neither pays trading fees to place orders, indicating an off-chain order book—similar to IntentX or dYdX. If Bob and Alice adjusted orders on-chain, they'd incur gas fees and compete for block space.
Once matched, Bob and Alice are mutually obligated—even though anonymous. To uphold commitments and avoid insolvency/systemic issues, the clearing layer enforces maintenance margins and liquidation procedures.
Evolution of Liquidation Mechanisms
When account equity falls below maintenance margin, the clearing engine forcibly closes positions at a discount. Platforms differ in implementation:
-
dYdX Model: Liquidated positions enter public order books, auctioned competitively to maximize recovery.
-
GLP/HLP Model: Protocol-affiliated parties absorb positions at fixed discounts, sacrificing efficiency for loyal liquidity.
In extreme cases, insufficient insurance funds may trigger loss socialization—profitable positions are force-liquidated to cover system deficits. Though largely replaced by capital reserves, DeFi platforms still struggle due to overlapping liquidity incentives and insurance fund dependencies.
Complexity of Cross-Margin Systems
Cross-margin systems fall into two broad categories: perpetual cross-margin and spot cross-margin.
-
Perpetual Cross-Margin: Unrealized PnL across different positions offsets each other. For example, with $1,000 deposited, a -$1,100 PnL on one position and +$1,200 on another cancel out—you won’t be liquidated (provided your maintenance margin remains intact). This model is now widely adopted across perpetual platforms. A key consideration is adjusting for liquidity depth to prevent attacks like the Yearn incident on dYdX, where attackers manipulated token prices to withdraw collateral and dump spot holdings, causing mark price dislocations and draining the platform’s insurance fund.
-
Spot Cross-Margin: Positions are margined but settled in different assets. A prime example is Ethena. It shorts BTC/ETH using BTC and ETH/LSD as collateral, effectively creating USDe through negatively correlated positions—an advantage for exchanges. For instance, shorting 1 BTC with 1 BTC as collateral requires the perpetual to deviate over 90% before default risk arises. Using spot assets unrelated to settlement currency introduces complexity: negatively correlated positions (which pay funding) are harder to liquidate, and large withdrawals of settlement assets (e.g., USDC) could theoretically impair exchange solvency. Most platforms mitigate this via Unified Trading Accounts (UTA), enabling deposits of non-yielding assets, lending out most of them functionally—not just earning trading fees but also yield from floating balances. Larger institutions may still deposit yield-bearing assets as collateral.
In DeFi, spot cross-margin challenges are mainly addressed via UTA (offsetting positions) or lending models. The latter is functionally simpler: it separates lending positions from perpetual margin, essentially building a lending system tightly integrated (but not directly tied) to the risk engine. For example, you could post 1 BTC as collateral to short BTC, then borrow USDC as margin. The exchange receives USDC to meet obligations, but this model is inefficient for traders—especially delta-neutral players like Ethena—because borrowed amounts reduce the funding rate earned on short positions.
-
Perpetual Cross-Margin: Allows offsetting PnL across positions (e.g., -$1,100 and +$1,200 balance out within a $1,000 deposit).
-
Spot Cross-Margin: As seen with Ethena, using BTC/ETH to short same assets, requiring mitigation of settlement asset (e.g., USDC) run risks.
Currently, DeFi options markets lag due to high margin requirements and lack of cross-collateral functionality, leaving CeFi platforms like Deribit dominant.
Unlike centralized exchanges, support for UTA-style cross-margin borrowing remains limited in DeFi. Even though USDe/sUSDe borrowing (essentially back-end operations) is backed by delta-neutral trading, the gap persists. CME and Deribit use dynamic risk matrices, while DeFi protocols enforce relatively static margin rules. This forces full coverage for options, although major short-dated options typically need only ~50% of notional value 99% of the time. If you're a DyDx or HyperLiquid trader earning >80% APY via delta-neutral funding strategies, you still cannot borrow at 10–20% rates to scale—even with perfectly hedged, negatively correlated positions. Exchanges' clearing layers must adapt to stay competitive.
Aevo’s Cross-Collateral Model
Aevo employs a centralized actor that sells your collateral to settle PnL and funding payments in USDC. This occurs during exchange health events or position closures. The system is more efficient: settlements remain in USDC, but positions backed by other currencies are notionally accounted for in USDC. When funding or PnL obligations arise, these positions are sold to fulfill USDC liabilities. Responsibility shifts to Aevo’s clearing system.
Drift’s Collateral Model
Drift’s lending product enables multi-asset cross-collateralization for perpetual exchanges. All perpetual trades on Drift settle in USDC. Whenever non-USDC assets are used as margin, USDC is automatically borrowed until trade completion. Additionally, users can lend and borrow assets on Drift similar to other lending protocols, tailored to specific use cases. Depositors (lenders) earn yield on their assets. Drift allows borrowing USDC against Solana and other assets (subject to LTV), with rates determined by an interest rate model akin to Aave. Since all trades still settle in USDC, deeper liquidity and smoother settlement are achieved. However, this implies two potential creditors: spot lenders and the platform—creating inherent conflicts of interest.
In-Depth Look at the GLP Mechanism

Though GLP models are now common in crypto derivatives protocols, the mechanics behind GLP aren’t fully understood by GMX itself or most market participants.
Unlike most exchanges where clearing occurs between users, in the GLP model, both clearing and liquidity provision are managed by the exchange via GLP. GLP is essentially a capital pool resembling an AMM. Instead of trades filled by traders and spreads set by market makers, trades are filled by GLP, with slippage and most fees going to GLP—not to market makers as in maker-taker models.

Traders on GMX pay additional borrowing fees beyond standard fees. This means under the (X)LP model, users may be forced to pay fees for both long and short sides simultaneously. During high volatility, a trader might receive a 7% net funding rate while shorts pay 14%, whereas normally funding rates are symmetric: if positive, you pay X% when long; if negative, you receive X%. This allows the protocol to capture the spread between what it pays and collects, while GLP avoids paying such borrowing fees—giving it a structural edge in long-term liquidity provision.
GLP and GMX have been severely exploited due to inadequate risk management. Malicious actors like Avi Eisenberg manipulated spot prices of assets like AVAX to distort vAMM prices on GMX, closing positions at massive profits at the expense of GLP and its depositors.
Price Discovery – CLOB vs. AMM
Price discovery describes how asset prices are formed—an auction being a classic example. In an auction, final prices reflect collective willingness to buy at given prices for a fixed quantity. For instance, with five bidders and three items: two want to buy at $4, two at $5, one at $6—the final prices would be $6, $5, $5. This logic applies to order books, except they’re continuous and unending. Participants constantly update their bid/ask prices. Market makers post bids slightly below and offers slightly above, aiming to profit from the spread as users trade. In this model, market makers and traders drive price discovery.
Automated Market Makers (AMMs) replace this with pricing curves. Instead of individual price declarations, AMM orders are functionally “batched,” as is liquidity. AMMs come in two main types: dynamic and non-dynamic. Non-dynamic AMMs are typically used for price discovery. Memecoins often launch via non-dynamic AMMs following X * Y = K curves, using token ratios to determine price and quantities to determine depth.

Dynamic AMMs suit highly correlated assets. Examples include Curve AMM and Uniswap V3, where Curve sets the price or allows LPs to choose price ranges. While AMM use in spot markets is well understood, their application in derivatives remains less clear.
While people understand macroscopically that systems like GMX’s GLP provide liquidity to traders, they may not realize GLP profits exclusively at user expense—either through fees or primarily via liquidations. Despite this zero-sum nature, AMMs in crypto derivatives can offer extremely deep liquidity, especially for emerging projects. HyperLiquid exemplifies successful fusion of both price discovery systems. Users can still place limit orders on the book, but it also functions as an AMM placing buy/sell orders on the same book, typically targeting the opposite side of existing orders. This automated system, managed by former high-frequency traders, dynamically adjusts based on volatility, calibrates spreads using external market data, and collects all liquidation and platform fees. It also acts as the platform’s insurance fund. Though HLP is an AMM, it differs from “dynamic” or static AMMs—it’s a novel, adaptive model, uniquely positioned due to its success on HyperLiquid and closed-source nature.
DeFi vs. Traditional Market Structure
Traditional finance has evolved over 126 years into a highly specialized, layered ecosystem: retail platforms (e.g., Robinhood) → market makers → exchanges (e.g., CME) → clearinghouses (e.g., DTCC). In contrast, DeFi protocols often attempt to cover multiple layers simultaneously—contributing to inefficiencies.
Yet DeFi holds two key advantages:
-
Nativeness: Enables rapid listing of crypto asset derivatives.
-
Permissionless Access: Provides entry for regulated regions (e.g., U.S., Brazil) and establishes a globally fair settlement layer.
As infrastructure security improves through innovations like restaking, DeFi is poised to become the ultimate global derivatives settlement network.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News













