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

  • 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.

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. 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, which is constant between orders, of the funding fee. The funding fee is applied to the side with a positive skew and expressed as a percentage per day:

fL=โˆซ0tRvel(kvelC(kvelโˆ’1)kvelCโˆ’(Lโˆ’S)โˆ’kvel+1)โ€‰dt f_L =\int_{0}^{t} R_{vel}\left(\frac{k_{vel}C(k_{vel}-1)}{k_{vel}C-(L-S)}-k_{vel}+1\right) \,dt

Where these variables stand for:

  • f_L: The funding rate applied to the larger side, expressed as a percentage per day. For example, if f_L = 2, it means that the larger side will be charged 2% of their position size daily.

  • C: The open interest cap for both sides, expressed in millions of USD. For instance, C = 3 means the open interest cap on each side is $3 million.

  • R_vel: The maximum potential funding rate velocity. This maximum velocity is applied when the open interest difference between the two sides reaches the cap, i.e., when L - S = C (one side has full open interest, while the other is empty).

  • k_vel: The slope parameter (dimensionless), controlling the steepness of the funding rate curve. As k approaches infinity, the funding rate function approximates a linear relationship.

The formula above describes a linear velocity-based funding rate which could lead to large values. Therefore, the funding rate is capped to the maxFundingRate parameter.

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. A Gelato automation 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:

fvol=Rvol(kvolV(kvolโˆ’1)kvolVโˆ’vโˆ’kvol+1)f_{vol} = R_{vol}\left(\frac{k_{vol}V(k_{vol}-1)}{k_{vol}V-v}-k_{vol}+1\right)
  • V: The maximum allowable volatility in the protocol. Once this threshold is reached, all trading on the corresponding pair must be halted to ensure market stability.

  • R_vol: The maximum rollover fee, expressed as a percentage per hour, day, or any other time unit. This fee applies to unrealized PnL when volatility is at its maximum level, ensuring that participants pay the highest rollover costs under extreme conditions.

  • k_vol: The slope parameter, akin to funding fees, (dimensionless) that controls the behavior of the volatility function.

Last updated