Skip to main content
This guide deposits USDC into the delta-vault with open_perp=true, which simultaneously opens the matching SOL short to keep the vault delta-neutral.

1. Resolve PDAs

2. Post the oracle (required for the spot leg)

Same pattern as the perp guide, Hermes fetch + PythSolanaReceiver.buildPostPriceUpdateInstructions.

3. Deposit

What happens on chain

1

USDC → vault

Full amount transferred into vault.usdc_vault.
2

Mint shares

Shares minted to userShareAta: sharesOut = amount × totalShares / NAV (or amount on the first deposit).
3

Spot leg

amount / 2 swapped to wSOL via kimia-perp::spot_swap.
4

Perp leg

amount / 2 deposited as perp collateral; a short of sizeAmount opened.

Claim funding

Accrued funding is not live, it only updates NAV when someone cranks claim_funding. Anyone can do this. The vault auto-settles via CPI:
After the crank, share price jumps by the post-skim yield, and subsequent deposits get fewer shares for the same USDC.

Withdraw

With closePerp=true, the vault buys back a share-weighted portion of the perp short and swaps the corresponding wSOL back to USDC before returning funds.