For the complete documentation index, see llms.txt. This page is also available as Markdown.

Funding

Funding fees are periodic payments exchanged between long and short positions to keep the perpetual contract price anchored to the spot market.

Overview

Aspect
Detail

Settlement Frequency

Every 1, 4, or 8 hours (depends on the specific contract)

Who Pays Whom

Determined by the funding rate at settlement time

Eligibility

Only traders holding positions at the exact settlement timestamp pay or receive funding

Funding rate
Long Positions
Short Positions

Positive (perp > spot)

Pay funding to shorts

Receive funding from longs

Negative (perp < spot)

Receive funding from shorts

Pay funding to longs

When the perp trades above spot (positive funding), longs pay shorts to incentivize more short selling and pull the price back down. The inverse applies for negative funding.

Funding payment calculation

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 (see below)

Sign convention:

  • Positive payment = You pay (debited from margin)

  • Negative payment = You receive (credited to margin)

Funding rate calculation

Where clamp() limits the result to prevent extreme values during volatile periods.

Base Funding Rate (F)

Where:

  • P = Average Premium Index

  • I = Interest Rate

Average Premium Index (P)

The Premium Index measures how much TxFlow's perpetual price deviates from the Oracle Price. It is sampled every 5 seconds over an 8-hour window (5,760 samples total):

Each sample:

  • 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) = $200 × Max Leverage (Tier 1)

Interest Rate (I)

The Interest Rate represents the cost-of-carry differential between USD and the crypto asset.

This rate is fixed and reflects standard funding practices on major CEXs.

Funding Rate Caps

Cap
Value
Purpose

Maximum

+0.05% per 8 hours

Prevents excessive costs during extreme bullish sentiment

Minimum

-0.05% per 8 hours

Prevents excessive costs during extreme bearish sentiment

Example: If calculated F = 0.08%, the actual funding rate applied is capped at 0.05%.

Pages
Description

Calculation of Mark Price and Oracle Price

Last updated

Was this helpful?