> ## 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.

# Liquidation

> Two-layer liquidation — local venue liquidation and global Credit Account liquidation.

Mobius enforces solvency at two levels: **local** (within a single Venue Account) and **global** (across the entire Credit Account). Both can trigger independently.

## Local Liquidation (Venue-Native)

On the trading venue, a Venue Account behaves like a normal account subject to the venue's own risk engine. If it fails the venue's local maintenance margin requirement, the venue liquidates positions directly.

**Key points:**

* The venue's risk engine acts autonomously — it does not know about the Credit Account.
* Ample Credit Account collateral does **not** prevent the venue from liquidating an underfunded Venue Account.
* Borrowers or Rebalancers must keep each Venue Account funded independently to avoid local liquidation.
* After a local liquidation, the reduced Venue Account equity feeds back into the Credit Account's global Health Factor, potentially triggering a global liquidation as well.

## Global Liquidation (Credit Account)

If the global Health Factor of the Credit Account — which blends onchain balances with all Venue Account equity — falls below $1$, the entire Credit Account can be liquidated, even when every individual Venue Account is solvent.

**Process:**

1. **Detection:** Executors and Rebalancers monitor the Credit Account's global HF, including venue position snapshots.
2. **Position Closure:** The executor submits close-position actions to each venue via the VAM writer interface.
3. **Fund Recovery:** After positions are closed, funds are bridged back to the programmable layer.
4. **Debt Repayment & Seizure:** A liquidator repays the outstanding debt and claims the remaining collateral, including any Venue Account residuals.

**Liquidator cost:**

$$
LiquidatorCost = TotalCollateralValue \times (1 - LB)
$$

## Liquidation Incentives

Liquidators are incentivized by the **liquidation bonus** — they receive collateral at a discount to its market value. The bonus is calibrated per-market to ensure timely liquidations without excessive value extraction:

| Parameter                    | Description                                                  |
| ---------------------------- | ------------------------------------------------------------ |
| Liquidation Threshold ($LT$) | Price decline at which HF hits 1                             |
| Liquidation Bonus ($LB$)     | Discount given to liquidators                                |
| Buffer                       | Gap between $LT$ and $LB$ to absorb oracle lag and gas costs |

## Safety Mechanisms

* **Health check on every operation:** The Credit Account verifies $HF \geq 1$ after every multicall.
* **Oracle redundancy:** Price feeds use Chainlink-compatible interfaces. Venues with native bridges can provide block-fresh prices via precompiles.
* **Non-rehypothecation:** Collateral stays locked in the Credit Account, never lent out, ensuring it is always available for liquidation.
