Zelcore

Funding Rates, Liquidations, and Insurance Funds in Onchain Perps

9 min read
Funding Rates, Liquidations, and Insurance Funds in Onchain Perps

On 10 October 2025, more than $19 billion in perpetual futures positions were liquidated in roughly one day. BTC funding had climbed sharply in the preceding week; order-book depth on major venues shrank more than 90%. Hyperliquid triggered its cross-margin auto-deleveraging mechanism for the first time in over two years. Three systems that are supposed to work quietly in the background — the funding rate, the liquidation engine, and the insurance fund — were all pushed to their limits simultaneously.

This part of the series explains each mechanism, how they interact, and what their failure modes look like.

Why the Perp Price Doesn't Just Drift: The Funding Rate

A perpetual future never expires. Without some tethering mechanism, its price would diverge freely from the underlying spot market. The funding rate is that tether: a periodic cash transfer exchanged directly between long and short holders — not collected by the protocol — that continuously pulls the perpetual price back toward the index.

When the perp trades above the index, longs pay shorts (positive funding). When it trades below, shorts pay longs (negative funding). The payment penalises whoever is on the crowded side of the trade, making their position more expensive to hold, which draws in the opposite side until the spread closes.

Three prices matter here, and they are not the same thing. The last-traded price is the most volatile — it reflects the most recent order-book print. The index price (sometimes called the oracle price) is a composite drawn from external spot markets; it is used to compute funding. The mark price is a dampened fair-value estimate used for margin accounting and liquidation triggers — specifically to prevent a manipulated thin-book print from forcing out healthy positions. Understanding oracle price feeds helps clarify why the index and mark are constructed the way they are.

Most onchain venues now settle funding hourly rather than the eight-hour cycle that remains standard on centralised exchanges. Hyperliquid, for example, settles at one-eighth of the computed eight-hour rate each hour, with a per-hour cap. This reduces the size of each individual settlement spike. Drift follows a similar hourly cadence. Every venue sets its own formula, cadence, and caps — there is no universal standard.

Funding is a real economic cost, not a protocol fee. At elevated annualised rates, holding a leveraged long for a week is a meaningful drag. A 20% annualised funding rate is roughly 0.38% per week on notional; at 10x leverage, that is 3.8% on your capital per week just to stay open. Retail traders routinely underweight this cost.

The natural counterforce is the cash-and-carry basis trade: hold spot long, short the perp, and pocket the funding as yield. Arbitrageurs executing this trade are precisely what pulls funding back toward zero — they increase short open interest, reducing the imbalance.

How Liquidations Work: Margin, Triggers, and Execution

Every leveraged position has two margin thresholds: initial margin (the collateral required to open) and maintenance margin (the lower minimum required to stay open). As losses erode account equity toward the maintenance level, the position becomes eligible for liquidation. The trigger is the mark price, not the last-traded price.

Worked example. A 10x BTC long controls $1,000 notional with $100 initial margin. If maintenance margin is 5% of notional ($50), the position is liquidated when equity falls from $100 to $50 — a $50 adverse move in the position's value. On Hyperliquid, maintenance margin is roughly half the initial margin at maximum leverage.

Most modern onchain engines do not immediately force-close an entire large position. Partial liquidation closes a portion first to reduce the position's risk, sometimes after a brief cooldown before a full liquidation is attempted. This limits the slippage a single forced close imposes on the order book. On Hyperliquid, a backstop liquidation through the HLP vault triggers when equity falls below two-thirds of maintenance margin and the residual cannot be cleared by regular liquidators.

Isolated margin caps the loss on a single position at its assigned collateral — a blow-up in one market cannot touch the rest of the account. Cross margin pools all account equity: a position can survive longer because the entire account absorbs drawdown, but a sharp adverse move can wipe the whole account at once. This is the single most important risk choice traders make before opening a position.

Liquidation cascades form when many traders share similar leverage and entry prices. A price drop triggers forced sells; those forced sells push mark price lower, triggering the next tier of accounts; the loop self-reinforces. This mechanism is structurally similar to how on-chain lending uses collateral and liquidations — the same reflexive feedback applies.

Backstops: Insurance Funds, ADL, and Pool-as-Counterparty

When a position is liquidated at a price that leaves the account in negative equity, the protocol has a gap — that gap is bad debt. Three layers exist to absorb it.

Insurance funds are the first backstop. They accumulate capital from the margin buffer absorbed during normal liquidations and from trading fees. They are sized to handle isolated large liquidations but not correlated mass liquidations across the whole market.

Hyperliquid's HLP vault is unusual: it is a publicly depositable pool that simultaneously acts as market maker, liquidator of last resort, and insurance backstop. Depositors earn yield from fees and liquidation profits — but they accept the residual exposure when a bankrupt position cannot be closed at market. In March 2025, a trader deliberately withdrew margin to engineer a large loss onto HLP, prompting Hyperliquid to tighten its maximum leverage caps. HLP's dual role as yield-bearing vault and backstop creates a risk profile that depositors need to evaluate explicitly.

