Strategy

Collateral is always deposited to a specific strategy. The default strategy, main, will be used for the trading competition (and will be a user's only strategy until multiple strategies are enabled).

Cross-margin

DerivaDEX uses "cross-margined" leverage. This means all funds in a Strategy Value are used as collateral to prevent liquidations. This is in contrast to "isolated margin", where users determine how much collateral to apply to a given position.

Users who wish to trade with an isolated margin approach can simulate this by creating multiple strategies with their own dedicated collateral.

In the future, DerivaDEX can (with a successful governance proposal) offer users the ability to open and manage different strategies, enabling the same trader address (Ethereum address) to have accounts with isolated collateral from one another. This will allow traders to simulate isolated margin or construct more complex trading strategies.

Strategy value

This is how much a strategy is worth at any given point in time.

The strategy_value is calculated using the formula:

strategy_value = strategy_collateral + unrealized_pnl

Where strategy_collateral is the total collateral assigned to the strategy, and unrealized_pnl is the profit or loss that has not yet been realized from the open positions within the strategy.

Available collateral

Available collateral represents the amount of collateral that is not currently tied up in any open positions. It is essentially the collateral available for new trades.

Margin Fraction

Margin Fraction defines the amount of collateral required to open and maintain positions. It ensures the trader has enough funds to cover potential losses and maintain their positions during market fluctuations. It is the strategy's backing collateral, relative to its notional value.

margin_fraction = strategy_value / notional_value

Open Margin Fraction (OMF)

Open Margin Fraction represents the percentage of collateral that is currently being utilized for open trades. OMF is calculated as:

min(total_value, collateral) / total_open_position_notional

where total_value is collateral + unrealized_pnl

and total_open_position_notional sums all your open positions, as well as what your open positions would be if all your open orders were to be filled.

If you notice that you are hitting your leverage limit earlier than you expect, please check to ensure you don't have open orders -- these will affect your OMF.

Margin fraction

The margin fraction is a key measure of account health in leveraged trading. It represents the ratio of your account's equity to its total exposure, providing a snapshot of your financial buffer against market fluctuations. To calculate the margin fraction, use the formula:

1/leverage

Leverage

leverage = notional_value / strategy_value

# leverage = 1 / margin_fraction

Minimum Margin Requirement (MMR)

The Minimum Margin Requirement is the lowest amount of collateral that a trader must maintain in their account to keep their positions open. If the account balance falls below this threshold, additional collateral must be deposited, or positions will be automatically liquidated to cover the shortfall.

Last updated