Skip to main content

Kamino Lending Protocol

Open source lending protocol for the Solana blockchain. Build lending and borrowing features with decentralized, capital-efficient smart contracts.

Quick Start

Get up and running with Kamino Lending in minutes

1

Review the architecture

Understand how Kamino Lending works with lending markets, reserves, and obligations.
// Program ID: KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD (Mainnet & Devnet)
// Staging:    SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh (Mainnet)
  • Mainnet: KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
  • Staging (Mainnet): SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh
  • Devnet: KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
2

Set up your environment

Install the necessary dependencies to interact with the Kamino Lending program.
# Add the Anchor dependency
anchor-lang = "0.29.0"
anchor-spl = "0.29.0"
Learn more in the Integration Setup guide.
3

Make your first deposit

Deposit liquidity into a reserve to start earning interest or use as collateral.
pub fn deposit_reserve_liquidity(
    ctx: Context<DepositReserveLiquidity>,
    liquidity_amount: u64,
) -> Result<()>
Follow the Deposit & Withdraw guide for complete examples.
4

Explore advanced features

Leverage flash loans, referral rewards, elevation groups, and auto-deleveraging for sophisticated DeFi applications.Check out Advanced Features to learn more.

Core Concepts

Master the fundamental building blocks of Kamino Lending

Architecture

Learn how lending markets, reserves, and obligations work together in the protocol.

Reserves

Understand reserve configuration, liquidity management, and interest rate models.

Obligations

Explore how user positions track collateral deposits and borrowed assets.

Collateral & Liquidity

Discover how collateral ratios, liquidation thresholds, and borrow limits are calculated.

Integration Guides

Step-by-step guides to integrate Kamino Lending into your application

Setup

Configure your project and connect to the Kamino Lending program.

Deposit & Withdraw

Enable users to supply and withdraw liquidity from reserves.

Borrow & Repay

Implement borrowing against collateral and loan repayment flows.

Liquidations

Build liquidation bots to maintain protocol health and earn rewards.

Advanced Features

Unlock powerful DeFi capabilities for sophisticated use cases

Flash Loans

Execute uncollateralized loans within a single transaction for arbitrage and more.

Referral System

Earn referral fees by bringing users and liquidity to the protocol.

Elevation Groups

Use risk tiers to create isolated lending pools with custom parameters.

Auto-Deleveraging

Learn how the protocol automatically manages risky positions during volatility.

Ready to build?

Explore the complete program reference with detailed instruction documentation, account structures, and error codes.

View Program Reference

Resources

Connect with the community and access additional resources

GitHub Repository

View the source code, report issues, and contribute to the protocol.

Kamino Finance

Visit the official Kamino Finance website to learn more about the platform.

Security

Review our security policy and audits by OtterSec, Offside Labs, Certora, and Sec3.

Contact Security Team

Report security vulnerabilities directly to our team.