Borrow
Borrow assets against your collateral.1
Import Dependencies
Import the required packages for Solana RPC communication, Kamino SDK operations, and Kit transaction building.@solana/kit provides modern utilities for RPC, transaction building, and
signing. @kamino-finance/klend-sdk contains market operation methods.2
Initialize RPC and Load Market
Initialize the RPC connection and load the Kamino market instance.KaminoMarket.load() fetches the current market state including all reserve
data and configuration.3
4
Build Borrow Instructions
Generate borrow instructions for the specified token and amount.buildBorrowTxns creates borrow instructions that withdraw assets from the
reserve pool to your wallet. The amount borrowed is added to your debt
obligation.5
Build and Sign Transaction
Combine all instructions and build the transaction using Kit’s functional pipe pattern.All setup, lending, and cleanup instructions are combined in a single
transaction for borrowing.
6
Send and Confirm Transaction
Send the transaction and confirm it using HTTP polling.Borrowing increases your debt and LTV ratio. Monitor your position to avoid
liquidation risk.
What Happens When You Borrow?
What Happens When You Borrow?
- USDT is withdrawn from the reserve pool and sent to your wallet
- Your borrow amount increases in your obligation
- You start accruing interest on the borrowed amount
- Your loan-to-value (LTV) ratio increases
- Your available borrowing capacity decreases
How Much Can You Borrow?
How Much Can You Borrow?
Your maximum borrow amount depends on:
- Your collateral value
- Loan-to-Value (LTV) ratio
- Current borrows
- Reserve liquidity
Interest and Repayment
Interest and Repayment
Interest:
- Accrues continuously based on the reserve’s borrow APY
- Compounds over time
- Varies based on reserve utilization
- You must repay borrowed amount + accrued interest
- Repay anytime to reduce debt and improve your position health
LTV
LTV
Keep LTV well below maximum:
- Monitor your position regularly
- Repay borrows or add collateral if LTV increases
- Be aware of price volatility