# 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="https://1257875949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYQhBmTCs9MwhhuPQrV5v%2Fuploads%2FyEQ1IQS1XuVucsOeebmL%2Fimage.png?alt=media&#x26;token=ec7cac01-7214-4eba-ba95-783e636eafd1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1257875949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYQhBmTCs9MwhhuPQrV5v%2Fuploads%2FKXLd5K1jLhho08PjbJYi%2Fimage.png?alt=media&#x26;token=50c41579-9c00-4311-bb8f-7c38758370fa" 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="https://1257875949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYQhBmTCs9MwhhuPQrV5v%2Fuploads%2Fz2dGHhEczIfTvHs0v1yB%2Fimage.png?alt=media&#x26;token=e083ef91-baee-4a26-8420-0b26811dbe08" 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="https://1257875949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYQhBmTCs9MwhhuPQrV5v%2Fuploads%2FjV3RQq0B8BoohewJRNAx%2Fimage.png?alt=media&#x26;token=911d3690-23c5-4f5e-a410-e1f3c646676f" alt=""><figcaption></figcaption></figure>

`subForCounterParty()`

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

<figure><img src="https://1257875949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYQhBmTCs9MwhhuPQrV5v%2Fuploads%2FSwpjI0xx5EiDI9aV2Tsk%2Fimage.png?alt=media&#x26;token=3c48c991-6e03-41af-9402-656942bb168e" 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
