Skip to main content
Use these instructions when your strategy vault should interact with Kamino Lend. For direct Kamino Vault deposits and direct Kamino Farm staking, see Kamino Vault instructions and Kamino Farm instructions.

Transaction structure

Every Kamino Lend action goes through createVaultSyncTransaction.
Kamino refresh instructions must stay top-level. Send the result in this order: setupInstructions, then preInstructions, then instruction, then postInstructions.

One-time setup

Before deposit, withdraw, borrow, or repay, the managed vault usually needs two Kamino Lending accounts.

Init user metadata

Creates the Kamino UserMetadata PDA for the managed vault owner.

Init obligation

Creates the Kamino Obligation PDA for one lending market.
Both setup actions are safe to include before a lending action in the same createVaultSyncTransaction call.

Deposit

kaminoAction.deposit deposits the vault’s reserve token ATA into a Kamino reserve and receives reserve collateral inside the obligation.

Parameters

A matching policy must exist before you execute the transaction. See Policy Builders.

Withdraw

kaminoAction.withdraw redeems reserve collateral back into the vault’s reserve token ATA.

Parameters

You specify the underlying token amount. The SDK resolves the collateral-side accounting from the reserve state.
A matching policy must exist before you execute the transaction. See Policy Builders.

Borrow

kaminoAction.borrow borrows reserve liquidity against the vault’s Kamino obligation.

Parameters

A matching policy must exist before you execute the transaction. See Policy Builders.

Repay

kaminoAction.repay repays borrowed reserve liquidity.

Parameters

A matching policy must exist before you execute the transaction. See Policy Builders.

Full flow example

This flow deposits USDC into Kamino Lend, borrows SOL, repays the SOL borrow, and then withdraws the USDC collateral.

Step 1: Setup and deposit

Step 2: Borrow SOL against collateral

Step 3: Repay the SOL borrow

Step 4: Withdraw USDC collateral

Available asset keys

Look up the supported reserve keys for one Kamino market:

SOL handling

The SDK wraps and unwraps SOL automatically when the Kamino action uses SOL.