# Rebalancing

Mosaiq trades through pooled venue accounts. Rebalancing keeps enough USDC on
each venue account so orders and liquidation reduces keep executing as margin
usage moves between venues. It moves Mosaiq collateral only: it never debits a
user balance, withdraws user funds, or closes a user position.

## Decision

For each venue pool Mosaiq tracks `maintenance margin used / account value`.
A pool above its trigger ratio is refilled to its target ratio; some pools also
carry an absolute free-cash floor. The refill is funded, in order, from:

1. another Mosaiq pool on the same venue, transferred internally;
2. idle USDC in the Mosaiq treasury, deposited to the venue;
3. a pool on another venue, withdrawn and bridged to the target venue.

A donor pool is never drawn below its own target ratio, or below a relaxed
ratio during an emergency. Transfers below the venue minimum are skipped.

## Execution

Each transfer is journaled before it is sent. One cross-venue plan runs at a
time; a second starts only while a pool is in emergency, up to two in total.
Same-venue transfers are not gated by them. A transfer that times out freezes
only that pool and direction until an operator reconciles it; other
rebalancing continues. Rebalancing halts entirely when the journal and
in-memory state disagree or when the journal cannot be read.

## User impact

Balances, positions, and fills never change because collateral moved. During
stress, an order can be rejected or delayed when the
selected venue has not been refilled yet, and an unhealthy account is still
liquidated per [Liquidation](/concepts/liquidation). Transfer costs are borne
by Mosaiq.
