๐ฅ Holding Trades
Traders can add collateral and update TP/SL while their trade is open. Compounding fees charged vary as a function of current asset volatility and Open Interest Imbalance.
Dynamic User interactions
Users can update certain aspects of their open trades:
Update Take Profit: Traders can update the value of or add a Take Profit order.
Update Stop Loss: Traders can update the value of or add a Stop Loss order.
Add Collateral: Traders can top up collateral on their position to reduce leverage and minimize liquidation risk.
Remove Collateral: Traders can withdraw collateral on their position; however, the liquidation risk increases. A 0.10 USDC fee is deducted from collateral when this action is performed.
In all cases, no additional fee is charged by the protocol because no price is requested.
Monitoring of Trade State
Ostium uses Gelato Functions to continuously track price changes and determine the need for automated order execution (liquidations, stop losses, take profit orders).
Trade state simulation runs frequenlty, radically minimizing the risk of would-be liquidations or other automated orders from being executed outside of an acceptable time frame or of bad debt accruing for the liquidity buffer.
Rollover Fees
Ostium applies rollover fees to open positions to reflect the evolving market dynamics and the cost of holding positions over time. These fees are synthetically applied to the entire position size, compounding per block, and are realized upon closing a position.
Rollover fees reflect underlying market swap/funding/carry costs. A Gelato automation updates the on-chain rate daily (T+1) by polling from underlying market data sources.
Pricing
lastPureLong = โ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 Front-End)
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) Ostium mirrors the underlying: one side pays, the other might receive.
Example (Crude Oil, WTI)
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% = +9%โ shorts pay 9%.
With isNegativeRolloverAllowed = false:
Longs: 0%
Shorts: +9% pay
How Ostium Computes lastPureLong (Off-chain)
lastPureLong (Off-chain)Ostium computes the โpureโ market component per asset, then pushes 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