Funding
Funding rates are the mechanism that keeps perpetual futures prices on Margin Trade aligned with the price of their underlying assets.
Funding is a periodic peer-to-peer payment exchanged directly between longs and shorts — Margin Trade does not collect any portion of the funding payment.
When the perpetual contract trades above the spot (oracle) price, the funding rate is positive, and longs pay shorts. When it trades below the oracle price, the funding rate is negative, and shorts pay longs.
Funding ensures that perp prices remain anchored to the fair market value of the underlying asset by incentivizing traders to take the opposite side of imbalanced markets.
Structure of the Funding Rate
Each funding rate consists of two main components:
Interest Rate Component Represents the difference between the cost of holding USD collateral and the cost of borrowing the underlying asset.
Fixed at 0.01% per 8 hours (≈ 0.00125% per hour)
Equivalent to ~11.6% annualized APR paid from longs to shorts
Premium Component Reflects the deviation between the perp market price and the underlying oracle price.
Positive premium → longs pay shorts
Negative premium → shorts pay longs
Funding Interval
Funding payments occur every hour on Margin Mainnet. The hourly funding payment for each position is calculated as:
funding_payment = position_size × oracle_price × funding_ratePositive funding_rate → long pays short
Negative funding_rate → short pays long
The oracle price (not the mark price) is used for notional value conversion
Funding Rate Formula
The funding rate is calculated according to:
Where:
P (Premium Index) = average deviation between perp price and oracle price
InterestRate = 0.00125% per hour
clamp(x, a, b) limits the value of x within the range [a, b]
Funding is sampled and recalculated every few seconds, then averaged over each 1-hour interval.
Premium Index Calculation
The Premium Index measures the directional bias between perp and spot markets, derived as:
where
impact_bid_pxandimpact_ask_pxare the average execution prices for a fixed notional order size on each side of the order bookThe impact notional size is defined per market (e.g., $100k for BTC/ETH perps, smaller for low-liquidity assets)
This ensures the funding rate reflects true market depth, not transient micro-price fluctuations.
Funding Cap
To prevent extreme swings in funding rates during volatile conditions, Margin Trade enforces:
Funding rate cap: ±4% per hour
Funding interval: fixed at 1 hour for all assets
This cap is conservative compared to most centralized exchanges, helping stabilize funding under high volatility or low-liquidity conditions.
Example Calculation
Suppose you hold a 10 BTC long position on the BTC-USDC perp.
Interest Rate
0.01% (8h)
Perp Impact Bid Price
$10,100
Oracle (Spot) Price
$10,000
Funding Interval
1 hour
Position Size
10 BTC
Step 1: Compute Premium
Step 2: Clamp the Interest Differential
Step 3: Compute Funding Rate
Step 4: Compute Funding Payment
You would pay $950 in funding to shorts at the next hourly interval.
Equities and Off-Hour Funding
For equity perpetuals, funding behavior differs between market hours and off-hours to reflect the availability of reliable underlying price signals.
Market Hours
During regular trading hours, funding for equity perpetuals operates identically to crypto perpetuals:
The premium component is derived from the deviation between the perp market price and the equity oracle price provided by Polygon.io (Massive).
The full funding rate formula applies:
Premium component
Interest rate component
Funding payments are exchanged hourly between longs and shorts.
Off-Hours (Oracle Unavailable or Market Closed)
When traditional equity markets are closed (post-market, overnight, pre-market), or when the equity oracle is unavailable:
The premium component of funding is disabled
Only the interest rate component applies
Specifically:
Funding is charged at a fixed interest rate of 0.01% per 8 hours (≈ 0.00125% per hour)
No premium-based funding transfers occur between longs and shorts
Funding remains predictable and symmetric, independent of short-term perp price movements
This design ensures that:
Traders are not penalized by artificial premiums caused by illiquid off-hours trading
Funding does not amplify volatility when reliable oracle price discovery is unavailable
Positions continue to incur a modest, time-based carry cost reflecting capital usage
Last updated

