delta-vault holds user deposits, maintains a delta-neutral hedge via
kimia-perp, and distributes accrued funding to vault share holders.
Accounts
Vault
["vault", perps_market].
| Field | Type | Notes |
|---|---|---|
authority | Pubkey | Admin |
perps_market | Pubkey | kimia-perp::Market this vault hedges on |
perps_market_index | u16 | |
perps_user_account | Pubkey | Vault’s user account inside kimia-perp |
share_mint | Pubkey | SPL mint for vault shares |
usdc_vault | Pubkey | USDC token account (vault PDA authority) |
wsol_vault | Pubkey | wSOL token account (spot leg) |
spot_pool | Pubkey | kimia-perp::SpotPool the vault swaps against |
nav | u64 | Net asset value, USDC 6-decimal |
total_shares | u64 | |
insurance_fund | u64 | |
insurance_skim_bps | u16 | configurable per vault (e.g. 3000 = 30%) |
rebalance_threshold_bps | u16 | triggers rebalance() |
state | VaultState | Active, Paused, Closed |
last_realized_pnl_snapshot | i64 | used by claim_funding |
last_wsol_balance | u64 | for rebalance diffs |
share_price() = nav × ONE / total_shares (9-decimal fixed point).
Instructions
| Instruction | Who | Purpose |
|---|---|---|
initialize_vault | admin | Create Vault PDA, share mint, USDC vault |
admin_seed_insurance | admin | Bootstrap the insurance fund |
init_perps_user_account | admin | One-time CPI to create vault’s perp user |
admin_setup_spot_leg | admin | Configure wSOL vault + spot pool |
deposit | user | Mint shares; optionally open hedge |
withdraw | user | Burn shares; optionally close hedge |
rebalance | anyone | Close delta gap if > rebalance_threshold_bps |
claim_funding | anyone | CPI settle_funding, route yield to NAV + insurance |
admin_resync_nav | admin | Emergency NAV reconciliation |
admin_unwind_vault | admin | Force close all positions (requires Paused) |
admin_simulate_funding | admin (demo) | Inject synthetic yield for testing |
admin_force_pause | admin (demo) | Pause vault manually |
Deposit flow
deposit are orderbook counterparty accounts used
by place_order.
claim_funding flow
Withdraw flow
Errors
VaultNotActive, VaultNotPaused, MathOverflow, StaleOracle,
PerpsUserAccountNotInit, NavCorrupted, InsufficientInsuranceFund,
RebalanceGapTooSmall.
Read next
Delta-neutral concept
The math and motivation.
split-engine
Wrap vault shares into PT/YT.

