Skip to main content

Managing Allocations

As a curator, you can update your vault's allocation strategy over time. Changes are timelocked to protect depositors.

Updating Allocations

The Timelock

Allocation changes don't take effect immediately. When you submit an update:

  1. New allocations are stored as pending_allocations
  2. A timelock starts (minimum 24 hours)
  3. Depositors can see the pending changes and exit if they disagree
  4. On the next eligible rebalance after the timelock expires, the changes activate

This protects depositors from surprise strategy switches.

Submitting an Update

oblivion vault update-allocation <vault-id> \
--allocations '[{"mint":"...","targetWeightBps":5000},{"mint":"...","targetWeightBps":5000}]' \
--timelock-secs 86400

Weights must sum to 10,000 bps. The timelock must be at least 86,400 seconds (24 hours).

Orphan Guard

If you're removing an allocation, the corresponding VaultReservePosition must have zero shares first. This prevents stranding funds in a removed allocation. Move liquidity out before removing the allocation.

Rebalancing

Rebalancing brings the vault's actual allocations back in line with targets when drift exceeds your threshold.

Same-Mint Rebalancing

Moving funds between reserves of the same token (e.g., USDC-idle to USDC-Kamino):

oblivion reserve move-liquidity <vault-id> \
--from-reserve <reserve-a> \
--to-reserve <reserve-b> \
--amount <native-amount>

Cross-Mint Rebalancing

Swapping between different tokens (e.g., selling SOL to buy USDC) uses a two-phase swap:

  1. rebalance_swap_begin — locks the vault, validates conditions
  2. Keeper executes the swap via Jupiter or Titan router
  3. rebalance_swap_end — validates results, updates positions, unlocks vault

Both instructions must be in the same transaction. The keeper handles this automatically.

When Does Rebalancing Happen?

The keeper triggers a rebalance when:

  • The vault's cadence period has elapsed (weekly/monthly/quarterly)
  • At least one allocation has drifted beyond the rebalance_threshold_bps
  • Accrued fees have been collected first (fee guard)

Pausing Your Vault

If you need to halt operations temporarily:

oblivion vault pause <vault-id>
oblivion vault unpause <vault-id>

When paused:

  • New deposits are blocked
  • Withdrawals are still allowed (depositors can always exit)
  • Rebalancing is blocked