# Margin (/docs/risex/trading/margin)

RISEx is a natively **cross-margined** venue that unifies margin on your spot and perpetual balances. The exchange is set up so that in the future, you will be able to leverage a host of differentiated assets to gain maximum capital efficiency. Currently, USDC is the primary collateral type, and a user's P\&L also contributes to their margin. RISEx supports two main margin types:

## Margin Types

| Type                                            | Description                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Cross margin**                                | Your total account contributes to margin. Position P\&L + all USDC in your account contribute to equity.                                                                                                                                                                                                     |
| **Isolated margin**                             | You can enable Isolated Margin mode to protect your total account against a singular position that you want to take. In isolated margin mode, only the margin you deposit and the unrealized PnL of the position contribute to the health of the position.                                                   |
| **Permissionless portfolio margin** *(Q2 2026)* | Given RISEx is fully composable with all of RISE we are working on enabling portfolio margining where users can interact with the underlying Borrow-Lend markets on RISE to get leverage on select spot assets. This will also enable native yield on your holdings, so you can earn on idle spot positions. |

***

## Account Balances and Account Health

The RISEx risk engine recognizes the following when looking at your account:

**Account Equity**

Total equity including all unrealized PnL (across both cross and isolated positions). This represents the current value of your account and is used to determine when you should be liquidated.

```
Account Equity = Total Token Balance in USD + Σ(Unsettled USDC for all positions)
```

***

**Cross Initial Margin (IM)**

Initial margin is the margin required to open a position. It looks at your **free collateral** to determine if you have enough USDC to place into the position.

Cross initial margin is the sum of all initial margins across your positions. Cross-initial margin tells you how much capital you have locked up as margin on current positions and unfilled orders.

```
Initial Margin = (size × markPrice) / leverage

Total Cross IM = Σ(IM per cross position) + Σ(IM per unfilled cross order)
```

***

**Cross Maintenance Margin (MM)**

Maintenance margin is the required margin needed in your account to keep the position healthy. It is (2/3)\*Initial Margin.

Cross maintenance margin is the sum of all maintenance margins across your position. You have to keep your account equity above the cross maintenance margin to avoid partial liquidations *(See Liquidations section)*.

```
Maintenance Margin = 2/3 × Initial Margin

Total Cross MM = Σ(MM per cross position) + Σ(MM per unfilled cross order)
```

***

**Close-out Margin Ratio (CMR)**

Close-out margin ratio is the required margin needed in your account to avoid full liquidations. The close-out margin is an important metric because it is the level at which your account transitions from partial to full liquidation, at which point you lose all the margin.

```
Total CMR = Total Cross MM × (2/3)
```

***

**Free Cross Margin**

The total amount of free margin that can be used on positions. Once your free cross margin hits 0, you can no longer take positions, given you have no more collateral left to use.

```
Free Cross Margin = max(Cross Margin Balance - Total Cross IM, 0)
```

***

**Withdrawable Amount**

The withdrawable amount is the total amount a user can withdraw from the exchange. The withdrawable amount is the minimum of your cross balance and your free cross margin, ensuring you always have enough margin to cover your positions.

> **Note:** RISEx does not allow for withdrawal of uPnL.

```
Cross Balance of Token = Total Token Balance in USD - Total Isolated Margin Usage

Withdrawable = max(min(Cross Balance of Token, Free Cross Margin), 0)
```

***

## Self-Trade Prevention

RISEx also implements self-trade prevention to block the matching of two opposite orders from the same trading account. If two orders from the same account are attempted to be matched, then the maker order will be canceled, and the taker order will hit the next Bid/Ask on the book.
