DeFi

Perp DEX Guide: How Decentralized Perpetuals Work

Perp DEX Guide: How Decentralized Perpetuals Work

A perp DEX is a decentralized exchange for perpetual futures. These are leveraged contracts that track an asset’s price, never expire, and use periodic funding payments to keep the contract near the spot price. Unlike a centralized exchange, a perp DEX settles positions through smart contracts or its own blockchain, and you usually connect a wallet instead of opening an account. The real differences show up in a crash, when the architecture decides how liquidations run, who absorbs losses, and whether your collateral can be reached.

  • Three main designs: on-chain order books on their own chains (Hyperliquid, dYdX v4), pool-and-oracle venues (GMX, Jupiter Perps), and hybrids with off-chain or proof-verified matching (Lighter, Aster).
  • Funding rates move money between longs and shorts. They’re a cost or a credit that changes every interval, never a fixed yield.
  • When liquidations fail, insurance funds or LP vaults absorb the loss first, then auto-deleveraging (ADL) closes profitable traders’ positions.
  • Failures have been real: Hyperliquid’s JELLY episode (March 2025), the GMX V1 exploit (July 2025), Hyperliquid’s first cross-margin ADL (October 2025) and the Drift multisig theft (April 2026).
  • Access is restricted. Several major venues exclude US persons in their terms.

What a perp DEX is

Perpetual futures were popularized by centralized exchanges. They let you go long or short with leverage without an expiry date. A perpetual DEX keeps that product but changes who holds the money and who runs the matching. Your collateral sits in a smart contract, a bridge deposit contract or an application-specific chain. Price feeds, liquidations and funding run on rules published in code or protocol documentation.

That doesn’t make onchain perps trustless in every sense. Most venues still depend on a small validator set, an oracle provider, a sequencer or a multisig that can upgrade contracts. Leverage itself works the same as anywhere else, and our leverage trading guide explains margin and position sizing. This page focuses on what changes when the exchange is decentralized.

Three ways perp DEXs are built

1. On-chain order books on an appchain

Hyperliquid runs its own layer-1 blockchain, where every order, cancel and fill is part of consensus. dYdX v4 runs as a Cosmos-based chain whose validators each hold an in-memory order book, and only matched trades are written to blocks. Prices come from a central limit order book with market makers, much like a centralized exchange. Your funds typically reach the chain through a bridge or deposit contract, which makes that bridge, and the validator set securing it, part of your custody risk. Our Hyperliquid explainer covers that chain’s design in detail.

For a BNB Chain example, our Aster perp DEX explainer covers its origins, its fee-funded ASTER buybacks and why analysts have questioned its reported trading volume.

2. Pool-based, oracle-priced venues

GMX (Arbitrum and Avalanche) and Jupiter Perps (Solana) have no order book. Traders open positions against a liquidity pool, priced from oracles. The pool’s LPs are the counterparty to every trader. When traders win, the pool loses, and the reverse. This removes slippage on many trades, but it makes oracle accuracy and pool accounting critical. A pricing bug can drain LPs directly. Our GMX guide walks through its GM pools.

3. Hybrid and proof-verified matching

Newer venues match orders off-chain for speed and settle on a public chain. Lighter is a zk-rollup purpose-built for perps. A centralized sequencer orders trades, while zero-knowledge proofs verify matching, liquidations and funding before Ethereum contracts accept the new state. Aster grew rapidly from late 2025, helped by heavy trading incentives. Hybrids offer speed and low fees, but you rely on the operator’s sequencer staying online and honest about ordering, even when a proof system limits what it can fake.

Design Examples Who is your counterparty What fails in a crash
Appchain order book Hyperliquid, dYdX v4 Other traders and market makers (plus protocol vaults on Hyperliquid) Thin books, validator decisions, bridge risk
Pool + oracle GMX, Jupiter Perps The liquidity pool’s LPs Oracle errors, pool accounting bugs, LP drawdowns
Hybrid / zk-verified Lighter, Aster Other traders via the operator’s matching engine Sequencer downtime, operator controls

Funding rates explained with an example

Because perps never expire, something has to pull their price toward the spot index. That something is the funding rate. When the perp trades above the index, longs pay shorts. When it trades below, shorts pay longs. Venues set the interval. Hyperliquid, for example, settles funding hourly. The payment is a percentage of your position’s notional value.

Worked example (hypothetical numbers): you hold a $10,000 BTC long with $1,000 of margin. The displayed funding rate is +0.01% per hour, so longs pay. Each hour you pay $10,000 × 0.0001 = $1. Over 24 hours at that rate you’d pay $24, which is 2.4% of your margin. Funding changes constantly, and in crowded markets it can rise much higher, slowly eroding margin even if price doesn’t move. Always read the live funding figure and its countdown on the market page before opening a position.

Some protocols turn funding itself into a tradable market. Pendle’s Boros, for example, lets traders take positions on future funding rates, which adds its own layer of complexity and risk.

Liquidations, ADL and insurance funds

Every perp DEX sets a maintenance margin. If your account value (collateral plus unrealized profit or loss) falls below it, your position is liquidated. On Hyperliquid, maintenance margin is half the initial margin at an asset’s maximum leverage, so the leverage cap for each market directly sets how close to liquidation you start. Max leverage differs per asset and changes over time, so check the market’s specification page.

When a liquidation can’t be filled at a price that covers the position’s losses, the shortfall has to go somewhere. The usual order is:

  1. Liquidation engine or vault. Takes over the position, as Hyperliquid’s protocol vaults do, or a pool absorbs it, as on GMX.
  2. Insurance fund. Covers bad debt from fees collected earlier.
  3. Auto-deleveraging (ADL). If both are exhausted, the protocol forcibly closes positions on the winning side, usually ranked by profit and leverage, at the bankruptcy price.

