Skip to content
Request a review

How Perpetual DEXs Work · Perpetual Contracts · 2/4

Funding Rates Explained: How Perpetual Futures Funding Works

In short: the funding rate is a periodic payment between longs and shorts that pulls a perp's price toward the spot (oracle) price. When the perp trades above spot, longs generally pay shorts; well below it, shorts pay longs. On Hyperliquid it is paid every hour, at one-eighth of an 8-hour rate equal to the average premium plus a 0.01% interest term, with the gap between the interest rate and the premium clamped to ±0.05%.

Funding rates are the heartbeat of perpetual futures markets. They determine who pays whom and they keep prices aligned. If you understand funding rates deeply, you understand the economic engine behind every perp DEX — and one of the most important settings in any market you operate.

How Funding Rates Are Calculated

At its core, the funding rate measures the premium or discount of the perpetual price relative to the spot (index or oracle) price. The formula varies by platform, but the general structure is:

Premium = (Perp Price - Oracle Price) / Oracle Price

Most venues then add an interest rate component and clamp the result. Hyperliquid follows the CEX-style formula, expressed as an 8-hour rate (Funding docs):

Funding Rate (8h) = Average Premium + clamp(Interest Rate - Average Premium, -0.05%, +0.05%)

For example, if the BTC oracle is $60,000 and the impact bid is $60,012:

Notice what the clamp does: whenever the premium is within ±0.05% of the interest rate, the funding rate lands exactly on the interest rate.

Long/Short Dynamics

The funding rate reflects the balance of demand between longs and shorts:

Positive Funding (most common in bull markets):

Negative Funding (common during crashes):

Near-baseline Funding:

Why Funding Is Usually Positive

On venues that use this formula, funding is positive most of the time partly by construction: with no premium at all, the interest component alone makes longs pay shorts 0.01% per 8 hours — about 11.6% APR on Hyperliquid. A sustained discount is needed to push funding negative.

Long-biased demand adds to this in bull markets, but it is not the whole story. On Hyperliquid between April and September 2026, hourly funding was positive in about 81% of hours for BTC, 84% for ETH and 89% for HYPE — and in 46%, 55% and 71% of hours respectively it sat exactly at the baseline rate. Average funding over that period annualized to roughly 5.8% (BTC), 6.5% (ETH) and 9.5% (HYPE), all below the 11.6% baseline. (Computed from the public fundingHistory endpoint of the info API; past funding says nothing about future funding.)

The Math of Funding Payments

Let's work through a concrete example:

You hold a $100,000 long BTC-PERP position on Hyperliquid. The current 8-hour funding rate is +0.01%.

Funding is charged on position notional, not on margin. On Hyperliquid the notional is computed with the oracle price, not the mark price. For a leveraged long, this is a constant drag that is easy to overlook.

Funding on Different Platforms

Not all funding mechanisms are identical:

Platform Funding Interval Mechanism
Hyperliquid Every hour (1/8 of the 8h rate) Impact-price premium + interest, clamped; capped at 0.5%/hour (docs)
Hyperliquid HIP-3 Every hour Mid-price premium; deployer sets funding multiplier, interest rate and clamp (funding, deployer actions)
dYdX Every hour Premium averaged over the hour + interest (0% default for cross markets) (docs)
Binance Usually 8 hours Premium + interest (0.01% per interval), clamped (FAQ)

If you deploy a HIP-3 market, the funding multiplier, interest rate and clamp are your levers: set them too weak and the perp can drift from your oracle; set them too strong and you make holding positions needlessly expensive.

Funding in Code

rdk-funding is a small Rust crate that does this calculation as a deterministic state machine: premium from mark and index, divided by 8 to get the hourly rate, capped, then settled against every open position each hour. It follows Hyperliquid's shape with three simplifications: it leaves out the interest term (so with no premium it charges nothing rather than the 0.01% baseline), takes the premium from the mark price rather than impact prices, and charges on mark-price notional where Hyperliquid uses the oracle price. Read it next to this lesson to see where each number above enters the code.

Funding and the Basis Trade

If funding is positive, someone who is short the perp receives it. Being naked short exposes you to price risk, so some traders short the perp while holding an equal amount of spot. Spot and perp moves offset each other, and the position collects funding while it lasts.

This is the basis (or carry) trade, and it matters to operators because these traders supply the shorts that pull a premium back toward the oracle. It is not risk-free: funding can turn negative, spot and perp prices can drift apart, and fees, borrowing costs and liquidation risk on the perp leg all apply.

Key Takeaways