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:
FundingRate = AveragePremiumIndex(P) + clamp(InterestRate - P, -0.0005, 0.0005)Where:
P (Premium Index) = average deviation between perp price and oracle price
InterestRate = 0.000125 (0.0125%) 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:
premium = impact_price_difference / oracle_pricewhere
impact_price_difference = max(impact_bid_px - oracle_px, 0)
- max(oracle_px - impact_ask_px, 0)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
Premium = (Impact Bid - Oracle) / Oracle
Premium = (10,100 - 10,000) / 10,000 = 0.01 (1%)Step 2: Clamp the Interest Differential
Clamped = clamp(InterestRate - Premium, -0.05%, 0.05%)
Clamped = clamp(0.01% - 1%, -0.05%, 0.05%) = -0.05%Step 3: Compute Funding Rate
Funding Rate = Premium + Clamped
Funding Rate = 1% + (-0.05%) = 0.95%Step 4: Compute Funding Payment
Funding Payment = position_size × oracle_price × funding_rate
Funding Payment = 10 × $10,000 × 0.0095 = $950You would pay $950 in funding to shorts at the next hourly interval.
Equities and Off-Hour Funding
For equity perpetuals, Margin Trade adjusts funding based on the oracle price provided by Polygon.io. During off-hours (when traditional markets are closed), funding rates are smoothed using decayed EMA-based premiums to avoid artificial volatility from illiquid pre/post-market activity.
Funding remains active 24/7 and ensures convergence between equity perp prices and their last known oracle value.
Last updated

