Skip to main content
Deposit assets as collateral or supply liquidity into Kamino lending reserves. The SDK handles transaction building, instruction creation, and obligation management for deposit operations.

Deposit for Lending

Supply liquidity to the reserve and earn interest.
1

Import Dependencies

2

Load Market and Initialize RPC

3

Build Deposit Instructions

Supply USDC to the reserve. The wallet receives the reserve’s cTokens, which grow in value as borrowers pay interest.
This doesn’t open a borrow position, so the obligation prop is required by the type but unused. A market can hold several reserves for the same token, so actions take a reserve address: getExistingFloatRateReserveByMint returns the variable-rate one. Redeem the cTokens with Redeem cTokens.
4

Build the Transaction

5

Sign and Send

The deposit is complete. The USDC is supplied to the reserve and earning interest.

Deposit for Borrowing

Deposit USDC as collateral to borrow other assets.
1

Import Dependencies

2

Load Market and Initialize RPC

3

Build Deposit Instructions

Deposit USDC as collateral into the wallet’s borrow position.
A first deposit also creates the wallet’s user metadata and obligation accounts. skipLutCreation: true keeps that setup in the same transaction. Without it, the SDK also creates a user lookup table, which only activates a slot later, and the deposit fails with 0x17a3.
4

Build the Transaction

5

Sign and Send

The deposit is complete. The collateral is now deposited and can be used for borrowing other assets.