Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kamino-finance/klend/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Kamino Lending is deployed as an Anchor program on Solana. The program is already deployed to mainnet and devnet at well-known program IDs. This guide covers deployment for testing environments and configuration management.Program IDs
Kamino Lending uses different program IDs for staging and production:- Production:
KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD - Staging:
SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh - Localnet:
KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD(configurable)
programs/klend/src/lib.rs using Anchor’s declare_id! macro.
Anchor Configuration
TheAnchor.toml file configures the build and deployment settings:
Key Configuration Options
- cluster: Target deployment cluster (localnet, devnet, mainnet-beta)
- wallet: Path to deployer wallet keypair
- programs: Maps program names to their on-chain addresses
Building the Program
Build the Kamino Lending program using Anchor:- Program binary in
target/deploy/ - IDL (Interface Definition Language) file in
target/idl/ - TypeScript client in
target/types/
Build Features
The program supports conditional compilation:Deploying to Localnet
For local testing and development:Deploying to Devnet
UpdateAnchor.toml to target devnet:
Program Upgrades
Upgrade Authority
The program upgrade authority controls who can upgrade the deployed program. Set this carefully:Performing Upgrades
Program Versioning
Kamino Lending tracks the program version inutils/consts.rs:
handler_refresh_reserve.rs:19 for version validation.
Security Considerations
Audits
Kamino Lending has been audited by:- OtterSec
- Offside Labs
- Certora
- Sec3
Security Contact
Report security issues to: security@kamino.financeImmutable Markets
Once a lending market is set to immutable (viaUpdateLendingMarketMode::UpdateImmutableFlag), most configuration changes are prevented. This provides additional security guarantees for users.
Post-Deployment Steps
- Initialize Global Config: Create the global configuration account using
init_global_config - Create Lending Market: Initialize at least one lending market using
init_lending_market - Add Reserves: Initialize reserves for each supported token using
init_reserve - Configure Parameters: Set appropriate LTV ratios, interest rates, and limits
- Verify Configuration: Test all operations on devnet before mainnet deployment
Testing Deployments
Run the test suite against your deployment:Monitoring Deployment Health
After deployment, monitor:- Program upgrade authority ownership
- Account rent status (all PDAs should be rent-exempt)
- Initial market and reserve configurations
- Admin key security