๐Ÿฅ…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.

In all three cases, no additional fee is charged by the protocol because no price is requested.

Monitoring of Trade State

  • Instead of a keeper network, Ostium uses Chainlink Automations for Chainlink pricing-derived assets (BTC, ETH) or Gelato Functions for Ostium/Stork pricing-derived assets (RWAs) to continuously track price changes and determine the need for automated order execution (liquidations, stop losses, take profit orders).

  • Trade state simulation runs occur every second, 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.

Compounding Fees

During the lifetime of a trade, compounding fees play one of the most important roles in driving the protocol towards equilibrium (funding fee) and mitigating LP directional risk exposure in periods of high volatility (volatility fee).

Funding Fee

Captures the externality of changes in Open Interest skew. This is a zero-sum fee that compounds per block, is charged synthetically on the entire position value of the โ€œpopularโ€ side, and injected into the PnL of the โ€œunpopularโ€ side (e.g. if the OI skew is long, the long side "popular" pays to the short side "unpopular"). Fee payments cannot be "claimed" as on centralized exchanges but rather are injected into calculations of a trader's returns and thus realized at position close, amplifying or reducing PnL.

The funding fee focuses on closing the gap between long and short Open Interest, driving the protocol towards an equilibrium and minimizing delta risk for the vault.

We designed our funding fee to be gas-efficient (hyperbolic rather than exponential function) as well as velocity-based, meaning the fee charged is an integral of previous velocity states. Without such a velocity parameter, arbitrageurs would never be incentivized to fully close imbalances, as an imbalance of zero would also lead to result in a fee of zero. Instead, this funding fee model accounts for both the length and magnitude of prior imbalances, compensating arbitrage behavior longer and more strongly if the negative externality from a prior state was greater.

The formula is expressed as the velocity of change of the funding fee. It is thus independent from state, though the actual funding rate value is path dependent since it is the integral of all previous velocity states.

The funding fee is applied to the side with a positive skew and expressed as a percentage per day:

fL=โˆซ0tR(Ck(kโˆ’1)kCโˆ’(Lโˆ’S)โˆ’k+1)โ€‰dt f_L =\int_{0}^{t} R\left(\frac{Ck(k-1)}{kC-(L-S)}-k+1\right) \,dt

Volatility Fee

Captures the externality to Liquidity Buffer of asset volatility. This fee compounds per block and is charged synthetically on a trader's entire position size, subtracted from position PnL. An off-chain bot that keeps track of the Average True Range Volatility values on a per-asset basis programmatically updates daily with volatility data inputs from Ostium's oracle.

The volatility fee prices the risk of a greater probability of large swings in directional exposure resulting from periods of high volatility or sustained greater volatility on certain pairs.

This hyperbolic volatility fee formula is as follows:

fr(v)=F(Vs(sโˆ’1)Vsโˆ’vโˆ’s+1)f_r(v) = F\left(\frac{Vs(s-1)}{Vs-v}-s+1\right)

Last updated