Skip to main content
Deposit collateral (supply assets) into an existing Jupiter Lend borrow position. The SDK builds operate instructions with a positive collateral amount and zero debt change. Transactions use versioned (v0) format with address lookup tables.

Deposit

1

Import Dependencies

Import the required packages for Solana RPC, Jupiter Lend borrow SDK, and versioned transaction building.
Deposit uses getOperateIx with positive colAmount and zero debtAmount. Versioned transactions and address lookup tables are required.
2

Load Keypair and Initialise Connection

Load the signer and create the RPC connection. Set vault ID, position ID, and deposit amount.
Pass positionId: 0 to batch init position + deposit in one transaction. The SDK returns nftId (your new position ID) for future operations. If you already have a position, use its nftId instead.
3

Build Deposit Instructions

Build operate instructions with positive collateral amount and no debt change.
Deposit is operate with colAmount > 0 and debtAmount = 0. Your supplied tokens are locked as collateral and increase your borrowing capacity.
4

Build and Sign Transaction

Build a v0 message with the instructions and address lookup tables, then sign.
5

Send and Confirm Transaction

Send the transaction and confirm.
After depositing, you can Borrow against this collateral. Monitor your LTV to avoid liquidation.

Operate parameters

getOperateIx accepts the following parameters: For deposit: colAmount > 0, debtAmount = 0.
Deposit adds collateral (supply token) to your position. Borrow withdraws the borrow token from the vault to your wallet and increases your debt. Deposit first, then borrow.

Full code example