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
"asset": "UST",
"address": "Ab48bKsiEzdm481mGaNVmv9m9DmXsWWxcYHM588M59Yd",
"collateralMintAddress": "nZtL8HKX3aQtk3VpdvtdwPpXF2uMia522Pnan2meqdf",
"collateralSupplyAddress": "4HXDioboWL85gQocYNkWM62AB5ctrf8jVykSVco67Lzx",
"liquidityAddress": "5LyHdTXh1MSbRzE7xfTtfpV8W5eaySJnSiTs6FdHhrSo",
"liquidityFeeReceiverAddress": "4GctGML68E1kDcvskGTXRPY9ngxmxVnJXjpsJ68YBXPR",
"userSupplyCap": 5000000