Skip to main content
The Reserve account represents a lending pool for a specific asset (e.g., SOL, USDC). It tracks liquidity, collateral, interest rates, fees, and configuration parameters.

Reserve

version
u64
Program version number
last_update
LastUpdate
Last update tracking slot, staleness, and price status flags
lending_market
Pubkey
Parent lending market account this reserve belongs to
farm_collateral
Pubkey
Optional farm account for collateral token staking rewards
farm_debt
Pubkey
Optional farm account for debt token staking rewards
liquidity
ReserveLiquidity
Liquidity state tracking available and borrowed amounts
collateral
ReserveCollateral
Collateral token state (cTokens representing deposits)
config
ReserveConfig
Reserve configuration parameters
borrowed_amount_outside_elevation_group
u64
Total borrowed against this reserve outside elevation groups
borrowed_amounts_against_this_reserve_in_elevation_groups
[u64; 32]
Per-elevation-group borrowed amounts against this reserve
withdraw_queue
WithdrawQueue
Withdrawal queue state for managing delayed withdrawals

Key Concepts

Utilization Rate

The utilization rate is calculated as: borrowed_amount / total_supply

Collateral Exchange Rate

The exchange rate between collateral tokens (cTokens) and liquidity tokens changes over time as interest accrues.

Interest Accrual

Interest is compounded continuously based on the borrow rate curve and current utilization.

Account Size

The Reserve account has a fixed size defined by RESERVE_SIZE constant (approximately 3KB).
  • BorrowRateCurve: Defines interest rates at different utilization points
  • TokenInfo: Oracle configuration and price feed settings
  • WithdrawalCaps: Time-based rate limiting configuration

Build docs developers (and LLMs) love