Ostium Documentation
  • ๐Ÿ‘‹Welcome to Ostium
  • Getting Started
    • ๐Ÿ‘๏ธOverview
    • ๐ŸŽฏIntroduction: Our Thesis
    • ๐Ÿ’พGlossary
  • Ostium Trading Engine
    • ๐Ÿ๏ธOverview
    • ๐Ÿ“–Opening Trades
    • ๐Ÿฅ…Holding Trades
      • Funding Rate
      • Rollover Fee
    • ๐Ÿ“˜Closing Trades
    • ๐Ÿ“นStep-By-Step Tutorial
      • Connecting to Ostium
      • Fund Wallet/Account
      • Opening a Trade
      • Editing a Trade
      • Closing a Trade
    • ๐Ÿ“Order Types
  • ๐Ÿ“ˆStocks: Day Trading
  • ๐Ÿ’ฒFee Breakdown
  • Shared Liquidity Layer
    • ๐ŸฆOverview
    • ๐Ÿ’ฆLiquidity Buffer
    • ๐Ÿ“ŠMarket Making Vault
      • Deposit
      • Withdraw
      • OLP token
    • โ‰๏ธRisks
  • Supporting Infrastructure
    • ๐Ÿ—๏ธOverview
    • ๐Ÿ”ฎPrice Oracle
    • ๐Ÿ’ปAutomations
    • ๐Ÿ’พAPI & SDK
  • Security
    • ๐Ÿ”Smart Contract Audits
    • ๐Ÿ’ฐEconomic Audit
  • LEGAL
    • Terms of Use
    • Disclaimer
Powered by GitBook
On this page
  1. Ostium Trading Engine
  2. Holding Trades

Funding Rate

The funding rate is a mechanism exclusive to crypto perpetual pairs that periodically transfers payments between longs and shortsโ€”longs pay shorts when the rate is positive, and shorts pay longs when itโ€™s negative. Itโ€™s a zero-sum fee settled directly among traders, designed to incentivize traders to neutralize their delta exposure.

Itโ€™s determined by three components:

  1. Open-Interest Imbalance (a bigger imbalance leads to bigger funding rates)

  2. Theoretical Funding Rate (based on open-interest imbalance)

  3. Convergence Regime (how quickly the current rate moves toward the theoretical rate)


1. Open-Interest Imbalance

We normalize long/short open interest into a single variable xxx:

x=OIlongโˆ’OIshortOIcapsโ€‰,xโˆˆ[โˆ’1,1] x = \frac{\mathrm{OI}_{\mathrm{long}} - \mathrm{OI}_{\mathrm{short}}}{\mathrm{OI}_{\mathrm{caps}}} \,,\qquad x \in [-1,1]x=OIcapsโ€‹OIlongโ€‹โˆ’OIshortโ€‹โ€‹,xโˆˆ[โˆ’1,1]

2. Theoretical Funding Rate

The Hill function maps imbalance xxx to an equilibrium funding rate H(x)H(x)H(x):

H(x)={R1โ€‰(aโ€‰x)n(aโ€‰x)n+bโ€…โ€Š+โ€…โ€ŠCxโ‰ฅ0,โˆ’โ€‰R2โ€‰(aโ€‰x)n(aโ€‰x)n+bโ€…โ€Š+โ€…โ€ŠCx<0. H(x) = \begin{cases} R_{1}\,\displaystyle\frac{(a\,x)^{n}}{(a\,x)^{n} + b}\;+\;C & x \ge 0,\\[12pt] -\,R_{2}\,\displaystyle\frac{(a\,x)^{n}}{(a\,x)^{n} + b}\;+\;C & x < 0. \end{cases}H(x)=โŽฉโŽจโŽงโ€‹R1โ€‹(ax)n+b(ax)nโ€‹+Cโˆ’R2โ€‹(ax)n+b(ax)nโ€‹+Cโ€‹xโ‰ฅ0,x<0.โ€‹
  • R1,R2R_{1}, R_{2}R1โ€‹,R2โ€‹โ€‹: maximum upward/downward rate contributions

  • a,b,na, b, na,b,n: shape parameters controlling steepness and midpoint

  • CCC: base funding offset


3. Convergence Dynamics

Holding xxx constant ( dxdt=0\frac{dx}{dt}=0dtdxโ€‹=0 ), the actual funding rate y(t)y(t)y(t) relaxes toward H(x)H(x)H(x) at a speed set by A(x)A(x)A(x):

dy(t)dtโ€…โ€Š=โ€…โ€Šโˆ’โ€‰A(x)โ€‰[y(t)โˆ’H(x)]. \frac{dy(t)}{dt} \;=\; -\,A(x)\,\bigl[y(t) - H(x)\bigr].dtdy(t)โ€‹=โˆ’A(x)[y(t)โˆ’H(x)].
  • If y(t)>H(x)y(t)>H(x)y(t)>H(x), the funding rate decays downward; if y(t)<H(x)y(t)<H(x)y(t)<H(x), it rises upward.

  • A(x)A(x) A(x) varies by market regime:

    Regime
    Condition
    Speed

    Slow (Dumping)

    Imbalance is decreasing

    Slowest

    Default (Pulling)

    Imbalance is increasing

    Moderate

    Fast (Dumping + Pulling)

    Imbalance switches sign

    Fastest


With this structure, the funding rate always moves smoothly toward the imbalance-driven equilibrium, adapting speed based on how participantsโ€™ positions shift.

PreviousHolding TradesNextRollover Fee

Last updated 1 month ago

๐Ÿฅ