Rollover Fee
Captures underlying market swap/funding/carry costs. On non-crypto pairs, the fee is compounded per block and applied synthetically to the entire position size, then deducted/credited to position PnL. A Gelato automation updates the on-chain rate daily (T+1) from our off-chain pipeline.
How It’s Priced
New model (per-asset):
Long Rollover = lastPureLong + brokerPremium
Short Rollover = - lastPureLong + brokerPremiumlastPureLong = “pure market” rate inferred off-chain (term structure or interest rate).
brokerPremium = platform premium (leverage costs).
UI note (signs & colors): – If the effective rate > 0, the user pays (shown as negative/red on FE). – If the effective rate < 0, the user receives (shown as positive/green), only if negative rollover payouts are enabled (see below).
Negative Rollover Setting
isNegativeRolloverAllowed = false(default, initial phase) Rates are floored at 0 to users (users don't receive rollover).If effective rate < 0 → users receive 0%, not the negative (credit) amount.
If effective rate > 0 → users pay the positive rate.
isNegativeRolloverAllowed = true(future phase) We mirror the underlying: one side pays, the other might receives.
Example (Crude Oil, CL)
Underlying market rate (roll yield) = −7% (backwardation → longs receive / shorts pay).
Broker premium = +1%.
Computed:
Longs:
−7% + 1% = −6%→ longs receive 6%.Shorts:
+7% + 2% = +8%→ shorts pay 8%.
With isNegativeRolloverAllowed = false:
Longs: 0%
Shorts: +8% pay
How We Compute lastPureLong (Off-chain)
lastPureLong (Off-chain)We compute the “pure” market component per asset, then push it on-chain daily.
1) Term Structure (Commodities & FX)
Idea: Use the futures curve to estimate roll yield (contango/backwardation).
Inputs: list of
[expiry, price]contracts (end-of-market data, T+1).Method: compute annualized slope(s) between consecutive contracts and take a Gaussian-weighted average (more weight to nearer expiries).
Sign logic:
Contango (positive slope) → longs pay, shorts receive. (e.g., gold often)
Backwardation (negative slope) → longs receive, shorts pay. (e.g., oil often)
The resulting annualized %, after weighting, is the
lastPureLongfor that asset.
2) Interest Rates (Stocks & Indices)
Use live SOFR (USD policy rate proxy) to set
lastPureLongfor equity indices and single-stocks.
Daily Update Workflow
On each weekday:
Download settlement data (T+1).
For each contract/asset, compute the underlying market rate – Term structure (commodities/FX) or SOFR (stocks/indices).
Keepers (Gelato) update rollover fee on Ostium smart contracts.
Last updated