Appearance
Funding Rate
Overview
Perpetual futures contracts differ from traditional futures in that they don't have an expiration date. To maintain price convergence with the spot market, Perpetuity uses a funding rate mechanism.
All parameters below are subject to change after Alpha.
No fees on funding
The funding mechanism has one purpose and that is to keep the price in line with the index. Longs receive full funding from shorts, and shorts receive full funding from longs. As a result, Perpetuity doesn't take any fees on funding.
Key Parameters
- Settlement Period: Hourly
- Fixed Interest Rate: 0.00125% per hour (0.01% base, 0.03% daily, 10.95% annually)
- Impact Price The impact price is calculated by simulating a trade of a fixed notional value through each side of the orderbook
- Impact Notional: $2,000 (during alpha phase)
- Oracle Sources: Switchboard, Pyth, and Chaos Labs feed (updated every block)
Funding Rate Formula
Funding Rate (F) = (Premium Index (P) + clamp(base interest rate (.01%) - Premium Index (P), -0.0005, 0.0005)) / 8
Premium Index Calculation
The premium index is calculated as:
Premium Index = impact_price_difference / oracle_price
Where:
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)
Perpetuity calculates the Premium Index every 5 seconds (12 premium index data points in a minute). The twap is based off the past 5760 calculations. It is settled hourly.
Impact Price Calculation
Step 1: Order Book Analysis
- Buy Orders: Analyze Ask side (sellers)
- Prices sorted from lowest to highest
- Quantities available at each price level
- Sell Orders: Analyze Bid side (buyers)
- Prices sorted from highest to lowest
- Quantities available at each price level
Step 2: Simulate Order Fills
For Buy Orders:
- Start at lowest Ask price (Ask₁) with available quantity (Size_Ask₁)
- Calculate fill quantity:
fill_qty₁ = min(Q, Size_Ask₁)
- Record fill:
fill_qty₁
units atAsk₁
- Update remaining quantity:
Q_remaining = Q - fill_qty₁
- If
Q_remaining > 0
, move to next Ask price and repeat
For Sell Orders:
- Start at highest Bid price (Bid₁) with available quantity (Size_Bid₁)
- Calculate fill quantity:
fill_qty₁ = min(Q, Size_Bid₁)
- Record fill:
fill_qty₁
units atBid₁
- Update remaining quantity:
Q_remaining = Q - fill_qty₁
- If
Q_remaining > 0
, move to next Bid price and repeat
Step 3: Calculate Impact Price
- Sum the cost/proceeds from each fill step:
Σ(fill_qtyᵢ * Priceᵢ)
- Divide by original order quantity (Q)
Important Notes
- Funding rates settle hourly
- Updates may take a few minutes to reflect in user accounts
- The impact notional value may increase as the platform grows
- Oracle selection is biased by the internal impact price
Funding Rate Calculations
Example one: Shorts Paid
BTC oracle price: $10,100 BTC impact bid price: $10,109 BTC impact ask price: $10,110
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)
impact_price_difference = max(10109 - 10100, 0) - max(10100 - 10110, 0)
impact_price_difference = max(9, 0) - max(-10, 0)
impact_price_difference = 9 - 0
impact_price_difference = 9
Premium Index = impact_price_difference / oracle_price
Premium Index = 9 / 10100
Premium Index ≈ 0.000891 (or 0.0891%)
Base interest rate = 0.01% = 0.0001
Premium Index (P) = 0.000891
base interest rate - Premium Index = 0.0001 - 0.000891 = -0.000791
clamp(-0.000791, -0.0005, 0.0005) = -0.0005 (since -0.000791 is less than -0.0005)
Funding Rate = (0.000891 + (-0.0005)) / 8
Funding Rate = 0.000391 / 8
Funding Rate ≈ 0.0000489 (or 0.00489%) for the hour
Example two: Longs Paid
When the ask impact price is significantly below the oracle price, longs get paid.
BTC oracle price: $10,100 BTC impact bid price: $10,000 BTC impact ask price: $10,090
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)
impact_price_difference = max(10000 - 10100, 0) - max(10100 - 10090, 0)
impact_price_difference = max(-100, 0) - max(10, 0)
impact_price_difference = 0 - 10
impact_price_difference = -10
Premium Index = impact_price_difference / oracle_price
Premium Index = -10 / 10100
Premium Index ≈ -0.000990 (or -0.0990%)
Base interest rate = 0.01% = 0.0001
Premium Index (P) = -0.000990
base interest rate - Premium Index = 0.0001 - (-0.000990) = 0.001090
clamp(0.001090, -0.0005, 0.0005) = 0.0005 (since 0.001090 is greater than 0.0005)
Funding Rate = (-0.000990 + 0.0005) / 8
Funding Rate = -0.000490 / 8
Funding Rate ≈ -0.00006125 (or -0.006125%) for the hour
Example three: No Imbalance
Sometimes the funding rate isn't imbalanced. In this case, there is no premium and the base interest rate is used.
BTC oracle price: $10,100 BTC impact bid price: $10,000 BTC impact ask price: $10,110
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)
impact_price_difference = max(10000 - 10100, 0) - max(10100 - 10110, 0)
impact_price_difference = max(-100, 0) - max(-10, 0)
impact_price_difference = 0 - 0
impact_price_difference = 0
Premium Index = impact_price_difference / oracle_price
Premium Index = 0 / 10100
Premium Index = 0 (or 0%)
Funding Rate = 0 + clamp(0.0001 - 0, -0.0005, 0.0005)
Funding Rate = 0 + clamp(0.0001, -0.0005, 0.0005)
Funding Rate = 0 + 0.0001 (since 0.0001 is within the clamp range)
Funding Rate = 0.0001
Final Funding Rate = 0.0001 / 8
Final Funding Rate ≈ 0.0000125 (or 0.00125%) per hour
Example four: Clamped Calculation
When the price isn't very imbalanced, the funding uses the clamp.
BTC oracle price: $10,100 BTC impact bid price: $10,102 BTC impact ask price: $10,103
impact_price_difference = max(impact_bid_px - oracle_px, 0) - max(oracle_px - impact_ask_px, 0)
impact_price_difference = max(10102 - 10100, 0) - max(10100 - 10103, 0)
impact_price_difference = max(2, 0) - max(-3, 0)
impact_price_difference = 2 - 0
impact_price_difference = 2
Premium Index = impact_price_difference / oracle_price
Premium Index = 2 / 10100
Premium Index ≈ 0.000198 (or 0.0198%)
Base interest rate = 0.01% = 0.0001
Premium Index (P) = 0.000198
base interest rate - Premium Index = 0.0001 - 0.000198 = -0.000098
clamp(-0.000098, -0.0005, 0.0005) = -0.000098 (since -0.000098 is within the clamp range)
Funding Rate = (0.000198 + (-0.000098)) / 8
Funding Rate = 0.0001 / 8
Funding Rate ≈ 0.0000125 (or 0.00125%) for the hour
Things That Are Different
No Max Clamp
Unlike most exchanges, we do not currenlty have a max clamp. However, we expect this to change to .5% an hour across all assets.