Skip to main content
The delta-vault program is the yield engine of Kimia. It takes USDC from depositors, holds half of it, and sells the other half into a SOL-PERP short, so the vault’s value stays flat as SOL price moves, but accrues the funding rate.

The insight

In crypto, longs pay shorts funding whenever perp price > spot. Historically this has averaged positive, double-digit APY on major assets. A delta-neutral vault earns that funding without betting on price direction.
 +1 SOL spot exposure  (wSOL held by the vault)
 -1 SOL perp exposure  (short on kimia-perp)
 ───────────────────
  0  net SOL exposure   → pure funding-rate yield

How a deposit works

1

User calls deposit(amount, open_perp=true, size_amount)

USDC is transferred from the user into vault.usdc_vault. Vault shares are minted proportional to existing NAV.
2

Vault buys wSOL on the spot leg

Via CPI to kimia-perp::spot_swap, half the USDC is swapped for wSOL at the oracle price (plus a small spread).
3

Vault opens a SOL-PERP short

Via CPI to kimia-perp::deposit_collateral and kimia-perp::place_order, the other half of the USDC is posted as collateral and a market short is opened.
4

Rebalance threshold kicks in

If spot and perp legs diverge by more than rebalance_threshold_bps, anyone can call rebalance to close the gap.

Vault share price

sharePrice=NAVtotalShares\text{sharePrice} = \frac{\text{NAV}}{\text{totalShares}} sharesOut=amount×totalSharesNAV\text{sharesOut} = \frac{\text{amount} \times \text{totalShares}}{\text{NAV}} Both use 9-decimal fixed point. The first depositor receives shares = amount since totalShares starts at zero. NAV only moves when claim_funding is called. Between cranks, share price is constant, deposits/withdrawals are atomic and fair.

Funding accrual

claim_funding is the heart of the vault:
1

Snapshot realized_pnl

Read perps_user_account.realized_pnl before settlement.
2

CPI settle_funding

The vault PDA signs kimia-perp::settle_funding, which accrues the funding delta into the perp user account’s collateral.
3

Delta = post - pre

Any increase is positive funding yield.
4

Skim + distribute

insurance_skim_bps (configurable per vault, e.g. 30%) is kept in the insurance fund. The rest is added to nav, raising share price.
If the delta is negative, the insurance fund absorbs the loss first. Only if the insurance fund is depleted does NAV fall, and if that lasts 24 hours, the vault auto-pauses until an admin intervenes.

States

StateMeaningAllowed ops
ActiveNormal operationdeposit, withdraw, rebalance, claim_funding
PausedAuto- or admin-pausedwithdraw only (after unwind)
ClosedTerminal

Interaction with split-engine

Vault shares are fungible SPL tokens. The split-engine wraps them into PT + YT, so vault depositors can:
  • Hold shares → earn funding directly
  • Split them → sell YT now (fixed rate) or sell PT now (leverage on YT)
Both flows live on top of the same vault, the split is pure bookkeeping.

PT / YT tokenization

How the yield is split into two tradable tokens.

delta-vault reference

Accounts, instructions, CPIs.

Deposit into the vault

End-to-end walkthrough.