Funding
Overview
Funding fees are periodic payments exchanged between long and short positions to keep the perpetual contract price anchored to the spot market price.
How Funding Works
Settlement Frequency
Every 1/4/8 hours (It depends on the specific ontract)
Who Pays Whom
Depends on the funding rate at settlement time
Eligibility
Only traders holding positions at the exact settlement time pay/receive funding
Payment Direction
Positive (Perp > Spot)
Pay funding to shorts
Receive funding from longs
Negative (Perp < Spot)
Receive funding from shorts
Pay funding to longs
💡 Why? When the perp trades above spot (positive funding), longs pay shorts to incentivize more shorts and fewer longs, pulling the price back down. Vice versa for negative funding.
Funding Payments Calculation
The funding payment for your position is calculated as:
Funding Payments = Position Size * Mark Price * Funding Rate
Where:
Position Size = Absolute size in base asset (e.g., BTC, ETH)
Mark Price = Fair value at settlement time (see Mark Price)
Funding Rate = Rate at settlement time (explained below)
Sign convention:
Positive payment = You pay (debited from margin)
Negative payment = You receive (credited to margin)
Funding Rate Calculation
The funding rate is calculated using a multi-step formula to balance market premium with interest rate differentials:
Funding Rate = clamp (F, max, min)
Where:
F = Base funding rate (calculated below)
min = Minimum cap (e.g., -0.05% per 8 hours)
max = Maximum cap (e.g., +0.05% per 8 hours)
💡 clamp() limits the funding rate to prevent extreme values. This protects traders from excessive funding costs during volatile periods.
Base Funding Rate (F)
F = P + clamp (I - P, 0.05%, −0.05%)
Where:
P = Average Premium Index (perp price deviation from spot)
I = Interest Rate (cost-of-carry component)
Average Premium Index (P)
The Premium Index measures how much TxFlow's perpetual price deviates from the Oracle (spot) price. Formula:
P = Time-Weighted Average of Premium Index over 8 hours
Where:
Premium Index is sampled every 5 seconds
8 hours = 5,760 samples (8 × 3,600 ÷ 5)
Each Premium Index sample is calculated as:
Premium Index = (Impact Mid Price − Oracle Price) ÷ Oracle Price
Where:
Impact Mid Price = (Impact Bid Price+Impact Ask Price) ÷ 2
What is "Impact Price"?
Impact Bid/Ask Price is the average fill price to execute a fixed notional size (Impact Margin Notional) on each side of the order book.
Impact Bid Price
Average price to SELL the Impact Margin Notional (execute against bids)
Impact Ask Price
Average price to BUY the Impact Margin Notional (execute against asks)
Impact Margin Notional (IMN)
Fixed USD size used to measure depth = $200 × Max Leverage (Tier 1)
Interest Rate (I)
The Interest Rate represents the cost-of-carry differential between USD and the crypto asset.
I = 0.01% per 8-hour period
Annualized: ~10.95% (0.01% × 3 settlements/day × 365 days)
This rate is fixed and reflects typical funding practices on major CEXs (Binance, OKX, etc.).
Funding Rate Caps
To protect traders from extreme funding costs:
Max Funding Rate
eg. +0.05% per 8 hours
Prevents excessive payments during extreme bullish sentiment
Min Funding Rate
eg. -0.05% per 8 hours
Prevents excessive payments during extreme bearish sentiment
Example: If calculated F = 0.08%, the actual funding rate is capped at 0.05%.
Related Pages
Calculation of Mark Price and Oracle Price
Last updated
