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

# Collateral Rebalancing

> Hylo autonomously rebalances collateral pools to maintain target leverage.

Hylo opens direct swap routes between volatile collateral and USDC when a pool's collateral ratio diverges significantly from the targeted **150%**. These routes allow the protocol to harness market forces to rebalance the leverage.

## Rebalancing Zones

Each volatile collateral pool (e.g. SOL, BTC) has two rebalancing zones:

* **Sell Zone**: at low CR, the protocol sells collateral for USDC to derisk
* **Buy Zone**: at high CR, the protocol buys more collateral with USDC

The USDC pool acts as a rebalancing buffer, providing liquidity on the other side of all collateral sells and buys across volatile pools.

The sell and buy zones each split into an inner and outer band that govern how aggressively the protocol prices each route. See [Rebalance Zones](/technical-addendum/hylo-equations#rebalance-zones) for the full six-zone model.

<Frame>
  <img src="https://mintcdn.com/hylo/VbP8KOSnAwWe_lMh/images/rebalancing-zones.png?fit=max&auto=format&n=VbP8KOSnAwWe_lMh&q=85&s=6c515f9c4acf152fd7e03fbb33ab3f45" alt="Sell, Neutral, and Buy zones across the collateral ratio range" width="4320" height="1068" data-path="images/rebalancing-zones.png" />
</Frame>

<Note>
  Rebalancing routes are **per-pair** and independent: one pair can be selling collateral while another is buying.
</Note>

### Sell Zone

When a pool's CR drops into the sell zone, the protocol opens an **ASSET → USDC** route. This sells collateral from the stressed pool and moves its backing into USDC, de-leveraging the **xASSET** and raising the pool's CR toward **135%**. The amount of collateral available for sale is capped to avoid overshooting past the sell zone inner bound.

The zones are **asymmetric**: the sell-side pricing bands span a wider CR range (135% down to 100%) than the buy-side band (165% to 175%), because de-risking under stress demands a more graduated response.

### Buy Zone

When a pool's CR rises into the buy zone, the protocol opens a **USDC → ASSET** route for arbitrageurs. This deploys USDC reserves to purchase more collateral, simultaneously re-leveraging the **xASSET** and bringing the pool's CR down toward **165%**. The amount of buyable collateral is similarly capped to prevent overshooting.

See [Hylo Equations](/technical-addendum/hylo-equations#collateral-rebalancing) for the max sellable and buyable formulas.

## Rebalance Pricing

Rebalance pricing applies a **percentage spread** to the oracle spot price that scales with how much the pool needs the flow:

* Near the **inner bound** (CR close to target), the protocol rebalances **at a profit**, selling collateral above spot or buying below it, since the pool barely needs the flow
* At a **crossover point** partway through the zone, the protocol rebalances at **break-even**, exactly at oracle spot: no profit, no subsidy
* At the **outer bound** (pool most stressed), the protocol rebalances **at a subsidy** (a discount on collateral in the sell zone, a premium in the buy zone), paying counterparties to provide the flow it now urgently needs
* Beyond the outer bound, the spread clamps flat; beyond the inner bound, the route deactivates

Both endpoint percentages are **configurable per asset**, so each pool is tuned to its own volatility. Because the spread is a fixed schedule rather than a function of live market data, pricing stays deterministic.

### Profit and Loss Settlement

Every rebalance settles its profit or subsidy against the **Earn Pool** by minting or burning **hyUSD**:

* A rebalance executed **at a profit** mints hyUSD into the Earn Pool
* A rebalance executed **at a subsidy** burns hyUSD from the Earn Pool

The Earn Pool therefore absorbs the net P\&L of all rebalancing activity: profitable rebalances near the inner bound accrue value to depositors, while subsidized rebalances under stress draw it down, the cost of de-risking the system.

<Frame>
  <img src="https://mintcdn.com/hylo/VbP8KOSnAwWe_lMh/images/oracle-pricing-chart.png?fit=max&auto=format&n=VbP8KOSnAwWe_lMh&q=85&s=d3a2f898b1f007208fe474939279f8ca" alt="Collateral Rebalancing Oracle Pricing (Pyth plus or minus CI)" width="1280" height="1000" data-path="images/oracle-pricing-chart.png" />
</Frame>

## Virtual Stablecoin Accounting

Rebalancing routes adjust the virtual stablecoin supply across pools:

* **Sell** (ASSET → USDC): burns vUSD on the volatile pair, mints vUSD on the USDC pair
* **Buy** (USDC → ASSET): burns vUSD on the USDC pair, mints vUSD on the volatile pair

This ensures hyUSD's total backing remains consistent: collateral moves between pools, but the aggregate virtual stablecoin supply stays in balance.
