Kamino Lend: the klend program you actually integrate
Mainnet program KLend2g3c…. Isolated markets you can configure. Integrate via TypeScript SDK, REST, Rust CPI, or CLI — not by guessing an Aave clone.
devrels.xyz/a/262Kamino Lend: the klend program you actually integrate. If you only know Kamino as a pretty borrow/lend UI, the builder surface is the open-source program at github.com/Kamino-Finance/klend. This is that program: markets, reserves, vaults, and how you talk to it without reverse-engineering the website.
What klend is
KLend is a Solana lending program (Anchor-era layout, Rust). Users deposit into reserves, borrow against collateral, get liquidated if they go over the line. The product twist is isolated markets plus optional vaults that sit on top and allocate across those reserves.
You do not get one giant shared risk pool. A market is its own island: its own reserves, LTV, oracles, farms, and admin. That is why curators (Allez, Gauntlet, Rockaway, Steakhouse, Sentora, and others) can run different books on the same program.
Program IDs (pin these)
From the official README. Devnet currently reuses the mainnet id — treat that as “same program binary,” not “same accounts.”
| Cluster | Program id |
|---|---|
| Mainnet | KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD |
| Staging (mainnet) | SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh |
| Devnet | KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD |
If you CPI or subscribe via Geyser, filter these ids — not a random “Kamino” account you saw in a wallet.
Markets, reserves, vaults
Start from the job you actually have.
- App / wallet / bot talking to existing markets — you need positions, health, deposit/borrow/repay/withdraw txs. Use the TypeScript SDK or REST. You almost never deploy a market.
- Curator launching a book — create an isolated market, add reserves (LTV, liquidation threshold, rate curve, oracle), optional collateral/debt farms, then transfer admin to a Squads multisig before you take deposits.
- Vault product — one deposit token, allocation weights and caps across reserves, share token out, fees and rewards on the vault. Users hold shares; the vault holds the lending positions.
Official curator docs walk vault deploy → allocation → routing → fees, and market create → reserves → rewards → multisig. Use those for the flag list; don’t copy a competitor’s “create pool” checklist.
How builders actually integrate
Kamino documents a full toolchain. Pick the thinnest one that ships your feature.
- REST API — market data, user positions, unsigned transactions. Good for backends and “don’t run a full RPC decoder.”
- TypeScript SDK —
@kamino-finance/klend-sdk(npm). On-chain reads and tx building. Pair with klend-sdk. - Rust crate — bots, liquidators, on-chain CPI from another program.
- CLI — ops:
yarn kamino-manager create-market —mode executeand friends for markets, reserves, vaults. - AI extras — they ship llms.txt / skill.md if you want an agent to read the stack. Still verify against live program ids.
# TypeScript client (version pin from npm — check latest before lockfile)
npm i @kamino-finance/klend-sdk
# Program source
git clone https://github.com/Kamino-Finance/klend.gitTypical app path: load market + reserve accounts via SDK → compute user obligation health → build deposit or borrow ix → simulate → send. Don’t hand-roll obligation math if the SDK already does it.
Oracles: Scope, not a random Pyth account
Kamino runs Scope, their oracle aggregator (Kamino-Finance/scope, plus a TypeScript scope-sdk). Reserves point at configured feeds. If you are adding a reserve, the oracle choice is a risk decision, not a styling choice. If you are only reading prices for UI, prefer the same feed the reserve uses so your health number matches liquidators.
Related Kamino repos you will bump into
klend is the lending core. Nearby:
- klend-sdk — TS client
- kliquidity-sdk — liquidity / CLMM-adjacent product surface
- farms-sdk / kfarms — reward farms on collateral and debt
- audits — Kamino-Finance/audits
Don’t CPI the liquidity program when you meant klend. Program ids are cheap to print and expensive to confuse.
A sane first week
- Clone klend. Confirm the three program ids above still match README.
- Install
@kamino-finance/klend-sdk. Read one mainnet market and one user obligation on a throwaway wallet. - Build deposit + withdraw against a tiny size. Simulate every time.
- Only then look at borrow, liquidation hooks, or vault shares.
- If you are a curator: market → reserves → farms → Squads. Do not leave admin on a hot key.
People and links
| What | Where |
|---|---|
| Product | kamino.finance |
| Docs | docs.kamino.finance |
| Program | github.com/Kamino-Finance/klend |
| TS SDK | klend-sdk · npm @kamino-finance/klend-sdk |
| X | @kamino |
Resources
Keep reading
First non-EVM chain for 0x Swap API. Instructions-only design so Solana apps keep control of CU, priority fees, and landing.
One SDK surface for quoting and executing value across Solana and 20+ other chains — intent solver, money market, bridge — plus agent skills.
polymarket-rs gives you a typed Rust interface to Polymarket's order book — ClobClient for unauthenticated market data, TradingClient for placing and managing orders, WebSocket clients for real-time streaming. No panics, newtype IDs, alloy-backed EIP-712 signing. Here's the full API surface and how to go from Cargo.toml to a live order.
Get new articles in your inbox
Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.
