> ## Documentation Index
> Fetch the complete documentation index at: https://v3.docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Managers & Risk Universes

> How margin managers and risk universes shape what a subaccount can trade and hold.

Every subaccount is bound to a **manager** and, through it, to a **risk universe**. Together they
decide the margin model you get, which instruments you can trade, and which assets you can post as
collateral. You never set the universe directly — you pick a `manager_id`, and everything else
follows.

<CardGroup cols={2}>
  <Card title="Manager" icon="scale-balanced">
    The margin model applied to your subaccount — **Standard** (cross collateral margin) or
    **Portfolio** (scenario-based netting). You choose one via `manager_id` at subaccount creation.
  </Card>

  <Card title="Risk universe" icon="layer-group">
    A risk-containment boundary. A universe's collateral, open-interest, and lending rules are its
    own, and losses are socialized only **within** it — so trades never cross universes.
  </Card>
</CardGroup>

## How they relate

* A subaccount can only have **one** manager.
* A manager belongs to **exactly one** universe.
* A universe exposes **at most one Standard and one Portfolio** manager.
* You choose a `manager_id`; that fixes both your **margin model** and your **universe**.

<Frame>
  <img className="bg-black" src="https://mintcdn.com/derive-a0490cef/BhszcT-bQHpTuFnc/trading/risk-universes-grid.png?fit=max&auto=format&n=BhszcT-bQHpTuFnc&q=85&s=ba1fc44194d70bb5b6b2736f2992ca42" alt="Diagram of the breakdown of managers, currencies, instruments, and collaterals in each risk universe. The latest values can be taken from the public/get_all_currencies endpoint." width="1800" height="1976" data-path="trading/risk-universes-grid.png" />
</Frame>

See the `public/get_all_currencies` section below to get the latest breakdown of managers and risk universes.

## Managers

A manager is the margin engine that risk-prices your subaccount. There are two:

| Manager       | Wire label | Margin model                                                                     | Best for                                                            |
| ------------- | ---------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Standard**  | `SM`       | Cross-collateral: collaterals contribute margin but options margined separately. | Simple/directional positions and collateral-style holding.          |
| **Portfolio** | `PM2`      | Scenario-based: a whole book netted across a grid of shocks.                     | Complex option/perp books that benefit from cross-position offsets. |

Each manager has a numeric **`manager_id`**. A subaccount stores its `manager_id` and derives its
universe, tradeable instruments, and accepted collateral from it. Picking Standard vs Portfolio for
the same book changes your margin requirement, not what you can hold.

## Risk universes

A risk universe is a set of assets and managers that share a single risk boundary. It exists so
that an insolvency in one universe can only ever be absorbed by that universe's own Security Module
and, if needed, socialized to solvent accounts **inside the same universe** — never across the
whole exchange. As a direct consequence, **a trade, RFQ, or liquidation is rejected if the two
sides sit in different universes.**

Everything risk-related is keyed by `(asset, risk_universe_id)`: collateral discounts, OI caps, and
lending pools can all differ per universe for the very same asset.

## The fallback universe

Universe **`0`** is a special **fallback** ("lost-and-found") universe: a no-margin holding area whose
only job is to safely custody collateral that has nowhere else to go. It registers every spot asset
but supports **no trading, borrowing, options, or perps**.

Every wallet is given a single fallback subaccount when its account is created. A deposit lands there —
instead of the subaccount you intended — whenever it can't be honoured as requested:

* it targets the fallback manager (`manager_id` `0`),
* the asset isn't registered in the target manager's universe, or
* the amount is below the subaccount-creation fee.

Funds in the fallback subaccount are safe but idle — you can't trade against them. To put them to work,
move the spot out to a real subaccount with `private/transfer_spot`.

## Reading `public/get_all_currencies`

`public/get_all_currencies` (no params; `public/get_currency` for a single one) is the source of
truth for **what is supported where**. Each currency lists its managers per universe and its assets'
risk per universe, so a single response tells you which `manager_id` to use and what you can trade
or post against it.

