MarginAccount is seeded ["margin", authority]. It records only its active debts and venues (for example Phoenix). It has no collateral ledger.
Collateral
Each margin vault is the associated token account of the margin PDA for one mint. Its live balance is the collateral. Every token on the protocol’s allowed-token list counts, however it reached the vault: deposit, borrow, swap, a Kamino or vault receipt, or a plain transfer.- Tokens off the list count for nothing.
- Each token can be capped per margin (
max_collateral_per_margin). Anything above the cap doesn’t count. - A frozen vault counts for nothing.
- A token with
collateral_enabledoff stops backing new debt, but liquidation still values and seizes it.
accounted_liquidity_assets and ignore surprise transfers.
Debt
DebtPosition stores shares, not a token amount. Interest grows Reserve.total_borrow_assets, so one reserve update reprices every borrower.