ADL is the step most traders overlook. During the 10 October 2025 market crash, Hyperliquid triggered cross-margin ADL for the first time in over two years of operation, according to WuBlockchain’s reporting. Some traders who were correctly positioned saw profitable positions closed early. Analysts disagreed sharply over how much ADL was strictly necessary. On a perp DEX, being right doesn’t guarantee you keep the full gain when the system is under stress.

Perp DEX comparison on stated criteria

This table compares designs, not tokens, as of October 2026. Fee schedules, listed markets and leverage caps change often, so check each venue’s docs before trading. We don’t rank them, because which one suits you depends on the trade-offs you accept.

For a zero-knowledge design, our Lighter perp DEX explainer covers its Ethereum zk-rollup, zero-fee retail accounts and the LIT unlock scheduled for 27 December 2026.

Venue Design Where it runs Custody path Notable dependency
Hyperliquid On-chain order book Own L1 (HyperCore) Bridge from Arbitrum USDC into the L1 Validator set; protocol vaults
dYdX v4 Validator-run order book Cosmos appchain Deposits bridged into the dYdX chain Validator set; oracle prices
GMX Pool + oracle Arbitrum, Avalanche Smart contracts on the host chain Oracle feeds; LP pool solvency
Jupiter Perps Pool + oracle Solana Solana programs; JLP pool Oracle feeds; pool solvency
Lighter zk-verified order book Ethereum-settled rollup Ethereum contracts Centralized sequencer
Velocity (formerly Drift) Hybrid order book / AMM Solana Solana programs Multisig governance (see below)

Costs come in four parts: maker and taker fees, funding, network gas (often zero or near-zero on appchains and rollups), and any front-end or “builder” fees added by third-party interfaces that route orders into a venue. Check the full fee line on the order ticket. If you’re weighing Hyperliquid vs GMX, the basic choice is between an order book where market makers set your price and a pool where an oracle sets it. That affects how your fills behave in fast markets more than any fee difference does.

Where perp DEXs have failed

  • JELLY manipulation, Hyperliquid (March 2025). A trader opened a large short in the thinly traded JELLYJELLY market, then pushed the token’s price up on other venues. The losing position was absorbed by Hyperliquid’s HLP vault. Validators delisted the market and settled it at a set price, and the foundation said it would reimburse affected users other than flagged addresses. The fast validator vote drew criticism about centralization.
  • GMX V1 exploit (9 July 2025). An attacker used a reentrancy flaw in GMX V1 on Arbitrum to manipulate GLP pricing and drain about $42 million. Most funds were returned after a white-hat bounty offer. The pool-based design meant LP assets were directly at stake.
  • Hyperliquid ADL (10 October 2025). The market-wide crash triggered cross-margin auto-deleveraging, described above.
  • Drift (1 April 2026). Attackers took control of Drift’s multisig and drained roughly $280–295 million within minutes, with estimates varying by source. Investigators including Elliptic and TRM Labs attributed the attack to North Korea’s Lazarus Group. Reports pointed to social engineering of signers, not a smart contract bug. The protocol rebranded as Velocity DEX in July 2026 and announced a relaunch with a Tether credit line. Our Drift explainer has background on the original protocol.

The pattern is that none of these were “the code was hacked” in the simple sense. They involved thin markets, governance keys, pool accounting and stress-time mechanics. Look at those areas before depositing, not just whether a venue has been audited.

Approvals matter too. Depositing into a pool-based venue or a bridge contract usually starts with an ERC-20 approval for your collateral token. Approve only the deposit amount, deposit through the official app address (typed by hand, never from an ad or DM), and revoke allowances you no longer need.

Access and regulation

Most large perp DEXs restrict users through their terms rather than code. Hyperliquid’s terms of use restrict US persons, residents of Ontario and sanctioned jurisdictions, and its front end uses IP geofencing. The dYdX Foundation says dYdX isn’t available to US persons or Canadian residents, among other restricted territories. Using a VPN to get around these terms can breach them and leave you with no recourse if something goes wrong. US rules are changing, and the CFTC has begun allowing perpetual-style futures on registered US exchanges. As of October 2026, though, that doesn’t extend to offshore perp DEXs. This isn’t legal advice. Check the rules where you live and each venue’s current terms.

For other DeFi categories, browse the DeFi guides hub.

FAQ

Is the Hyperliquid app a perp DEX?

Yes. Hyperliquid’s exchange app is the front end for perpetual (and spot) markets that run on its own layer-1 chain with an on-chain order book. You deposit USDC through its bridge and trade from a wallet-linked account. The terms restrict US persons and several other jurisdictions, so check eligibility before connecting.

Hyperliquid vs GMX: what’s the main difference?

Hyperliquid matches orders on an order book, so prices come from other traders and market makers. GMX prices trades from oracles against a liquidity pool whose LPs are your counterparty. That affects slippage, how liquidations play out, and who loses money when things break: traders and vaults on Hyperliquid, pool LPs on GMX.

What happens to my position during auto-deleveraging?

If liquidations leave bad debt that insurance funds or vaults can’t cover, ADL closes some profitable positions on the opposite side at the bankrupt account’s price. You keep the realized profit up to that point but lose the rest of the move. Venues usually show an ADL queue indicator. Lower leverage typically places you further back in that queue.

Are perp DEX funding rates a way to earn income?

Funding is a transfer between traders that flips direction with market conditions. It isn’t a promised return. Positions designed to collect funding still carry liquidation risk, venue risk and the chance that funding reverses. Treat any displayed rate as a snapshot of the current hour, not a forecast.

Crypto is volatile and risky; this is education, not financial advice. Do your own research.

Related Articles