Ostium Documentation
  • šŸ‘‹Welcome to Ostium
  • Getting Started
    • šŸ‘ļøOverview
    • šŸŽÆIntroduction: Our Thesis
    • šŸ’¾Glossary
  • Ostium Trading Engine
    • šŸļøOverview
    • šŸ“–Opening Trades
    • šŸ„…Holding Trades
      • Funding Rate
      • Rollover Fee
    • šŸ“˜Closing Trades
    • šŸ“¹Step-By-Step Tutorial
      • Connecting to Ostium
      • Fund Wallet/Account
      • Opening a Trade
      • Editing a Trade
      • Closing a Trade
    • šŸ“Order Types
  • šŸ“ˆStocks: Day Trading
  • šŸ’²Fee Breakdown
  • Shared Liquidity Layer
    • šŸ¦Overview
    • šŸ’¦Liquidity Buffer
    • šŸ“ŠMarket Making Vault
      • Deposit
      • Withdraw
      • OLP token
    • ā‰ļøRisks
  • Supporting Infrastructure
    • šŸ—ļøOverview
    • šŸ”®Price Oracle
    • šŸ’»Automations
    • šŸ’¾API & SDK
  • Security
    • šŸ”Smart Contract Audits
    • šŸ’°Economic Audit
  • LEGAL
    • Terms of Use
    • Disclaimer
Powered by GitBook
On this page
  • Not Liquidated
  • No Closing Fee
  • Liquidation
  • Liquidation Reward (fee)
  1. Ostium Trading Engine

Closing Trades

There is no closing fee for non-liquidated trades. However, when a position is liquidated, the remaining collateral is collected and accrues as a reward for Market Making Vault Liquidity Providers.

PreviousRollover FeeNextStep-By-Step Tutorial

Last updated 23 days ago

Not Liquidated

Manually closed (100% or partially) or Automations-triggered (Take Profit, Stop Loss) trades can be triggered when positions have a negative or positive trader PnL. A 0.50 USDC fee is applied for each partial close.

  • Negative trader PnL: Triggered by either a manual close or a SL (or a TP) reaching the designated value. A trader's collateral + PnL is transferred back to the trader's wallet (i.e. collateral - losses). The absolute value of the trader's negative PnL (remaining collateral) is transferred to the protocol's .

  • Positive trader PnL: Triggered by either a manual close or a TP (or a SL) reaching the designated value. A trader's initial collateral + positive PnL (from Liquidity Buffer) is transferred back to the trader's wallet.

No Closing Fee

Ostium's trading engine does not have a closing fee.

Why? Most exchanges display a misleading unrealized PnL value for traders. While a trader may believe themselves to be in profit, dynamic closing fees and hefty spreads often result in positions closing with meaningfully lower gains than a reading of the interface would suggest (the case for a majority of perpetuals protocols today).

Instead, on Ostium, what you see is what you get: the value of a trader's unrealized PnL represents realized PnL if the trader were to close the open position at market price. This increases transparency and removes the poor user experience of unpredictability resulting from the gap between displayed unrealized and actual realized PnL.

Liquidation

Ostium employs a margin-based liquidation mechanism without margin calls, implementing a backstop liquidation at 25% collateral for all leveraged trades. This means that if a position is opened at maximum leverage, liquidation occurs when the position experiences a 75% loss.

The liquidation threshold dynamically adjusts according to the leverage used, calculated by:

100%āˆ’(LeverageMaxLeveragePairā‹…25%)100\%-(\dfrac{Leverage}{MaxLeveragePair} \cdot 25\%)100%āˆ’(MaxLeveragePairLeverage​⋅25%)

This formula indicates the percentage loss (negative Pnl%) at which liquidation will trigger for any given leverage.

Example: If you open a long BTC trade with 20x leverage, and BTC's maximum leverage is 100x, your liquidation threshold is calculated as follows:

100%āˆ’(20100ā‹…25%)=95%100\%-(\dfrac{20}{100}\cdot25\%)=95\%100%āˆ’(10020​⋅25%)=95%

This means your PnL would need to decrease by 95% to trigger a liquidation.

Liquidations are automatically executed via keeper bots operated through Gelato Functions, ensuring efficient, timely, and decentralized execution without additional protocol-level incentives for bot operators. The remaining collateral is transferred to the Market Making Vault (liquidation reward).

Liquidation Reward (fee)

The liquidation reward is charged to the trader's remaining collateral in the event of a liquidation and routed to Market Making Vault.

Traders do not receive the remaining collateral if their position is liquidated.

šŸ“˜
Liquidity Buffer