Skip to main content
Use these instructions when your strategy vault should hold a direct Kamino Vault position.

Choose an execution API

Use the API that matches how much control you want over execution:
Kamino Vault deposits currently build one sync transaction result. The plural helper is mainly useful for smart omitted-reserve withdraws, because those can expand into multiple reserve-specific sync transactions.
In the current SDK, omitted-reserve Kamino Vault withdraws are the only Kamino Vault actions that can expand into multiple VaultSyncTransactionResult values. Other Kamino Vault calls still return one result.

Transaction structure

createVaultSyncTransaction returns one low-level sync transaction result with four parts:
createVaultSyncTransactions and createVaultSyncTransaction both default autoManagePositions to false. VaultTransactionBuilder defaults it to true.
createVaultSyncTransactions returns the same structure in an array. Send those results sequentially in the order returned.

Deposit

kaminoVaultAction.deposit moves the vault’s deposit token ATA into a Kamino Vault and mints Kamino Vault shares back to the managed vault.

Parameters

The SDK always adds an idempotent shares ATA creation instruction for the managed vault before the deposit runs.

Withdraw

kaminoVaultAction.withdraw burns Kamino Vault shares from the managed vault and withdraws the underlying deposit token back to the managed vault ATA.

Parameters

reserve is not the Kamino Vault itself. A Kamino Vault has its own token_vault and shares_mint, and it can allocate capital across one or more underlying Kamino Lend reserves. The raw invested-withdraw path is reserve-specific, so reserve overrides which underlying reserve leg to unwind.
If you omit reserve, the SDK plans the withdraw across the Kamino Vault’s allocated reserves automatically. createVaultSyncTransactions returns however many sync transaction results that plan needs. VaultTransactionBuilder does the same at a higher level and sends the resulting transaction sets sequentially for you. Use createVaultSyncTransaction only when you specifically want the call to fail unless the full withdraw fits in one sync transaction.