- Continuous funding when
fundingPeriodS = 0 - Periodic funding when
fundingPeriodS > 0
Protocol Modes
Continuous Funding
Continuous funding updates the funding state as prices move, without waiting for a fixed settlement window. This is the protocol mode represented byfundingPeriodS = 0.
Periodic Funding
Periodic funding uses a configured interval of up to 1 hour — 1 hour is both the default and the protocol maximum. Funding still tracks the premium between perp and spot, but realization happens on a defined cadence instead of an every-update basis.Current Public Behavior
The current public Decibel product uses an hourly funding presentation:- The market header shows a countdown to the next funding boundary
- UI APR displays annualize the hourly funding rate
- The API exposes
funding_period_s, so clients can distinguish hourly and continuous modes
How Funding Is Calculated
Funding rate has two components:Premium Index
The premium index measures how far the perp price deviates from the spot (oracle) price. It’s calculated using impact bid/ask prices, which represent the price to trade a specific notional amount. When perp > spot: Premium is positive, longs pay shorts When perp < spot: Premium is negative, shorts pay longsInterest Rate
The interest rate is a small constant (0.03% per day, equivalent to 0.01% per 8 hours) that longs pay shorts when the premium is near zero. This component is clamped within a dead zone (±0.15% per day, equivalent to ±0.05% per 8 hours) so it doesn’t dominate when premium is small. All rates are daily rates accrued pro-rata over elapsed time.When Funding Is Realized
Funding affects your position over time and is realized through the protocol’s funding mode for that market. In either mode, while your position is open:- Accrued funding appears in your unrealized PnL
- It affects your account equity (and liquidation threshold)
- You don’t pay or receive actual USDC
- Funding is realized proportionally to the size reduction (e.g., closing half your position realizes half the accrued funding)
- A full close realizes all accrued funding
- Your USDC balance reflects the net amount
Trader Implications
For Long-Term Holders
If you hold a position through extended periods of high positive funding:- Your unrealized PnL decreases over time
- You move closer to liquidation even if price doesn’t change
- Consider the funding cost as part of your position sizing
For Short-Term Traders
Funding mode changes how you think about timing:- Continuous mode minimizes discrete settlement windows
- Periodic mode makes the configured interval visible and easier to monitor in the UI
- In both cases, funding should be treated as part of position cost and risk management
Monitoring Funding
Track funding through:- The trading interface shows current rate and accrued amount
- API endpoints provide historical rates
- WebSocket streams push real-time updates
Technical Details
The system tracks funding through a Cumulative Funding Index (CFI). Each position stores the CFI at entry. Your accrued funding is:Related
Margin
How funding affects your equity
Liquidations
Why monitoring funding matters for liquidation risk

