Protocol overview
Custody layer

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.

ProgramJ8HhLerVSWQT
GitHub
Stacking APY

Longer locks earn more. Up to 16% at 1-year+.

7–29 days
8.0%

Base rate. No lock bonus.

30–89 days
10.0%

+2 percentage points for a 30-day commitment.

90–179 days
12.0%

+4 pp for a quarter.

180–364 days
14.0%

+6 pp for half a year.

365–730 days
16.0%

+8 pp for a year or more. Maximum lock 2 years.

Early exit
−20%

Of accrued yield. Principal is safe; the compounding bonus is not.

The flywheel

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.

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 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.