Protocols / Lending
Kamino Lend
Peer-to-pool lending and borrowing on Solana (klend program). An agent can deposit liquidity to earn interest, deposit collateral, borrow against it, repay, withdraw, and use flash loans. Kamino also exposes a REST API for market data and transaction builders.
On-chain + APISOLANA1 contractsWebsite · Docs
get_protocol({ "protocol": "kamino-lend" })Risks an agent should know
- Borrowing can be liquidated when LTV passes the reserve limit. Liquidators can repay debt and take collateral at a discount. Watch health (LTV) and keep a margin.
- Oracle and price moves: collateral and debt values depend on oracle prices. A bad or stale price can trigger liquidations or block withdrawals.
- Interest rates are variable and change with utilization. Supplied liquidity can be temporarily unavailable to withdraw when a reserve is highly utilized.
- Smart contract risk: the program is an upgradeable Solana program maintained by Kamino. Audits reduce risk but do not remove it.
- Refresh instructions must be included before borrow, withdraw and liquidation. Transactions without them fail or use stale values.
What an agent can do
| supply | Deposit liquidity into a reserve to earn interest deposit_reserve_liquidity(amount) on the klend program, or the Kamino API transaction builder under /ktx/klend/deposit |
| borrow | Borrow against deposited collateral init_user_metadata and init_obligation once per wallet and market; deposit collateral; refresh_reserve(s) and refresh_obligation; then borrow_obligation_liquidity_v2(amount) in the same transaction |
| repay | Repay borrowed liquidity refresh the reserve, then repay_obligation_liquidity_v2(amount); or repay_and_withdraw_and_redeem for repay plus collateral release |
| withdraw | Withdraw supplied liquidity redeem_reserve_collateral(ctoken_amount) after refresh_reserve |
| flash-loan | Borrow and repay in one transaction flash_borrow_reserve_liquidity(amount), other instructions, then flash_repay_reserve_liquidity(amount, borrow_index) in the same transaction |
Contracts
solana
| Contract | Address | Key functions | Try |
|---|---|---|---|
| klend lending program (mainnet) pool | KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD source | writedeposit_reserve_liquidity(liquidity_amount: u64) writeredeem_reserve_collateral(collateral_amount: u64) writeinit_user_metadata(user_lookup_table: Pubkey) writeinit_obligation(args: InitObligationArgs) writerefresh_reserve() writerefresh_reserves_batch(skip_price_updates: bool) writerefresh_obligation() writedeposit_obligation_collateral_v2(collateral_amount: u64) +9 more via get_protocol |
APIs
| Kamino API: list lending markets auth: none | https://api.kamino.finance/v2/kamino-market GET the list of lending markets (market pubkeys and metadata). Use it to find the main market and its reserves before building transactions. Base URL taken from Kamino's own tutorial code; the API reference was not readable in full during research. |
| Kamino API: reserve metrics history auth: none | https://api.kamino.finance/kamino-market/{market}/reserves/{reserve}/metrics/history GET historical supply APY and borrow APY for one reserve. |
| Kamino API reference auth: none | https://api-docs.kamino.com Full OpenAPI reference for market data and transaction builders (for example the klend deposit and withdraw routes under /ktx/). Check exact parameters here before use. |
Notes
Mainnet program id KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD is listed for mainnet and devnet on the official README. The staging program SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh (a separate test deployment) is left out. Lending market and reserve account addresses are not included because they could not be confirmed from an official page in this research; get them from the Kamino API or the SDK. Keyfunctions are from the program's lib.rs instruction list; the deprecated v1 variants are omitted. Kamino vaults (kvault) are a separate product and are not covered here.
Sources
- https://api.llama.fi/protocol/kamino-lend
- https://github.com/Kamino-Finance/klend
- https://raw.githubusercontent.com/Kamino-Finance/klend/master/programs/klend/src/lib.rs
- https://kamino.com/docs
- https://kamino.com/docs/build/tutorials/borrow
- https://kamino.com/docs/build/borrow/market-data-metrics.md
- https://kamino.com/build/api-reference/introduction
- https://api-docs.kamino.com
- https://api.mainnet-beta.solana.com
Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.