# RIP-2: Permissionless Portfolio Margin (/docs/risex/rips/rip-2)



import { Callout } from 'fumadocs-ui/components/callout';

<Callout type="info">
  **Status:** Draft
</Callout>

RIP-2 defines portfolio margin for RISEx. With a portfolio margin account, a user's spot collateral and perps positions are unified. Users deposit supported collateral assets (ETH, BTC, LSTs), borrow USDC against them, and trade perps—all from a single account with a unified margin ratio.

RIP-2 makes portfolio margin permissionless by integrating with Morpho Lite, which allows open deployment of lending markets and new collateral types. Curators and Protocols can create Morpho markets for new collateral types. Once markets meet security criteria, they are made available on the RISEx UI.

Want to trade perps using your favorite LST as collateral? If there's a lending market for it on RISE, you can.

***

## How It Works

Once available, portfolio margin will work as follows:

1. **Create a Portfolio Margin account:** From the RISEx interface, create a new Portfolio Margin account
2. **Select a market:** Choose which Morpho market to use based on your preferred collateral type (e.g., ETH/USDC, wstETH/USDC)
3. **Deposit collateral:** Deposit your collateral asset
4. **Trade:** Open perp positions. USDC is automatically borrowed against your collateral to meet margin requirements.

Your collateral and perp positions are combined into a single portfolio margin ratio. As long as this ratio stays below the liquidation threshold, your positions remain open.

***

## LTV and Borrowing

Under portfolio margin, eligible collateral assets have an **LTV (loan-to-value)** ratio between 0 and 1. When placing perp orders with insufficient USDC balance, the system automatically borrows against your collateral up to:

```
max_borrow = collateral_balance * oracle_price * LTV
```

***

## Portfolio Margin Ratio

Portfolio margin is a generalization of cross margin. Instead of margining perp positions in isolation, all collateral and perp positions are collectively margined together within one account.

The portfolio margin ratio determines when liquidation occurs:

```
portfolio_margin_ratio = maintenance_requirement / liquidation_value
```

Where:

```
maintenance_requirement = perp_maintenance_margin + total_borrowed_USDC

liquidation_value = perp_account_value + (collateral_value * liquidation_threshold)

liquidation_threshold = 0.5 + 0.5 * LTV
```

The account becomes liquidatable when `portfolio_margin_ratio > 0.95`.

***

## Liquidations

When the portfolio margin ratio exceeds 0.95, liquidation is triggered. The system will close perp positions and repay borrowed USDC until the ratio returns below the safe threshold.

Liquidations are partial—only enough positions are closed to restore account health. Remaining collateral is returned to the user.

***

## How Permissionless Collateral Works

Morpho Lite enables permissionless market creation:

| Step | What Happens                                                |
| ---- | ----------------------------------------------------------- |
| 1    | Someone deploys a new Morpho market (e.g., NEW\_TOKEN/USDC) |
| 2    | LPs supply USDC liquidity to earn yield                     |
| 3    | Market reaches minimum TVL threshold                        |
| 4    | RISEx UI displays NEW\_TOKEN as a collateral option         |
| 5    | Traders can now use NEW\_TOKEN for perps margin             |

No RISEx governance required. No whitelisting. The market decides what's valuable collateral.

***

## Architecture

RIP-2 is built as a Modular Sub-account ([RIP-1](/docs/risex/rips/rip-1)). The sub-account coordinates between RISEx and Morpho without modifying either protocol.

<img alt="PPM Architecture" src={__img0} placeholder="blur" />

The Modular Sub-account sits at the top of the stack, coordinating between two isolated risk engines:

* **Morpho-lite** (left): Users lend collateral (ETH, LSTs, etc.) and borrow USDC against it. Curators manage market parameters and risk settings.
* **RISEx** (right): Borrowed USDC is deposited as margin for perps trading.

Each protocol maintains its own independent risk engine. Liquidations can be triggered at the sub-account level, which then coordinates unwinding positions across both systems. Liquidations occur in a single atomic transaction, this is only possible because both protocols share the same execution environment on RISE.

### Risk Engine Isolation

RISEx and the Morpho markets remain decoupled; each protocol's security model is unchanged.

***

## Resources

* [RIP-1: Modular Sub-accounts](/docs/risex/rips/rip-1)
* Morpho Lite: [docs.morpho.org](https://docs.morpho.org)
* RISEx Trading: [Trading](/docs/risex/trading)
