In traditional derivatives markets, a futures contract has an expiry date. When it expires, the contract settles, the winner gets paid, the loser pays up, and everyone rolls into the next contract if they want to maintain exposure. That rollover creates friction, costs, and gaps in exposure that active traders work around constantly.
In 2016, BitMEX introduced a contract type that eliminated the expiry entirely. They called it a perpetual swap. Instead of settling on a fixed date, it stays open indefinitely, anchored to the spot price through a mechanism called the funding rate. It was a genuinely useful financial engineering innovation, and it spread rapidly through crypto markets.
By 2026, that same structure runs on-chain, at scale, without a central exchange in the middle. Perpetual futures on decentralized exchanges (perp DEXs) process tens of billions of dollars in daily volume through smart contracts that manage collateral, enforce margin rules, execute liquidations, and calculate funding payments automatically, without any human operator making decisions.
This article explains each component of that system in detail.
Key Takeaways
- Perpetual futures are derivatives with no expiry date. A funding rate mechanism replaces the settlement function of traditional futures.
- Smart contracts on a perp DEX handle everything a centralized exchange does manually: collateral management, position tracking, margin enforcement, liquidation, and funding settlement.
- The mark price, calculated from oracle data across multiple exchanges, determines unrealized PnL and liquidation thresholds, not the last traded price on the DEX itself.
- Funding Rate = (Perp Price - Spot Price) / Spot Price x Adjustment Coefficient. When perp trades above spot, longs pay shorts. When below, shorts pay longs.
- Liquidation fires automatically when the margin ratio falls below the maintenance threshold. An insurance fund covers gaps; auto-deleveraging (ADL) is the last resort.
- The major 2026 innovations are continuous per-block funding (replacing fixed 8-hour intervals), cross-margin across positions and assets, and intent-based execution that reduces front-running.
Perpetual Futures vs. Traditional Futures: The Core Difference
Before getting into how they work on DEXs, it helps to understand what perpetual futures are solving relative to traditional futures contracts.
| Feature | Traditional Futures | Perpetual Futures |
|---|---|---|
| Expiry date | Fixed (e.g., quarterly) | None |
| Price convergence | Converges naturally at settlement | Maintained by funding rate |
| Rollover required | Yes (must close and reopen) | No (hold indefinitely) |
| Settlement | Cash or physical delivery | Continuous; no settlement date |
| Leverage | Yes | Yes |
| Custody (on DEX) | Custodial | Self-custodial |
| Typical use | Hedging, speculation | Speculation, hedging, arbitrage |
The absence of an expiry date is the critical innovation. A trader who wants to maintain a leveraged long on BTC through a traditional futures exchange must roll the contract every quarter, closing one contract, opening the next, and paying the spread each time. A perpetual holder does not. As long as margin is maintained and funding payments are manageable, the position stays open.
The Components of a Perp DEX
A perp DEX is not a single smart contract; it is a system of interlocking components. Here is what each does.
Smart Contracts
Smart contracts are self-executing programs on the blockchain. They hold the logic for every function the exchange performs: accepting collateral deposits, opening and closing positions, enforcing margin requirements, triggering liquidations, calculating and distributing funding payments, and managing the insurance fund.
The critical property is that smart contracts execute deterministically: given the same inputs, they always produce the same outputs. There is no discretion, no human override (in a well-designed system), and no ability to pause selectively during adverse conditions. This eliminates the "exchange maintenance during volatility" problem that plagued traders on centralized platforms.
Modern perp DEXs are modular. The position registry, margin accounting, oracle integration, and liquidation engine are often separate contracts that interact through defined interfaces. This allows individual components to be upgraded or replaced without disrupting the others, though every upgrade introduces some risk.
On Drift Protocol (Solana), for example, all collateral, PnL adjustments, and liquidation events occur programmatically, removing the need for human oversight or intermediaries at any step of the process.
Oracles
A smart contract cannot access real-world data on its own. A blockchain is a deterministic system: every node must process the same inputs and produce the same state. If the contract tried to call an external API directly, different nodes would receive different prices at different times and disagree on the state of the chain.
Oracle networks solve this by fetching external prices, aggregating them through a decentralized validation process, and delivering a single consensus price on-chain that every node agrees on.
For a perp DEX, oracles serve three functions:
- Index price: the global market consensus price of the underlying asset, derived from multiple spot exchanges with volume weighting. Used to calculate the funding rate.
- Mark price: a manipulation-resistant reference price used to calculate unrealized PnL and determine liquidation thresholds. Typically derived from the index price plus a moving average of the basis between spot and perp.
- Settlement reference: the price against which funding payments are computed each interval.
Major oracle providers in 2026: Chainlink (aggregated from 21+ independent node operators per feed), Pyth Network (sub-second updates from 120+ first-party market makers including Jane Street and Wintermute), RedStone (modular pull-oracle design), Chronicle Protocol, and Supra. Most leading perp DEXs use multiple providers simultaneously and cross-reference outputs to detect anomalies. GMX v2 uses a hybrid of Chainlink and fast off-chain TWAPs; Hyperliquid runs proprietary internal feeds cross-referenced with Pyth; dYdX v4 uses oracle prices for mark price and liquidation triggers. Chainlink's full aggregation methodology is publicly documented at docs.chain.link/data-feeds. For a full deep dive on oracle design and what can go wrong, see our guide on how oracles keep perp DEX prices fair.
The Liquidity Layer
Trades on a perp DEX need a counterparty. Depending on the platform architecture, that counterparty is either:
- Other traders on an order book (Hyperliquid, dYdX v4). Market makers post bids and offers; takers fill against them.
- A liquidity pool (GMX v2). Liquidity providers deposit assets into a shared pool; traders open positions against the pool. The pool is effectively the counterparty for all trades.
- A hybrid combination (Drift, MUX, Ethereal, Avantis). Off-chain matching or aggregation routes against multiple sources.
The liquidity model determines slippage behavior, fee structure, and who bears risk. Order books have the best price discovery but require active market makers. Pool models provide continuous liquidity but expose LPs to directional risk when traders are consistently profitable.
The Funding Rate Engine
The funding rate engine calculates and distributes the periodic payment that keeps perpetual prices anchored to spot.
The simplified formula:
Funding Rate = (Perp Price - Spot Price) / Spot Price x Adjustment Coefficient
- If the perpetual price is above spot (positive basis), the funding rate is positive. Longs pay shorts.
- If the perpetual price is below spot (negative basis), the funding rate is negative. Shorts pay longs.
The adjustment coefficient is a platform-specific parameter that scales the rate's sensitivity to the basis. Most platforms also include an interest rate component, reflecting the cost of borrowing the quote currency, though it is often small enough to be secondary.
A worked example: BTC-PERP trades at $70,200. The index price (spot average) is $70,000. The basis is 0.286%. With a coefficient of 0.5, the funding rate for this interval is approximately 0.143%. A trader holding a $100,000 long position pays $143 in funding for that interval.
At the typical 8-hour interval, this rate extrapolates to approximately 1.5% per day if it persists, significant for positions held for extended periods. Most platforms display the annualized funding rate to make this visible; at 0.01% per 8-hour interval, the annualized cost is roughly 10.95%. Funding payments on some platforms, including GMX and Avantis, adjust dynamically based on pool utilization and volatility rather than a fixed interval. For full detail on costs at different rate levels, see our guide on how funding rates work on perp DEXs.
The 2026 trend is away from discrete 8-hour intervals toward continuous or per-block funding updates. This allows faster correction when basis grows, reduces gaming (traders timing entries just after a funding payment), and produces smoother pricing.
The Liquidation Engine
When a position's losses reduce the margin ratio below the maintenance threshold, the liquidation engine closes the position automatically.
The liquidation sequence:
- Monitoring: Smart contracts (or off-chain keeper bots that interact with the contract) continuously compare each position's current margin ratio against the maintenance requirement. Mark price from the oracle is used, not the last traded price.
- Trigger: When margin ratio falls below the maintenance threshold, liquidation is initiated.
- Execution: The position is closed at market price. The liquidated trader's collateral covers the loss; any remainder is returned to the trader's account minus a liquidation fee.
- Insurance fund: If the closing price is worse than the bankruptcy price (where the position's value equals zero), the insurance fund covers the gap. This protects the counterparty from taking a loss on a winning trade.
- ADL (Auto-Deleveraging): If the insurance fund is depleted, the platform reduces positions of the most profitable traders on the opposite side of the market to restore balance. This is the mechanism of last resort and is rare but has occurred during extreme events.
Different platforms implement this sequence differently. Hyperliquid uses on-chain liquidators with a reward mechanism that incentivises third parties to trigger liquidations quickly. Drift Protocol and MUX employ community-monitored liquidation bots. dYdX v4 uses automated clearing engines tied directly to oracle data. For a complete breakdown of what happens to your funds during liquidation, see our guide on understanding liquidation on perp DEXs.
The mark price protection is important: a temporary spike in the perp's traded price does not trigger liquidation if the oracle-based mark price hasn't moved. This prevents attackers from briefly pushing the perp price to hunt stops and liquidations before the broader market reacts.
Opening and Closing a Perpetual Position: Step by Step
Here is the full lifecycle of a position from wallet connection to close.
Step 1: Connect and deposit collateral. The user connects a self-custodial wallet and deposits collateral (typically USDC or USDT) into the perp DEX smart contract. This deposit becomes the margin backing the position. Some platforms, such as OrangeRock, integrate the wallet and the trading interface into a single mobile app, removing the step of connecting an external wallet entirely.
Step 2: Open the position. The trader selects an asset, a direction (long or short), and a leverage ratio. Smart contracts calculate the position size and margin requirements automatically based on the inputs. No manual approval is needed.
Step 3: Funding and PnL adjustments. From the moment the position is open, funding payments are applied periodically. Unrealised profits and losses update in real time based on the mark price, which is derived from oracle feeds, not the DEX's internal order flow.
Step 4: Close or liquidate. The trader may close the position manually at any time, realising the PnL. If the margin ratio falls below the maintenance threshold at any point, the position is closed automatically by the liquidation engine.
The Lifecycle of a Trade: A Worked Example
To make the mechanics concrete, here is a full trade lifecycle on a hypothetical perp DEX.
Setup: A trader deposits $2,000 USDC as collateral and opens a 5x leveraged long on ETH-PERP with ETH at $3,500. Position size = $10,000.
Initial state:
- Collateral (initial margin): $2,000
- Position size: $10,000 (2,857 units of ETH at $3,500)
- Maintenance margin: 2% of position = $200 (the minimum to avoid liquidation)
- Liquidation price: approximately $3,360 (a ~3.9% adverse move)
After 24 hours: ETH moves to $3,600. PnL = +$286 (2,857 units x $3.50 gain). Margin ratio improves. Funding rate was +0.005% per 8 hours (3 intervals) = 0.015% x $10,000 = $1.50 paid to shorts. Net PnL: approximately +$284.50.
Adverse scenario: ETH drops to $3,360 instead. The position's value has fallen by ~$400. Collateral remaining: approximately $1,600. Margin ratio: $1,600 / $10,000 = 16%, above the 2% maintenance threshold, so no liquidation yet.
Liquidation: ETH continues down to approach $3,185 (the approximate bankruptcy price for this position). The mark price (oracle-derived) confirms the level. The keeper bot sees the maintenance threshold is breached. The position is closed at market. If execution is at $3,350 (slight slippage below the bankruptcy price), the shortfall is covered by the insurance fund. The remaining collateral above maintenance is returned to the trader minus the liquidation fee.
Margin Modes: Isolated vs. Cross
Most perp DEXs offer two margin modes that determine how collateral is allocated:
| Mode | How It Works | Risk Profile | Best For |
|---|---|---|---|
| Isolated margin | Each position has its own collateral allocation; losses can only consume that allocation | Losses capped to isolated amount; no contagion between positions | High-risk single trades; testing new strategies |
| Cross margin | All available collateral backs all positions simultaneously | Higher liquidation resistance; one bad position can affect all | Multi-position strategies; hedges; capital-efficient trading |
In isolated margin, if your ETH long gets liquidated, it can only consume the $2,000 you allocated to it; your other positions and wallet balance are untouched. This caps your downside per trade but means each position needs its own buffer.
In cross margin, your entire $10,000 collateral pool backs all your open positions. A profitable SOL long can shore up a losing BTC long, giving the BTC position more room before liquidation. But a large enough loss on any position can drag the whole account toward liquidation.
Cross-margin interoperability, where spot holdings can serve as collateral for perp positions and vice versa, is the frontier in 2026. Vertex Protocol already allows this within its hybrid model; broader implementations are in development across the space.
How Funding Rates Anchor Prices: The Mechanism in Full
The funding rate is worth understanding at a deeper level because it is both the core innovation of perpetual futures and the primary ongoing cost for most traders.
When demand for long exposure on a perp DEX is high, the perp price bids up above spot. At this point:
- Positive basis emerges: perp price is above index price.
- The funding rate formula produces a positive rate: longs pay shorts.
- Traders holding longs face an increasing cost.
- Some longs close their positions, reducing demand on the long side.
- Arbitrageurs short the perp and buy spot to earn the convergence, a "cash and carry" trade.
- Both effects push the perp price back toward spot.
This is a market-based correction mechanism, not a centralized one. The funding rate is the price signal that incentivises arbitrageurs to do the work of price alignment.
The same mechanism works in reverse when the perp trades below spot: negative funding, shorts pay longs, arbitrageurs buy the perp and short spot, price recovers.
Why funding rates spike during market stress. During a sharp directional move, everyone wants to be on the same side. In a panic, everyone wants to short. The perp price drops below spot; shorts pay longs; the rate goes intensely negative. In a FOMO rally, everyone wants to go long; the perp trades above spot; longs pay shorts; rates spike positive. These spikes are often the first visible signal that a crowded trade is building. Professional traders use funding rate data from aggregators like Coinglass as a real-time sentiment indicator.
Execution Models Across Leading Platforms
The architecture of a perp DEX's execution layer shapes every trading outcome from spread to liquidation speed. Three models are in active competition.
Order-book based execution (dYdX v4, Hyperliquid, EdgeX, Reya) replicates traditional exchange mechanics using on-chain or hybrid order books. Professional market makers post bids and offers; takers fill against them. This delivers precision pricing, low slippage, and competitive spreads on liquid pairs. The trade-off is infrastructure: order-book models require high-performance chains with fast block times and high throughput.
AMM-based execution (GMX v2, Level Finance, Sunperp, Aster) uses liquidity pools to simulate perpetual contracts. There is no order book; the pool is always available as counterparty. This delivers simplicity and continuous liquidity regardless of market maker activity. The downside is that pricing depends heavily on oracle accuracy, and the pool's balance of risk between longs and shorts can distort effective pricing during one-sided markets.
Hybrid and aggregator models (Drift, MUX, Avantis, Ethereal, Jupiter Perps) combine elements of both. Some use AMMs for liquidity depth and order books for price discovery. Others, like Jupiter, act as aggregators that route orders across multiple perp DEXs for best execution, finding the tightest spread and deepest depth across the ecosystem simultaneously.
On-Chain vs. Off-Chain Components
A perp DEX is rarely 100% on-chain or 100% off-chain. Understanding the split matters for assessing trust assumptions.
| Component | On-chain | Off-chain | Notes |
|---|---|---|---|
| Settlement | Always on-chain | Balances, PnL, liquidations are blockchain-final | |
| Order matching | On-chain (Hyperliquid, dYdX v4) | Off-chain (most hybrids) | Off-chain matching is faster but introduces sequencer trust |
| Price feeds | On-chain oracle contract | Price aggregation off-chain | Aggregation happens off-chain; delivery is on-chain |
| Liquidation monitoring | On-chain logic | Keeper bots off-chain | Keepers trigger on-chain liquidation; some platforms use decentralised keeper networks |
| Insurance fund | On-chain smart contract | Transparent balance; auditable distributions |
Fully on-chain order books (Hyperliquid, dYdX v4) represent the maximum decentralisation for execution. Hybrid models introduce an off-chain sequencer that provides speed benefits, but the sequencer can, in theory, reorder or censor transactions. This trade-off is explicit and accepted by most institutional users who prioritise execution quality.
The 2026 Innovation Layer
Several developments in 2026 have meaningfully changed how perpetual futures work on DEXs.
Continuous funding. Multiple platforms have moved from 8-hour funding intervals to per-block or continuous funding. This produces smoother price alignment, reduces gaming of funding windows, and makes the basis between perp and spot smaller on average.
Intent-based execution. Platforms including Ethereal and some modules on Hyperliquid are exploring intent-based execution: the trader specifies what they want (price, size, slippage tolerance) rather than submitting a specific transaction. A solver network fills the order optimally. This reduces front-running and MEV extraction.
Cross-chain margin. The ability to post collateral on one chain and open positions on another is in development. This removes the friction of bridging and allows traders to use assets across the DeFi ecosystem as unified collateral.
Real-world asset perpetuals. Oracle networks now deliver verified price feeds for traditional assets: commodities, equity indices, pre-IPO equities. Perp DEXs can list a perpetual on any asset that has a reliable price feed. Pyth Network's 1,300+ price feeds across 100+ chains, sourced from first-party market makers, provide the data layer. The result is a derivatives market that never closes and covers assets far beyond crypto.
Conclusion
Perpetual futures on decentralized exchanges are a genuine engineering achievement: traditional derivatives functionality replicated through smart contracts, oracle networks, and economic incentive design, without a central operator.
The mechanics are not simple. Funding rates, mark prices, margin modes, liquidation engines, oracle aggregation, and keeper infrastructure all interact in ways that matter for trading outcomes. Understanding them is not optional; it is the prerequisite for using leverage responsibly.
As of June 2026, the infrastructure has matured to where the largest perp DEXs compete directly with mid-tier centralised exchanges on execution quality, market coverage, and fee efficiency. The remaining friction is educational: most traders who use perp DEXs do not fully understand the system they are trading on.
Trade and explore decentralized futures securely - download the NewsPulse Wallet app to connect directly to on-chain markets.







