Hibachi Docs
  • Hibachi Docs
    • About Hibachi
      • Key Features
    • Getting Started
      • Signing Up
      • Trading on Hibachi
      • Withdrawing From Hibachi
      • Transferring on Hibachi
    • Trading
      • Limits
      • Pricing
      • Fees
      • Order Types
      • Margining
      • Risk Panel
      • Liquidations
      • Subaccounting
      • Funding
      • Insurance Fund
      • Temp Markets
    • Key Management
    • Transparency
    • API & Developer Tools
    • Design Assets
  • Hibachi Rewards
    • Points
    • Referrals
    • Flame Roll Lottery
Powered by GitBook
On this page
  1. Hibachi Docs
  2. Trading

Funding

Funding rates for crypto perpetual contracts help keep the contract price aligned with the underlying asset. This peer-to-peer fee is paid by one side (long or short) to the other, with no exchange fees collected.

The rate is based on the difference between the contract's price and the spot price. Longs pay shorts when the contract price is higher than the spot price, and shorts pay longs when it's lower.

On Hibachi, funding payments are made every 8 hours—at midnight UTC, 8:00 AM UTC, and 4:00 PM UTC—and directly adjust contract balances. This mechanism helps prevent significant price disparities between the contract and the underlying asset, promoting market alignment.


Calculations

The funding process operates in discrete intervals of 1 second. There are 28,800 seconds in an 8-hour interval.

t represents the current second within the 8-hour interval.

Spot Index Price

Calculated by sampling the spot index price (si) from the oracle every second and compute its moving average from second 0 to t. This moving average si serves as the live spot index for funding estimation. At t = 28,800, it becomes the Final Spot Index Price (fsi).

Perp Index Price

Calculated by sampling the perp orderbook's mid-price every second and compute its moving average from second 0 to t. This moving average serves as the live perp index (pi) for funding estimation. At t = 28,800, it becomes the Final Perp Index Price (fpi).

Funding Calculations

Before the end of the period (t < 28,800), the Predicted Funding Rate is estimated as:

Predicted Funding Rate=pi−sisi\text{Predicted Funding Rate} = \frac{\text{pi} - \text{si}}{\text{si}}Predicted Funding Rate=sipi−si​

At the end of the period (t = 28,800), the Final Funding Rate is calculated as:

Funding Rate=fpi−fsifsi\text{Funding Rate} = \frac{\text{fpi} - \text{fsi}}{\text{fsi}}Funding Rate=fsifpi−fsi​

PreviousSubaccountingNextInsurance Fund

Last updated 5 months ago