Vault
Your custody. Your value. Your inheritance.
Every Loop user owns exactly one Vault — a PDA keyed on their wallet. It holds Cred (liquid and stacked), OXO, stack positions, agent permissions, and an optional inheritance plan. Agents can capture value into the vault and operate it under fine-grained permissions, but custody never leaves the user.
J8HhLe…rVSWQTOne PDA, drawn open.
Lock periods you choose. 7 days to 2 years.
Shortest commitment.
A monthly commitment.
A quarter.
Half a year.
A year or more. Maximum lock 2 years.
Forfeits a portion of accrued rewards. Principal is safe.
Staying is the default. Leaving resets you to zero.
Users can extract Cred back to USDC at any time — there's no lockup on custody. But extraction is intentionally painful:
- 5% extraction fee on the withdrawn amount.
- Liquid and stacked Cred balances are zeroed out — all active stacks liquidate.
- OXO holdings are untouched (they're separate equity, not part of the flywheel).
The incentive is to stay and stack. Leaving burns your progress. That's the closed Loop.
Five tiers. Per-agent. Enforced on-chain.
Default. Agent can do nothing on this vault.
Agent can query balance and positions.
Agent can deposit captured Cred into the vault. Cannot withdraw.
Agent can stack / unstack within a daily_limit you set. Caps reset every 24h.
Agent can also run the rebalance crank and optimize across positions.
A heartbeat pattern. Heirs take over after inactivity.
Inheritance lives in VTP, not the vault program. There, setup_inheritanceregisters up to 10 heirs with percentage splits and an inactivity threshold you choose (≥ 30 days). The owner's heartbeat resets the timer; if it lapses, heirs can trigger the payout.
See Volume V — Value Transfer Protocol for the full flow.
Core instructions.
initialize_vault()Creates your vault PDA. Seeds: [b"vault", owner]. One-time, per wallet.
deposit / withdraw(amount: u64)Move Cred in / out of the liquid balance. Withdraw has no fee; extract has the 5% fee + zero.
stack / unstack(amount: u64, duration_days: u16, stack_nonce: u64)Lock liquid Cred into a StackRecord for 7–730 days. The tier is set by the lock duration you choose.
capture(amount: u64, capture_type: CaptureType, source: String)Called by an authorized capture module. Mints Cred directly into this vault.
set_agent_permission / revoke_agent_permission(agent: Pubkey, level: PermissionLevel, daily_limit: u64)Authorize an agent to operate on your vault at one of five permission tiers.
set_auto_stack(config: AutoStackConfig)Opt into auto-restacking. Anyone can crank execute_auto_restack on matured stacks.
extract / close_vault()Exit the protocol. Extract pays the 5% fee + zeros balances; close_vault frees the PDA once empty.