Drift Protocol runs per-asset insurance fund pools funded by trading, borrowing, and liquidation fees. Stakers earn a share of fees but accept first-loss risk. Isolated high-volatility markets receive dedicated funds, which prevents a blow-up in one asset from contaminating the insurance pools for others.

On dYdX v4, the insurance fund adjusts liquidation order prices away from the oracle price to improve fill probability. Auto-deleveraging (ADL) triggers when an account balance turns negative after insurance-fund intervention fails to cover the gap.

GMX v1 took a different approach: the GLP pool was the sole counterparty for all trades and served as the implicit insurance layer — every trader profit was a GLP loss. After an exploit in 2025 led to GLP being deprecated, GMX v2 replaced it with isolated per-market pools and stronger oracle protections. Pool-as-counterparty designs share this structural tension between liquidity provision and loss absorption — LP yield exists because LPs absorb the tail risk that traders generate.

Auto-deleveraging (ADL) is the mechanism of last resort across most protocols. When the insurance fund is exhausted, ADL force-closes profitable traders — ranked by a combined profit-and-leverage measure — against the bankrupt position. Their gains are crystallised and used to offset the protocol's loss. It is more predictable than socialised loss, an older approach that spreads remaining losses pro-rata across all winning-side positions. Most modern onchain venues prefer ADL.

Risks to Understand Before You Participate

The three mechanisms are designed to be self-correcting under normal conditions: funding keeps the perp near spot, the liquidation engine removes insolvent positions, and insurance absorbs the residual. Under stress they degrade in a specific sequence.

Sustained high funding is both a cost and a signal. Annualised funding above roughly 20% indicates leverage concentration — many traders holding leveraged longs that are paying to stay open. It is not automatically a directional signal, but it does mean the system is running hot.

Thin order books amplify liquidations. Each forced close is a market order. If the order book is thin, the order moves the mark price, which brings the next tier of positions to their maintenance level. This amplification was exactly what happened in October 2025: funding had already signalled crowded longs, then book depth collapsed, then cascading liquidations moved mark prices sharply enough to activate ADL on Hyperliquid for the first time in over two years.

Insurance funds have limits. They are sized for normal distributions of liquidation events. Correlated mass liquidations — the kind produced by a macro shock hitting an over-leveraged market — can exhaust them, and the fallback to ADL forces profitable traders to absorb the excess. The composability and systemic risk that exists across DeFi protocols is one reason correlated stress events are common.

Cross margin amplifies both survival and wipeout. It is not inherently worse than isolated margin, but it requires monitoring the entire account rather than just a single position. A trader managing a portfolio of cross-margin positions across multiple assets is exposed to correlation risk they may not be modelling.

How the Three Mechanisms Interact

Funding, liquidation, and the backstop layer are not independent. A week of elevated funding signals the leverage concentration that makes cascades more likely. Thin books make each liquidation more disruptive. A stressed insurance fund routes that disruption to profitable traders through ADL.

October 2025 demonstrated all three failure modes converging: sustained high funding, a sharp book-depth collapse, and an insurance vault pushed to its ADL trigger. The protocols continued to operate — no bad debt leaked to users who were not active participants — but the event showed that even hourly funding settlement, partial liquidation sequences, and mature insurance vaults have capacity limits.

For traders, the operational takeaways are straightforward: monitor funding cost as an ongoing drag on position P&L, prefer isolated margin when entering high-volatility or less-liquid markets, and treat elevated sustained funding as a warning about cascade risk rather than a directional trade signal.

Key Takeaways


Further Reading

What DeFi Actually Is: Permissionless Finance Explained From the Bottom Up

What DeFi Actually Is: Permissionless Finance Explained From the Bottom Up

DeFi replaces banks and brokers with public smart contracts. Here is what that actually means, mechanically, and why one change cascades into everything else.

6 min read
What an AMM Really Is: The x·y=k Invariant Explained With $100 Examples

What an AMM Really Is: The x·y=k Invariant Explained With $100 Examples

An automated market maker uses a simple formula, x times y equals k, to price every trade. Here is what that means, with $100 examples.

3 min read
Impermanent Loss: Why Providing Liquidity Isn't Free Money

Impermanent Loss: Why Providing Liquidity Isn't Free Money

Impermanent loss is the hidden cost of being an AMM liquidity provider. Here's the math, a reference table, and a checklist to decide if the fees are worth it.

4 min read

Join Our Newsletter

Get a friendly update from us once a month. No spam, just the latest from Zelcore.

Join Our Newsletter
    Perpetual Funding Rate and Liquidation Mechanics Explained | Zelcore