Building Blocks
Lending Market Owner/Authority:
This is the account that owns the entire pool -there is one for Main, Isolated, and etc.
Lending Market (State)
This contains all the reserves.
Reserves State (Market-level Positions)
For every pool, each token has its own reserve. This is where supply/balances are tracked, and is updated using the account value * pyth_price pulled from oracles.
Obligations State (User-level positions)
Each user’s position is called an obligation, and is updated using RefreshObligation by calling Pyth_price + the % of Liquidity provided (for supply) or cumulative borrow rate (for borrows)
Reserves State:
Asset: Reserve Token
Address: Reserve Address that contains the ATA of the liquidity
CollateralMintAddress: cToken Mint Address
CollateralSupplyAddress: Where cTokens are held to be used as collateral
Liquidity Address: ATA of the Reserve that contains the tokens
LiquidityFeeReceiverAddress: Where borrow fees generated are held before being swept into the protocol treasury
Example:
Last updated