Module state

Module state 

Source
Expand description

State types

Structs§

CalculateBorrowResult
Calculate borrow result
CalculateLiquidationResult
Calculate liquidation result
CalculateRepayResult
Calculate repay result
CollateralExchangeRate
Collateral exchange rate
InitLendingMarketParams
Initialize a lending market
InitObligationParams
Initialize an obligation
InitReserveParams
Initialize a reserve
LastUpdate
Last update state
LendingMarket
Lending market state
NewReserveCollateralParams
Create a new reserve collateral
NewReserveLiquidityParams
Create a new reserve liquidity
Obligation
Lending market obligation state
ObligationCollateral
Obligation collateral state
ObligationLiquidity
Obligation liquidity state
Reserve
Lending market reserve state
ReserveCollateral
Reserve collateral
ReserveConfig
Reserve configuration values
ReserveFees
Additional fee information on a reserve
ReserveLiquidity
Reserve liquidity

Enums§

FeeCalculation
Calculate fees exlusive or inclusive of an amount

Constants§

INITIAL_COLLATERAL_RATIO
Collateral tokens are initially valued at a ratio of 5:1 (collateral:liquidity)
LIQUIDATION_CLOSE_AMOUNT
Obligation borrow amount that is small enough to close out
LIQUIDATION_CLOSE_FACTOR
Percentage of an obligation that can be repaid during each liquidation call
MAX_LIQUIDATABLE_VALUE_AT_ONCE
Maximum quote currency value that can be liquidated in 1 liquidate_obligation call
MAX_OBLIGATION_RESERVES
Max number of collateral and liquidity reserve accounts combined for an obligation
PROGRAM_VERSION
Current version of the program and all new accounts created
SLOTS_PER_YEAR
Number of slots per year
STALE_AFTER_SLOTS_ELAPSED
Number of slots to consider stale after
UNINITIALIZED_VERSION
Accounts are created with data zeroed out, so uninitialized state instances will have the version set to 0.