Seamless integration flow designed for composability.
Deposit
Earn
Claim
INTEGRATION ARCHITECTURE
Earn Integration Model
Earn integrations involve four core areas.
Vaults
Transactions
Positions
Risk
Vault Metadata & Markets
Discover vaults and retrieve their configuration, allocation strategy, performance metrics, and active incentive programs.
Discover all available vaults via /kvaults/vaults
APY, TVL, allocation breakdown
Reserve allocation weights and caps
Vault token metadata (mint, decimals, symbols)
Active farm incentives and bonus yield
Deposits & Withdrawals
Generate deposit and withdrawal transactions, manage token approvals, and mint or redeem vault share tokens when users enter or exit a vault.
Deposit and withdrawal instruction generation
ATA creation and token approval handling
Transaction status monitoring
kToken receipt confirmation
Positions & Accounting
Access user vault positions, including share balances, exchange rates, yield accrual, and historical performance metrics.
User vault share balances
Vault exchange rate via getExchangeRate()
Historical performance via /metrics/history
Yield accrual via share price appreciation
Farm reward tracking and claimable balances
Risk & Allocation
Retrieve vault allocation strategy, underlying reserve exposure, risk parameters, and fee configuration to evaluate how vault capital is deployed.
Underlying reserve allocations
Allocation caps and weights
Performance and management fee rates
Withdrawal penalty bps
Active reward programs
INTEGRATION GUIDE
Implementing Earn Flows
Practical SDK and API examples for integrating core Earn flows.
Vault Operations
Deposits and Withdrawals
Deposits and withdrawals to Earn vaults are available via the TypeScript SDK or the REST API. Both interfaces provide access to vault, user, and lending market data required for integration.
import { createSolanaRpc, address, generateKeyPairSigner } from '@solana/kit';import { KaminoVault } from '@kamino-finance/klend-sdk';import { Decimal } from 'decimal.js';const signer = await generateKeyPairSigner();const vault = new KaminoVault( createSolanaRpc('https://api.mainnet-beta.solana.com'), address('HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E'));const depositIxs = await vault.depositIxs( signer, new Decimal(100.0));
Both: Access vault metadata including allocations, fee configuration (management, performance, withdrawal), and strategy parameters.
SDK: Track reward APY across base lending yield, delegated farm incentives, and reserve farm incentives.
API: Access real-time reserve token prices via the Kamino oracle.
API: Retrieve current and historical reserve metrics: supplyApy, borrowApy, totalSupply, totalBorrow, utilizationRate.
Both: Track user transactions, current positions, and position history across multiple vaults
A vault may include a reward farm, allowing depositors to earn extra reward tokens in addition to the base lending yield. Rewards may be distributed by the vault or by the underlying lending markets it allocates to.
Delegated Farm Incentives
Additional reward tokens distributed at the vault level, layered on top of lending yield.
Reserve Farm Incentives
Reward tokens originating from underlying lending market reserves allocated by the vault.