```json Response (abridged, one currency) theme={null}
{
  "currency": "ETH",
  "market_type": "ALL",
  "spot_price": "1950.0",
  "managers": [
    { "risk_universe_id": 1, "sm": 3, "pm": 12 }
  ],
  "option": {
    "name": "ETH-OPTION",
    "address": "0x…",
    "universes": [ { "risk_universe_id": 1, "oi": { "current_open_interest": "…", "interest_cap": "…" } } ]
  },
  "perp": {
    "name": "ETH-PERP",
    "address": "0x…",
    "universes": [ { "risk_universe_id": 1, "oi": { "current_open_interest": "…", "interest_cap": "…" } } ]
  },
  "spot": [
    {
      "name": "ETH",
      "address": "0x…",
      "erc20": { "decimals": 18, "underlying_erc20": "0x…" },
      "min_deposit_usd": "…",
      "universes": [
        {
          "risk_universe_id": 1,
          "srm_im_discount": "0.8",
          "srm_mm_discount": "0.9",
          "pm2_im_discount": "0.85",
          "pm2_mm_discount": "0.92",
          "lending": { "borrow_apy": "…", "supply_apy": "…", "total_borrow": "…", "total_borrow_cap": "…" },
          "oi": { "current_open_interest": "…", "interest_cap": "…" }
        }
      ]
    }
  ]
}
```

Everything hangs off `risk_universe_id` — match it across `managers[]`, `option`/`perp.universes[]`,
and `spot[].universes[]` to read one universe consistently.

| To determine…                                                     | Read…                                                                                                                            |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Which universes cover the currency, and which `manager_id` to use | `managers[]` → `{ risk_universe_id, sm, pm }` (`sm` = Standard id, `pm` = Portfolio id; either may be absent)                    |
| Whether options / perps exist for it                              | presence of top-level `option` / `perp`; their `universes[].oi` gives per-universe open interest and cap                         |
| Whether a spot asset is accepted as **collateral**                | `spot[].universes[]` for your universe: `srm_im_discount` (Standard) / `pm2_im_discount` (Portfolio). `"0"` = not accepted there |
| Whether you can **lend / borrow** it                              | `spot[].universes[].lending` — `null` means no pool in that universe; otherwise APYs + `total_borrow_cap`                        |
| Remaining OI / supply headroom                                    | `*.universes[].oi.{current_open_interest, interest_cap}` and `lending.{total_borrow, total_borrow_cap}`                          |
| Which classes are enabled at a glance                             | `market_type` (see below)                                                                                                        |

`market_type` is a quick summary of the enabled classes; the authoritative check is which of
`option` / `perp` / `spot` are actually populated.

| `market_type`     | Enabled classes                                     |
| ----------------- | --------------------------------------------------- |
| `ALL`             | Options, perps, and spot/collateral.                |
| `SRM_OPTION_ONLY` | Options only.                                       |
| `SRM_PERP_ONLY`   | Perps only.                                         |
| `SRM_BASE_ONLY`   | Usable only as Standard-manager base collateral.    |
| `CASH`            | Cash/quote collateral only (e.g. a USD stablecoin). |

<Note>
  A currency can register several spot assets — e.g. a lending `USDC` and a non-lending `USDC-NL`. They appear as
  separate entries in `spot[]` with their own discounts and lending, so check the specific `name`/`address` you intend
  to deposit.
</Note>

### Picking your manager

<Steps>
  <Step title="Choose currency and universe">
    Find the currency and the `risk_universe_id` you want to trade in (typically the main universe, `1`).
  </Step>

  <Step title="Take the manager id">
    From that universe's `managers[]` entry, use `sm` for Standard (isolated) margin or `pm` for Portfolio margin.
  </Step>

  <Step title="Confirm your collateral">
    Check the asset you plan to post has a non-zero `srm_im_discount` (for `sm`) or `pm2_im_discount` (for `pm`) in the
    same universe. `"0"` means that manager won't count it as collateral.
  </Step>

  <Step title="Create the subaccount">
    Pass the chosen id as `manager_id` when depositing to a new subaccount (see [Depositing](/getting-started/depositing)). Universe,
    instruments, and collateral set all follow from it. You can read them back on
    `private/get_subaccount` via its `manager_id` and `risk_universe_id`.
  </Step>
</Steps>

<Warning>
  Choosing the wrong id has consequences at deposit and trade time:

  * **Fallback routing** — depositing to a new subaccount under the fallback manager (`0`), an asset the universe
    doesn't register, or below the creation fee lands the funds in your no-margin **fallback subaccount**, where they
    can't be traded.
  * **Cross-universe trade** — a subaccount can't trade against a counterparty in a different universe; the order is
    rejected.
  * **Wrong margin model** — Standard margins each position in isolation; picking it when your book needs cross-position
    netting means a much higher requirement for the same positions.
</Warning>


## Related topics

- [Programmatic Onboarding](/getting-started/depositing.md)
- [New features](/migrating/new-features.md)
- [Error Codes](/error-codes.md)
