# Protocol Architecture

When you mint USDM, your USDC doesn't sit idle. It's deployed into a delta-neutral portfolio on Hyperliquid. Here's the plain-language flow.

<figure><img src="/files/9CFteo0iKaV0t7nwAPzo" alt="Monetrix protocol flow: USDC mints USDM on HyperEVM, the Position Manager opens spot and short perp positions on HyperCore via Cross Margin, yield flows back through funding, BLP lending, maker rebates, and HLP" width="720"><figcaption></figcaption></figure>

## The flow, at a glance

1. **You deposit USDC** → the Monetrix Vault receives it.
2. **The vault buys spot assets** (e.g. BTC, ETH) as backing.
3. **The vault opens short perpetual positions** equal to the spot, so price moves cancel out.
4. **The protocol earns** funding, lending interest, maker rebates, and optional HLP returns.
5. **Earnings flow into sUSDM's value**: if you've staked, your sUSDM becomes worth more USDM.

## Who's managing what

All of the above happens inside on-chain contracts on Hyperliquid. No off-chain server, no custodian, no manual operator. The two contracts you interact with directly:

* **`MonetrixVault`**: handles mint, redeem, and the protocol's positions.
* **`sUSDM`**: handles staking, unstaking, and yield distribution through its exchange rate.

Everything else (rebalancing, ADL defense, HLP allocation) runs automatically from contract logic.

## What that means for you

* You can **verify the protocol's position health on-chain** at any time. No "trust us" required.
* If Hyperliquid itself is up and functioning, the protocol can function. There's no third-party exchange in the path.
* The worst-case failure mode is a Hyperliquid-level issue or a smart contract bug, both of which are visible on-chain.

For the mechanics of how yield is generated, see [Delta-Neutral Strategy](/how-it-works/delta-neutral-strategy.md).


---

# 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://doc.monetrix.xyz/how-it-works/architecture.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.
