🥅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.
Last updated
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.
These docs are deprecated and may be outdated. Please use the new docs: docs.ostium.com
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.
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.
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.
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)
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.
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
lastPureLong (Off-chain)Ostium computes the “pure” market component per asset, then pushes it on-chain daily.
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.
Use live SOFR (USD policy rate proxy) to set lastPureLong for equity indices and single-stocks.
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
Long Rollover = lastPureLong + brokerPremium
Short Rollover = - lastPureLong + brokerPremium