Overview
Kamino Lending uses a sophisticated system of collateral ratios and liquidity metrics to manage risk while maximizing capital efficiency. This page explains how these mechanisms work together to maintain protocol solvency.Collateral Ratios
Each reserve has multiple ratio parameters that govern borrowing and liquidations:Maximum Loan-to-Value (LTV)
The max LTV determines how much users can borrow against their collateral (fromstate/reserve.rs:1341):
- Stablecoins (USDC, USDT): 85-90%
- Major assets (SOL, ETH): 70-75%
- Volatile assets: 50-60%
- Exotic/risky assets: 25-40%
Liquidation Threshold
The liquidation threshold is higher than max LTV, providing a safety buffer (fromstate/reserve.rs:1343):
Calculating Position LTV
For multi-collateral positions, LTV is calculated as a weighted average: Allowed Borrow Value (from obligation refresh logic):Multi-Asset Example
Borrow Factor
Borrow factors adjust debt value for risk management (fromstate/reserve.rs:1362):
How Borrow Factors Work
Borrow factors multiply the debt’s impact on LTV calculations: Without Borrow Factor (100%):state/reserve.rs:169):
Purpose of Borrow Factors
- Volatility Protection: Higher factors for volatile assets
- Oracle Risk: Higher factors when price feeds are less reliable
- Liquidity Risk: Higher factors for assets with limited DEX liquidity
- Asymmetric Risk: Protects against rapid price drops
Setting Borrow Factors
Typical Values:- Stablecoins: 100% (no adjustment)
- Major assets: 100-110%
- Volatile assets: 115-130%
- High-risk assets: 130-150%
Utilization Rate
Utilization measures how much of the available liquidity is borrowed (fromstate/reserve.rs:977):
Interest Rate Model
Interest rates dynamically adjust based on utilization via a piecewise linear curve.Borrow Rate Curve
Fromutils/borrow_rate_curve.rs:21:
Rate Calculation
Fromutils/borrow_rate_curve.rs:279:
Example Curve
- Low rates at low utilization → encourage borrowing
- Moderate rates at mid utilization → balanced market
- High rates at high utilization → encourage repayment and deposits
- Very high rates near 100% → prevent liquidity exhaustion
Supply APY Calculation
Lenders earn interest on the borrowed portion:Interest Compounding
Interest compounds every slot (fromstate/reserve.rs:1810):
Liquidation Mechanics
Liquidation Bonus
Liquidators receive bonus collateral as incentive (fromstate/reserve.rs:1345):
Close Factor
Limits how much debt can be repaid in a single liquidation (fromstate/lending_market.rs:67):
- Prevents excessive liquidation of slightly underwater positions
- Allows multiple liquidators to participate
- Reduces liquidation slippage impact
Bad Debt Handling
When a position’s debt exceeds collateral value:- Maximum Bonus Applied:
bad_debt_liquidation_bonus_bps - Socialized Loss: If collateral insufficient, loss may be socialized
- Protocol Insurance: Some protocols maintain insurance funds
lib.rs:95:
Deposit and Borrow Limits
Deposit Limits
Fromstate/reserve.rs:1365:
- Risk concentration limits
- Oracle reliability considerations
- Liquidation capacity constraints
Borrow Limits
Multiple layers of borrow limits:- Reserve-level (from
state/reserve.rs:1367):
- Outside elevation group (from
state/reserve.rs:1400):
- Per-elevation-group (from
state/reserve.rs:1406):
- Market-level (from
state/lending_market.rs:84):
Limit Tracking
When limits are crossed, timestamps are recorded (fromstate/reserve.rs:477):
Utilization-Based Restrictions
Borrowing can be disabled above certain utilization (fromstate/reserve.rs:1380):
Risk Parameter Guidelines
Setting LTV Ratios
Setting LTV Ratios
Factors to Consider:
- Asset volatility (lower LTV for volatile assets)
- Oracle reliability (lower LTV for less reliable oracles)
- DEX liquidity (lower LTV for illiquid assets)
- Correlation (higher LTV for correlated pairs in elevation groups)
Configuring Borrow Factors
Configuring Borrow Factors
Risk-Based Tiers:Special Considerations:
- Elevation groups: Often 100% (isolated risk)
- Wrapped assets: Match or exceed underlying
- Governance tokens: Higher factors due to governance risk
Interest Rate Curves
Interest Rate Curves
Design Principles:
- Low rates (0-40% utilization) → encourage borrowing
- Moderate increase (40-80%) → balanced market
- Steep increase (80-95%) → protect liquidity
- Very steep (95-100%) → emergency rates
Liquidation Parameters
Liquidation Parameters
Bonus Range:Close Factor:
- 25-50% for most reserves
- Higher (50-75%) for stablecoins
- Lower (20-25%) for volatile assets
Formula Reference
LTV Calculations
Interest Calculations
Liquidation Calculations
Related Concepts
Reserves
Learn about reserve configuration and interest rate models
Obligations
Understand user positions and health calculations