At LA Tech Week 2025, the “DeFi Derivatives” panel revealed something surprising: Perpetual DEXs are approaching CEX volumes. GMX and dYdX combined are processing $12B+ monthly volume.
The question isn’t “will perp DEXs succeed?” anymore. It’s “which architecture will win?”
The Perpetual DEX Landscape (Oct 2025)
Market Leaders
dYdX v4: $8.2B monthly volume
- Architecture: Cosmos appchain (sovereign blockchain)
- Order book: Off-chain matching, on-chain settlement
- Decentralization: 60 validators
- Products: 50+ perpetual markets
GMX v2: $4.1B monthly volume
- Architecture: Arbitrum + Avalanche
- Order book: Oracle-based pricing (no order book)
- Liquidity: GLP pool (multi-asset)
- Products: Crypto perpetuals, Forex (coming)
Hyperliquid: $2.8B monthly volume
- Architecture: Custom L1 (HyperEVM)
- Order book: Fully on-chain
- Speed: 200ms finality
- Products: 80+ perpetual markets
Synthetix Perps v3: $1.5B monthly volume
- Architecture: Optimism
- Oracle: Chainlink + Pyth
- Liquidity: SNX stakers
- Products: Crypto, commodities, indices
Vertex Protocol: $890M monthly volume
- Architecture: Arbitrum
- Hybrid: Order book + AMM
- Products: Spot + perpetuals
Total Perp DEX Volume (Sept 2025)
Monthly: $18.5B
Daily average: $620M
Market share vs CEXs: ~3% (CEXs: $600B+ monthly)
Growth: +420% year-over-year
Architecture Deep Dive: GMX v2
How GMX Works (Oracle-Based Pricing)
Traditional perpetual exchange: Order book matches buyers and sellers.
GMX: Trade directly against liquidity pool at oracle price.
Flow:
1. User wants to long 10 ETH at 100x leverage
2. GMX fetches price from Chainlink ($2,500)
3. User posts collateral (0.25 ETH = $625 at 100x)
4. Position opened against GLP pool
5. If ETH rises to $2,600, user profit = $1,000
6. If ETH drops to $2,490, user liquidated (collateral lost)
GLP Pool (liquidity providers):
- Multi-asset pool (ETH, BTC, USDC, USDT, etc.)
- LPs earn: Trading fees + liquidation fees - trader profits
- Current APY: 18-25%
Smart contract (simplified):
contract GMXVault {
struct Position {
address trader;
bool isLong;
uint256 size; // Position size in USD
uint256 collateral; // Collateral in USD
uint256 entryPrice; // Price when opened
uint256 lastFundingTime;
}
mapping(bytes32 => Position) public positions;
function increasePosition(
address[] memory path, // [collateralToken, indexToken]
uint256 amountIn,
uint256 sizeDelta, // Leverage amount
bool isLong
) external {
// Get oracle price
uint256 price = oracle.getPrice(path[1]);
// Calculate position
bytes32 key = getPositionKey(msg.sender, path[1], isLong);
Position storage position = positions[key];
position.size += sizeDelta;
position.collateral += amountIn;
position.entryPrice = price; // Simplified
// Transfer collateral to vault
IERC20(path[0]).transferFrom(msg.sender, address(this), amountIn);
emit IncreasePosition(key, msg.sender, sizeDelta, price);
}
function decreasePosition(
address indexToken,
uint256 collateralDelta,
uint256 sizeDelta,
bool isLong
) external returns (uint256) {
bytes32 key = getPositionKey(msg.sender, indexToken, isLong);
Position storage position = positions[key];
// Get current price
uint256 currentPrice = oracle.getPrice(indexToken);
// Calculate PnL
int256 pnl;
if (isLong) {
pnl = int256((currentPrice - position.entryPrice) * position.size / position.entryPrice);
} else {
pnl = int256((position.entryPrice - currentPrice) * position.size / position.entryPrice);
}
// Pay trader or charge loss
if (pnl > 0) {
// Trader profits (GLP takes loss)
IERC20(collateralToken).transfer(msg.sender, uint256(pnl));
} else {
// Trader losses (GLP takes profit)
// Collateral already in vault
}
// Update position
position.size -= sizeDelta;
position.collateral -= collateralDelta;
return uint256(pnl);
}
}
Key features:
- Zero price impact (oracle pricing)
- No slippage (up to max open interest)
- Instant execution
Trade-offs:
- Oracle risk (price manipulation, staleness)
- GLP loss when traders win (LPs vs traders game)
Architecture Deep Dive: dYdX v4
The Appchain Model
Why dYdX built their own blockchain:
- Full control: Customize consensus for trading
- No gas fees: Protocol subsidizes transaction costs
- MEV resistance: Validators can’t front-run (custom ordering)
- Speed: 1-2 second finality (Cosmos SDK + CometBFT)
Architecture:
dYdX Chain (Cosmos appchain)
↓
60 Validators (PoS)
↓
Off-chain order book (Indexer)
↓
On-chain matching & settlement
Order flow:
// 1. User signs order (off-chain)
const order = {
market: 'ETH-USD',
side: 'BUY',
price: 2500,
size: 10,
timeInForce: 'GTT',
expiration: Date.now() + 3600000
};
const signature = await wallet.signTypedData(domain, types, order);
// 2. Submit to indexer (off-chain matching engine)
await indexer.placeOrder(order, signature);
// 3. Indexer matches orders
// 4. Matched orders batched to validators
// 5. Validators execute trades on-chain
// 6. Query position
const position = await client.getPosition('ETH-USD');
console.log(position.size, position.entryPrice);
Advantages:
- Order book UX (limit orders, stop losses)
- High throughput (thousands of trades per second)
- Low latency (sub-second execution)
Trade-offs:
- Not permissionless (validators are whitelisted)
- Sovereignty risk (separate chain, bridge needed)
- Complexity (running full blockchain)
Hyperliquid: Fully On-Chain Order Book
Bold claim: “First performant on-chain order book.”
How they achieved it:
- Custom L1 blockchain (HyperEVM)
- Consensus optimized for trading (200ms finality)
- All order matching on-chain (fully verifiable)
Performance (Oct 2025):
- 100,000 orders per second (theoretical)
- 10,000 orders per second (observed)
- Gas: $0.0001 per order
On-chain order book:
contract HyperliquidOrderBook {
struct Order {
address trader;
uint256 price;
uint256 size;
bool isBuy;
uint256 timestamp;
}
Order[] public buyOrders; // Sorted by price descending
Order[] public sellOrders; // Sorted by price ascending
function placeOrder(uint256 price, uint256 size, bool isBuy) external {
Order memory order = Order({
trader: msg.sender,
price: price,
size: size,
isBuy: isBuy,
timestamp: block.timestamp
});
// Insert into sorted order book
if (isBuy) {
insertBuyOrder(order);
} else {
insertSellOrder(order);
}
// Try to match immediately
matchOrders();
}
function matchOrders() internal {
while (buyOrders.length > 0 && sellOrders.length > 0) {
Order storage bestBuy = buyOrders[0];
Order storage bestSell = sellOrders[0];
// Check if match possible
if (bestBuy.price >= bestSell.price) {
// Match!
uint256 matchSize = min(bestBuy.size, bestSell.size);
uint256 matchPrice = (bestBuy.price + bestSell.price) / 2;
// Execute trade
executeTrade(bestBuy.trader, bestSell.trader, matchSize, matchPrice);
// Update orders
bestBuy.size -= matchSize;
bestSell.size -= matchSize;
// Remove filled orders
if (bestBuy.size == 0) removeBuyOrder(0);
if (bestSell.size == 0) removeSellOrder(0);
} else {
break; // No more matches
}
}
}
}
Challenge: On-chain order books are gas-expensive on general-purpose chains.
Hyperliquid solution: Purpose-built blockchain where order operations are cheap.
Funding Rates & Perpetual Mechanics
Funding rate: Periodic payment between longs and shorts to keep perp price anchored to spot.
Formula:
Funding Rate = (Perp Price - Index Price) / Index Price
If funding rate > 0: Longs pay shorts
If funding rate < 0: Shorts pay longs
Payment every 8 hours (or 1 hour on some platforms)
Example:
ETH spot price: $2,500
ETH perp price: $2,510 (perp trading at premium)
Funding rate: (2510 - 2500) / 2500 = 0.004 = 0.4%
Long position: 10 ETH = $25,000
Funding payment: $25,000 × 0.4% = $100 (paid to shorts)
Code (GMX funding):
function updateFunding(address indexToken) public {
uint256 currentPrice = oracle.getPrice(indexToken);
uint256 spotPrice = spotOracle.getPrice(indexToken);
// Calculate funding rate
int256 fundingRate = int256((currentPrice - spotPrice) * 1e18 / spotPrice);
// Apply to all positions
for (uint i = 0; i < openPositions.length; i++) {
Position storage pos = openPositions[i];
if (pos.indexToken == indexToken) {
int256 fundingPayment = int256(pos.size) * fundingRate / 1e18;
if (pos.isLong) {
// Longs pay (if rate > 0)
pos.collateral -= uint256(fundingPayment);
} else {
// Shorts receive (if rate > 0)
pos.collateral += uint256(-fundingPayment);
}
}
}
}
Oracle Solutions
Perpetual DEXs need fast, accurate price feeds.
Chainlink (GMX, Synthetix)
- Update frequency: 1% deviation or 1 hour
- Latency: 30-60 seconds
- Reliability: Very high
- Cost: Expensive
Pyth Network (dYdX, Synthetix v3)
- Update frequency: Sub-second
- Latency: 400ms
- Reliability: High
- Cost: Medium
- Source: 90+ first-party publishers (exchanges, market makers)
Custom oracles (Hyperliquid)
- Update frequency: Every block
- Latency: 200ms
- Source: Aggregated from CEXs
My Questions for the Community
-
Which architecture do you prefer? Order book (dYdX), oracle-based (GMX), or hybrid?
-
Appchain vs L2: Is dYdX’s sovereign chain worth the complexity?
-
GLP risk: Would you provide liquidity to GMX knowing traders’ profits = your losses?
-
Regulation: How will perp DEXs handle increasing regulatory scrutiny?
Perpetual DEXs are DeFi’s next frontier. The architecture is still being figured out.
Diana Martinez
DeFi Protocol Engineer @ Uniswap Labs
Resources:
- GMX: https://gmx.io/
- dYdX v4: https://dydx.exchange/
- Hyperliquid: https://hyperliquid.xyz/
- Synthetix: https://synthetix.io/
- Perp DEX data: https://defillama.com/protocols/Derivatives
- LA Tech Week 2025 (October 13-19, Los Angeles)