Dynamic Slippage

Overview

The Dynamic Slippage mechanism is designed to accurately reflect the market impact of user trades. Every order impacts the market liquidity, particularly when the trade volume is large. To ensure fair pricing and risk management, slippage is calculated dynamically based on the order size, the current Open Interest (OI) imbalance, and real-time market depth.

Calculation Logic

The system determines the slippage percentage by comparing the calculated Market Impact against a configured Minimum Slippage threshold. The greater of the two values is applied.

  • A. Long Scenario (Open Long / Close Short)

This formula applies when a user opens a Long position or closes a Short position.

SlippageLong=Max(NewPostionSymbolShortOI+SymbolLongOI)/DepthAbove,MinLongSlippage)SlippageLong= Max{(NewPostion-Symbol Short OI+Symbol Long OI)/DepthAbove, MinLongSlippage)}
  • B. Short Scenario (Open Short / Close Long)

This formula applies when a user opens a Short position or closes a Long position.

SlippageShort=Max(NewPostionSymbolLongOI+SymbolShortOI)/DepthBelow,MinShortSlippage)SlippageShort=Max{(NewPostion-Symbol Long OI+Symbol Short OI)/DepthBelow, MinShortSlippage)}

Parameter Definitions

Market Depth (Liquidity)

Market depth data is aggregated from major exchanges via the CMC interface to determine the available liquidity for absorbing orders.

  • Data Sources: Binance, Coinbase, OKX, Kraken and other major exchanges (USDT or USD pairs).

  • Update Frequency: Every 5 seconds.

Depth Formulas:

The depth values used in the denominator are calculated as follows:

  • Depth Above (Ask Liquidity):

Depthabove=k×100×(depthpositivetwo)Depthabove​=k×100×∑(depthpositive_two​)​
  • depth_positive_two: Aggregated +2% depth data from sources.

  • Depth Below (Bid Liquidity):

Depthbelow=k×2100×(depthnegativetwo)Depthbelow​=k×2100×∑(depthnegative_two​)​
  • depth_negative_two: Aggregated -2% depth data from sources.

Adjustment Coefficient (k): A scalar used to adjust liquidity sensitivity.

  • Default: k = 1.5

  • Configuration: Configurable per Symbol.

Minimum Slippage

A fixed parameter configured at the Symbol level. This acts as a floor to ensure slippage never drops below a baseline value, even in high liquidity conditions.

Precision and Rounding Logic

The final slippage percentage is processed with a precision of 1/10,000 (0.01%). The rounding method depends on which value is selected by the MAX function:

  1. Scenario A (Calculated Impact > Min Slippage):

    • If the dynamic market impact calculation is higher than the minimum slippage, the system applies an Unconditional Carry (Ceiling) logic.

    • Action: Round UP to the nearest 1/10,000.

  2. Scenario B (Calculated Impact ≤ Min Slippage):

    • If the minimum slippage is used, standard rounding applies.

    • Action: Round Half Up (Nearest) to 1/10,000.

Example Logic :

Last updated