Bullet
  • Introduction
  • Bullet Network
    • Design Goals
    • Architecture
      • Sequencer
      • Full & Light Nodes
      • Zero-knowledge Virtual Machine
      • State Database
      • Data Availability
      • Bridge
      • Oracle
      • Gas & Paymaster
      • Wallet Abstraction
    • Network Specifications
    • Build on Bullet
      • REST/WS APIs
      • BulletSVM
    • Audits
  • BulletX (Exchange)
    • Products
    • Architecture
      • Orderbook
      • Unified Margin Engine
      • Lending Engine
      • Liquidation
      • Insurance Fund & ADL
      • Funding
      • Price Indices
      • Order Types & TP/SL
      • Fees
      • Vaults
    • Contract Specifications
  • Tokenomics
    • Bullet Token
    • ZEX Token Migration
  • FAQs
    • Frequently Asked Questions
  • Campaigns
    • Testnet Trading Cup
Powered by GitBook
On this page
  1. BulletX (Exchange)
  2. Architecture

Funding

Funding rates are an important rebalancing mechanism with which perpetuals markets track their underlying asset.

PreviousInsurance Fund & ADLNextPrice Indices

Last updated 1 month ago

Perpetual contracts don’t expire, so to keep their prices in line with spot markets, we use a funding rate — a recurring payment between long and short traders. It’s designed to reduce price divergence between the perpetual and spot price.

When the perp price is higher than spot, longs pay shorts. When it’s lower, shorts pay longs. This creates an incentive for the market to rebalance itself.

Funding Calculation

Funding is calculated and applied at the start of every hour, based on two components:

  1. A fixed interest rate of 0.00125% per hour (≈11.6% APR) which represents the cost to borrow spot

  2. A Premium Index, which tracks how far perp prices deviate from spot

We sample the Premium Index every 5 minutes, then compute a time-weighted average (TWAP) over the hour to smooth out volatility.

Step 1: Premium Index ( P )

P=max(0,Impact Bid Price−Index Price)−max(0,Index Price−Impact Ask Price)Index PriceP= \frac{\text{max}(0,\text{Impact Bid Price}−\text{Index Price})−\text{max}(0,\text{Index Price}−\text{Impact Ask Price})}{\text{Index Price}}P=Index Pricemax(0,Impact Bid Price−Index Price)−max(0,Index Price−Impact Ask Price)​

  • Impact Price: Simulated buy execution price based on an order with a predefined Impact Margin Notional (IMN)

  • Index Price: Spot price reference

This captures price dislocation and slippage pressure from either side of the book.

Step 2: Funding Rate ( F )

  • The hourly interest rate (I=0.00125%)

  • The first clamp limits the premium from diverging from the interest rate by ±0.00625% per hour

  • The second clamp keeps the final funding rate bounded within ±4% (~350% APR)

This ensures the funding rate stays within reasonable bounds, even during volatile periods.

Step 3: Funding Payment

If you’re holding a position at the funding time, the amount paid or received is:

The payment flows between longs and shorts depending on whether the funding rate is positive or negative.

F=clamp(P+clamp(I−P,0.0000625,−0.0000625),0.04,−0.04)F=\text{clamp}(P+\text{clamp}(I−P, 0.0000625, −0.0000625), 0.04, -0.04)F=clamp(P+clamp(I−P,0.0000625,−0.0000625),0.04,−0.04)
Funding Payment=Position Notional×Mark Price×F\text{Funding Payment} = \text{Position Notional} \times \text{Mark Price} \times FFunding Payment=Position Notional×Mark Price×F