Skip to main content

Perp DEX Funding & Liquidations

How funding rates differ on-chain, on-chain liquidation dynamics, keeper networks, and the MEV implications of on-chain perp trading.

From Thrive on YouTube

Watch the matching Thrive video

Watch the series
Funding Rates Explained: What Perpetual Futures Really Cost You

Funding Rates Explained: What Perpetual Futures Really Cost You

Part of Start Here: Crypto Futures Basics. Education only. Not financial advice.

How Funding Rates Differ on Perp DEXs

Funding rates on perpetual contracts keep the contract price anchored to the spot price. The mechanism is the same in principle across CEXs and DEXs (when longs dominate, they pay shorts, and vice versa) but the implementation varies significantly between on-chain platforms.

Order-book perp DEXs like Hyperliquid and dYdX calculate funding based on the deviation between their own mark price (derived from the order book) and the spot index price. This is similar to how centralized exchanges calculate funding. Oracle-based DEXs like GMX use a different mechanism: funding is based on the imbalance between long and short open interest in their pools. When longs significantly outweigh shorts, longs pay a premium, not because the contract price deviates from spot, but because the pool is imbalanced.

Order-book model (Hyperliquid, dYdX)Funding = f(mark price - index price). Similar to CEX. Settled hourly or every 8 hours depending on the protocol.
Oracle-based model (GMX)Funding = f(long OI - short OI). Based on pool imbalance, not price deviation. Accrues per second, settled continuously.
Hybrid model (Drift)Combines mark price deviation with pool balance. Funding adjusts based on both price gaps and the AMM's exposure.

Funding Arbitrage Opportunity

Because each perp DEX calculates funding differently, the same asset can have wildly different funding rates on different platforms. Being long on a platform with negative funding (you get paid) while short on a platform with positive funding (you also get paid) is a legitimate delta-neutral strategy, but watch for execution risk and cross-platform margin management.

On-Chain Liquidation Mechanics

On a centralized exchange, the exchange's internal liquidation engine monitors your margin ratio and force-closes your position when it falls below the maintenance threshold. This happens instantly within the exchange's own system. On a perp DEX, liquidations are executed by external actors (keeper networks, bots, or validators) who monitor positions and call the liquidation function on the smart contract when a position becomes eligible.

The liquidator earns a fee for performing the liquidation, which incentivizes a competitive ecosystem of liquidation bots. On most chains, these bots monitor the mempool and race to liquidate eligible positions, creating MEV (Maximal Extractable Value) opportunities around liquidations. This is important to understand: your liquidation is not a neutral event. It is a profit opportunity for someone else, and sophisticated actors will front-run it.

MEV in Liquidations

On EVM chains, liquidation bots compete via priority gas auctions: paying higher gas to get their liquidation transaction mined first. On Solana, Jito tips serve the same purpose. Some liquidators bundle transactions: they liquidate a position, buy the dumped collateral at a discount, and sell it on a DEX in the same atomic transaction. The result is that liquidation prices on perp DEXs can sometimes be slightly worse for the trader than advertised, because the MEV extraction adds friction.

Hyperliquid mitigates this by having its own validator set handle liquidations within consensus: liquidation bots do not compete for priority. dYdX v4 similarly integrates liquidation into its validator process. This is a genuine advantage of appchain architectures over general-purpose chain deployments.

Liquidation Cascades: On-Chain vs Off-Chain

A liquidation cascade occurs when one liquidation pushes the price far enough to trigger more liquidations, which push price further, triggering more liquidations. The mechanism is the same on-chain and off-chain, but the dynamics differ. On a CEX, the cascade happens inside the exchange's matching engine: instantly, invisibly. On a perp DEX, every liquidation is a blockchain transaction, which means the cascade unfolds over multiple blocks and is fully visible in real time.

The transparency is a double-edged sword. You can watch the cascade happen and position accordingly: if you see a massive liquidation hit the chain and know there are more positions clustered nearby, you can anticipate the next wave. But sophisticated bots are doing the same analysis faster. The on-chain transparency also means that on slower chains, the cascade can be delayed by block times and gas congestion, creating a slower but more drawn-out liquidation event.

Monitoring On-Chain Liquidation Levels

Because all positions on perp DEXs are publicly visible, you can map exactly where liquidations will occur. Every open position has a known entry price, leverage, and collateral, which means the liquidation price is calculable. Aggregating this data across all open positions creates a liquidation heatmap showing where clusters of liquidations sit above and below the current price.

1

Identify large position clusters

Use Thrive's analytics to find price levels with the highest concentration of liquidation volume. These are magnetic zones: price tends to be drawn toward them.
2

Assess direction vulnerability

If there are massive long liquidations just below the current price and minimal short liquidations above, the market is more vulnerable to a downside cascade than an upside one.
3

Trade the cascade, not against it

When price approaches a large liquidation cluster, do not try to catch the knife. Let the cascade play out, wait for volume to spike and OI to drop (indicating liquidations are being processed), then look for reversal entries.
4

Use transparency as your edge

The full visibility of on-chain liquidation levels is an informational advantage that does not exist on centralized exchanges. Use it. Check Thrive's liquidation maps before entering any leveraged trade.

The Transparency Edge

On-chain perp DEX data is the most transparent derivatives data in existence. Every position, every liquidation, every funding payment is public. This transparency is your structural advantage over CEX traders who cannot see this data. Build it into your workflow.

Put this lesson to work

Free on Thrive, no account needed.