The Charter — all volumes
Volume II · Custody layer

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.

ProgramJ8HhLerVSWQT
GitHub
The cutaway

One PDA, drawn open.

LIQUID CREDdeposit · withdraw · no feeSTACK RECORDStiers 1–5 · 7d → 730dOXO SHELFseparate equity · untouched by extractHEIR ENVELOPEopens after ≥ 30d silenceAGENT APERTUREnone · read · capture · guided · autonomousdaily_limit enforced on-chainagentownerPDA seeds: [b"vault", owner] — one per wallet
Fig. II-1 — the strongbox, cut open. Custody never leaves the owner.
Stacking tiers

Lock periods you choose. 7 days to 2 years.

Tier 1
7–29 days

Shortest commitment.

Tier 2
30–89 days

A monthly commitment.

Tier 3
90–179 days

A quarter.

Tier 4
180–364 days

Half a year.

Tier 5
365–730 days

A year or more. Maximum lock 2 years.

Early exit
Penalty

Forfeits a portion of accrued rewards. Principal is safe.

The flywheel

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.

Agent permissions

Five tiers. Per-agent. Enforced on-chain.

None

Default. Agent can do nothing on this vault.

Read

Agent can query balance and positions.

Capture

Agent can deposit captured Cred into the vault. Cannot withdraw.

Guided

Agent can stack / unstack within a daily_limit you set. Caps reset every 24h.

Autonomous

Agent can also run the rebalance crank and optimize across positions.

Inheritance

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.

On-chain interface

Core instructions.

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.

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.