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

# How Mobius Works

> End-to-end flow connecting lenders, borrowers, Credit Accounts, Venue Accounts, and the Venue Account Model.

## Roles

* **Lenders (LPs):** Supply assets to Mobius money markets to earn interest.
* **Borrowers (Traders/Strategists):** Open Credit Accounts, post collateral (stables, BTC, ETH, yield assets), borrow against it, and trade via Venue Accounts.
* **Executors:** Offchain services that bridge onchain intents to external perp venues and confirm results back onchain. Executors never have custody of user funds — they only relay transitions between the hub and venues.

## Lifecycle

1. **Lend:** Lenders deposit assets into lending pools and accrue interest from borrower activity.
2. **Open a Credit Account:** A borrower opens a Credit Account on the programmable layer that tracks collateral, debt, and risk parameters. The account enforces that all operations maintain a healthy collateral ratio.
3. **Open a Venue Account:** Inside the Credit Account, the borrower opens a **Venue Account** at a trading venue to trade spot, perps, or deposit into vaults.
4. **Bind External Venues:** Through the **Venue Account Model**, borrowers can bind their Credit Account to external perp venues. An onchain driver manages the account lifecycle while an offchain executor bridges actions.
5. **Execute Strategies:** Borrowers can run automated strategies (e.g., delta-neutral carry trades) that combine onchain yield with hedged perp positions across venues.
6. **Unified Accounting:** Venue Account equity counts as collateral in the Credit Account. The global Health Factor blends onchain balances with venue positions and snapshots.
7. **Rebalance as Needed:** Because the programmable layer and trading venue margining are separate by default, borrowers or automated Rebalancers bridge funds between the Credit Account and Venue Account to maintain health.

## Architecture

```text theme={null}
                   +-----------------------+
                   |     Credit Account    |
                   | (Programmable Layer)  |
                   |                       |
                   |  Collateral + Debt    |
                   |  Health Factor (HF)   |
                   +----------+------------+
                              |
              +---------------+---------------+
              |               |               |
     +--------v------+  +----v-------+  +-----v--------+
     |   DeFi Layer  |  |  Venue Acc |  |  Venues (VAM)  |
     |  (Adapters)   |  | (Trading)  |  |                |
     +---------------+  +------------+  +----------------+
     | - Swap         |  | - Spot     |  | - Native bridge|
     | - Yield Vaults |  | - Perps    |  | - API-based    |
     | - Stake        |  | - Vaults   |  | - ...          |
     +---------------+  +------------+  +-------+--------+
                                                |
                                        +-------v--------+
                                        |   Executors    |
                                        | (Offchain,     |
                                        |  no custody)   |
                                        +----------------+
```

## Example User Flows

### Flow 1: Credit Account + Perp Trading

1. User opens a Credit Account, deposits yield-bearing collateral
2. Borrows stablecoins from the pool
3. Sends borrowed stablecoins to a perp venue as margin
4. Opens a leveraged position on the venue
5. Health factor reflects both onchain collateral and venue position equity

### Flow 2: Delta-Neutral Strategy

1. User deposits collateral, selects a Mobius leverage multiplier
2. Mobius borrows stablecoins, swaps into the target asset, deposits into a yield vault
3. Opens a matching short on a perp venue to hedge price exposure
4. Result: yield-bearing long + perp short = net delta \~0
5. User earns the yield spread amplified by leverage, minus borrow cost
