Funding Rate
Last updated
Last updated
Funding rates in crypto perpetual contracts, as implemented in Foundation, are a critical mechanism for aligning the price of the contract with the spot price of the underlying asset. This ensures market stability and reflects the true market value of the assets.
The premium component, however, varies according to the difference between the perpetual contract’s price and the underlying asset’s spot price, as determined by an oracle. When the contract's price is higher than the oracle price, the funding rate becomes positive, and long position holders pay those in short positions. Conversely, when the contract's price is below the oracle price, short position holders pay long position holders.
The funding rate payment is automatically deducted from the account balance every hour, using a predefined formula.
Where
S is the size of the position (positive if long, negative if short)
P is the mark price for the market
R is the 1-hour funding rate
The 1-hour funding rate is determined by dividing the standard 8-hour funding rate by 8. The calculation of the 8-hour funding rate itself involves a more complex formula, which is a common industry practice.
Where
Average Premium is calculated Time-to-funding weighted Average of Premium Index of the 60 Premiums calculated over the course of the last hour
Interest Rate: 0.01%
The function clamp(x, min, max)
means that:
if (x < min), then x = min;
if (x > max), then x = max;
if max ≥ x ≥ min, then return x.
A +/- 0.05% damper is also added
The Funding Rate 8 hours is capped within the range of capped-funding-rate number which is equaled to 0.75 x Maintenance Margin Fraction (MMF). The MMF will vary from market to market.
The main component of the funding rate is a premium that takes into account market activity for the perpetual. It is calculated for each market, every minute (at a random point within the minute) using the formula:
Where the impact bid and impact ask prices are defined as:
Impact Bid Price = Average execution price for a market sell of the Impact Notional Value
Impact Ask Price = Average execution price for a market buy of the Impact Notional Value
Impact Notional Value = $200 / Initial Margin Fraction