Vault
Your custody. Your compounding. Your inheritance.
Every Loop user owns exactly one Vault — a PDA keyed on their wallet. It holds Cred (liquid and stacked), OXO, yield 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…rVSWQTLonger locks earn more. Up to 16% at 1-year+.
Base rate. No lock bonus.
+2 percentage points for a 30-day commitment.
+4 pp for a quarter.
+6 pp for half a year.
+8 pp for a year or more. Maximum lock 2 years.
Of accrued yield. Principal is safe; the compounding bonus is not.
Compounding 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, stack, and compound. 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.
Designate a single heir per vault and a minimum inactivity threshold (≥ 30 days). The owner's routine vault activity counts as a heartbeat. If the heartbeat lapses beyond the threshold, the heir can trigger transfer — contents (Cred, OXO, stacks) move to the heir's vault atomically.
The full inheritance flow (multi-heir percentage splits, challenge windows) lives in VTP. The vault holds the binding; VTP executes the payout.
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 at the tier's APY.
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.
set_heir(heir: Pubkey, inactivity_threshold_days: u16)Designate an inheritance recipient. Threshold ≥ 30 days.
extract / close_vault()Exit the protocol. Extract pays the 5% fee + zeros balances; close_vault frees the PDA once empty.