protected_balance_vault is the custody layer for protected principal. It is intentionally small: it accepts deposits and withdrawals only when instructed by the configured protection engine.
Core Responsibilities
- Secure Custody: Holds the principal collateral during the duration of an active position.
- Engine Exclusivity: Only the authorized
protection_engineis permitted to instruct this vault to move funds. - Per-position accounting: Tracks the principal balance for each protection position.
- Per-token totals: Tracks total balance by token so monitor and diagnostics can compare contract accounting with token balances.
- Admin handover: Supports a two-step admin transfer through
propose_admin()andaccept_admin().
protection_engine directs this vault to return the funds directly to the user’s wallet.