Pools — Live AUM, Open Interest & Positions (per pool)
—Flash V2 mainnet runs multiple pools; every pool, custody and market is decoded from the same atomic ER scan. Custody uid is pool-local, so custodies are keyed by pubkey and (pool,uid) is resolved via custody.pool + custody.uid (unique).
Per-Market-Side Reconciliation — Σ All Baskets' Positions vs Market.collective_position
—
Select a market-side (e.g. BTC Long). The sum of every basket's positions for it is reconciled against the on-chain Market.collective_position — both read as raw u64 from the same ER scan, so position count, size and collateral liability match exactly, to the integer (zero tolerance). PnL is on-chain oracle mark-to-market.
All Active Market-Sides — Basket Sum vs Market State (every row exact)
Basket Account → Positions For A Given Market, Reconciled With Market State
—Pick a basket and a market-side. Each of that basket's positions is placed side-by-side with the corresponding on-chain market state (joined by marketAccount) and every invariant is shown.
Token Accounting — Custody ⇄ Basket ⇄ Vault (raw u64 conservation)
—Every locked and reserved token in Custody.assets is matched, to the exact u64 unit, against the sum of the corresponding Basket position / order amounts. Locked groups by each market's collateral custody (the token that backs the payout); reserved groups by each order's reserve custody. The vault solvency identity then checks the raw SPL balance: balance = owned + payable − receivable.
Per-Custody Detail — locked / reserved / vault solvency ·
Money-Drain Proofs — Withdrawals, Custodies, Oracles & Units
—Hard invariants and on-chain-mark pressure checks that would expose under-backed vaults, wrong custody routing, oracle/mark gaps, token-account misconfiguration, decimal mistakes, or hidden bad debt.
Per-Custody Proof Detail ·
Open Limit Orders → Reserve / Receive Custody Resolved ((pool,uid) → custody)
—
Every limit order's reserve_custody_uid / receive_custody_uid (a pool-local u8) is resolved to its custody account + token via (pool,uid). Reserve = collateral locked for the limit fill; Receive = asset received on fill.
Risk — Margin-Eroded Positions (collateral fully consumed by PnL)
—On-chain oracle mark-to-market: a position is margin-eroded when collateral + unrealized PnL ≤ 0 (liquidatable / bad-debt). Effective leverage = size ÷ collateral; it rises as margin erodes and can exceed maxLev with no rule breach — maxLev only binds at open.