# Margin

Margin requirements are set on a pool by pool basis; on Omni, all pools follow the same platform-wide margin requirements. Generally, margin requirements govern how much collateral is required to be deposited into the pool by each party to open and maintain positions. Margin is recomputed in realtime, and going below margin requirements may trigger *auto-liquidation* (depending on if this param is set to `true`).&#x20;

### Initial Margin and Maintenance Margin

* Initial Margin (IM): The amount of collateral required to open new positions.
* Maintenance Margin (MM): The amount of collateral required to maintain existing positions. Going above 100% MM usage may cause liquidations.
* As a general rule, the maintenance margin requirement is half that of the initial margin requirement. See [Leverage](/omni/trading/leverage.md) for more details.

### Portfolio Margin vs Simple Margin

Variational supports both portfolio margin and simple margin mode. In addition, our margin engine is fully compatible with the Deribit margin engine, meaning that all of the calculations work the same way.

{% embed url="<https://support.deribit.com/hc/en-us/articles/25944756247837-Portfolio-Margin>" %}
Deribit portfolio margin calculations
{% endembed %}

{% embed url="<https://doc.tslab.pro/tslab/v/eng/data-providers/connection-to-broker/deribit-cryptocurrency-exchange/deribit-margin-requirements-calculation>" %}
Deribit simple margin calculations
{% endembed %}

There is one extra parameter that Variational supports in the portfolio margin params. `decorrelation_risk` tunes how much risk can be offset from positions with two different underlyings.&#x20;

Specifically, we compute margin requirements in two scenarios:

1. All assets have zero correlation  (`mm_no_correlation`)
2. All assets have 100% correlation (`mm_complete_correlation`)

The final margin requirement is&#x20;

```rust
decorrelation_risk * mm_no_correlation + (1.0 - decorrelation_risk) * mm_complete_correlation
```

### Per Asset Params

Default params are applied to every asset in the pool. You can set per asset params which will override the defaults for a specific asset. For example, if you set params for BTC, all options, futures, and perps with BTC as the underlying will be affected. All derivatives that do not have BTC as the underlying will use the default params.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.variational.io/omni/trading/margin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
