# Collateral & Margin System

## **Collateral Management**

Symmio supports two distinct margin systems to manage risk and ensure solvency across counterparties:

### **1. Isolated Margin**

* Used exclusively for **Party A option purchases**.
* Party A’s funds are deposited into an individual **isolated balance**, managed per user.
* **Party B** is responsible for maintaining sufficient collateral in their own isolated balance to cover the **total unrealized PnL** of all open positions with all Party As.
* The required collateral is determined by the **loss coverage ratio**, which defines what percentage of unrealized losses must be backed by actual funds.
* Solvency checks for Party B are performed **only** against their isolated balance, aggregated across all counterparties (not per Party A).
* If Party B’s available balance falls below the required threshold, liquidation is triggered.
* The **Scheduled Release Balance System** governs how and when deposited funds become available, introducing timed delays for security.

### **2. Cross Margin**

* Available for **both buying and selling** by **Party A**.
* Each Party A and Party B maintains a **dedicated cross balance per counterparty pair**.
* This model is used for:
  * **Party A’s maintenance margin** (when selling options).
  * **Party B’s loss coverage** (when Party A is the buyer).
* Funds can be allocated from the isolated balance into a cross balance specific to a trading counterparty.
* Solvency and liquidation are **pair-specific**—they apply only to the trades and margin balances between a particular Party A and Party B.
  * Party A must maintain enough maintenance margin in their cross balance with Party B to support short positions.
  * Party B must allocate sufficient funds in the cross balance with Party A to cover the required unrealized PnL.
* A dedicated **reserve balance** is introduced for Party B:
  * Acts as a fail-safe collateral source in critical situations.
  * Can be used to top up a cross balance and **prevent liquidation** if the account is at risk.

## Scheduled Release Balance System

The Scheduled Release System is a smart contract-based balance management system that provides secure fund handling with time-delayed releases and multi-counterparty support. The system supports both isolated and cross-margin trading models with sophisticated locking mechanisms.

This system :

* Controls fund release and transfers between parties
* Implements security delays to prevent immediate fund availability
* Mitigates risks associated with rapid fund movements
* Provides different functionality for isolated vs. cross margin systems

**Balance Types**

1. **Isolated Balance**: User's main balance pool which used in isolated solvency checks
2. **Cross Balance**: Per-counterparty balance for cross-margin operations and solvency checks
3. **Scheduled Balance**: Time-locked funds awaiting first release
4. **Transitioning Balance**: Funds in second phase of release process

**Margin Types**

* **Isolated Margin**: Uses scheduled release mechanism with time delays
* **Cross Margin**: Direct balance operations without delays

<figure><img src="/files/nEg4skZu9ex45dpX4lvr" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vOEfZ7PBM4ZqvOFWtqN0" alt=""><figcaption></figcaption></figure>

### **Isolated Balance Functions**

`instantIsolatedAdd()`

* Immediately adds funds to party's isolated balance

`isolatedSub()`

* Subtracts funds from isolated balance

`isolatedLock()` / `isolatedUnlock()`

* Lock/unlock portions of isolated balance

<figure><img src="/files/t5ec3JxCGoi0NFgeqaNn" alt=""><figcaption></figcaption></figure>

### **Cross Balance Functions**

`allocateBalance()`

* Transfer funds from isolated to cross balance for specific counterparty

`deallocateBalance()`

* Transfer funds from cross balance to isolated balance

`crossLock()` / `crossUnlock()`

* Lock/unlock portions of cross balance

### **Scheduled Release Functions**

`scheduledAdd()`

* Add funds with time-delayed release. This delay is because of security issues.

<figure><img src="/files/x8eQiTXITelJKloRGgoM" alt=""><figcaption></figcaption></figure>

`subForCounterParty()`

* Subtract funds from balances for counterparty not just the isolated balance.

<figure><img src="/files/Rx7L5iVq8XD44lig877E" alt=""><figcaption></figcaption></figure>

### **Release Mechanism**

**Time Intervals**

The system uses two release intervals:

1. **Release Interval 1**: Scheduled Balance → Transitioning Balance
2. **Release Interval 2**: Transitioning Balance → Isolated Balance

**Sync Function**

The `sync()` function must be called to progress funds through the release intervals. This function:

* Checks elapsed time for each balance bucket
* Moves funds from Scheduled to Transitioning when interval 1 expires
* Moves funds from Transitioning to Isolated when interval 2 expires


---

# 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.symm.io/options-protocol-architecture/technical-architecture/collateral-and-margin-system.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.
