PoolLens
This module provides data query methods to the protocol. Only the most important methods will be listed at here. For the details of all methods, please check the smart contract in the Github repository.
View Methods
getAssetSupplyData
Returns the supply data of the asset in the pool.
totalScaledCrossSupply
uint256
The scaled total cross supply. Expressed in ray
totalCrossSupply
uint256
The total cross supply.
totalScaledIsolateSupply
uint256
The scaled total isolated supply. Expressed in ray
totalIsolateSupply
uint256
The total isolated supply.
availableSupply
uint256
The available supply.
supplyRate
uint256
The supply interest rate. Expressed in ray
supplyIndex
uint256
The supply interest index. Expressed in ray
lastUpdateTimestamp
uint256
The last update timestamp of the interest rate.
getAssetGroupData
Returns the group's borrow data of the asset in the pool.
totalScaledCrossBorrow
uint256
The scaled total amount of cross borrow in this asset group. Expressed in ray
totalCrossBorrow
uint256
The total amount of cross borrow in this asset group
totalScaledIsolateBorrow
uint256
The scaled total amount of isolated borrow in this asset group
totalIsolateBorrow
uint256
The scaled total amount of isolated borrow in this asset group. Expressed in ray
borrowRate
uint256
The borrow interest rate. Expressed in ray
borrowIndex
uint256
The borrow interest index. Expressed in ray
rateModel
address
The address of rate model contract
getUserAccountData
Returns the user account data in the pool.
totalCollateralInBase
uint256
the total collateral amount in base currency (e.g. USD)
totalBorrowInBase
uint256
the total borrow (debt) amount in base currency (e.g. USD)
availableBorrowInBase
uint256
the available borrow amount in base currency (e.g. USD)
avgLtv
uint256
the average LTV of this account
avgLiquidationThreshold
uint256
the average liquidation threshold of this account
healthFactor
uint256
the heath factor of this account, the decimals is 18
getUserAssetData
Returns the user asset data in the pool.
Return Values
totalCrossSupply
uint256
The total amount of cross supply in this asset
totalIsolateSupply
uint256
The total amount of isolate supply in this asset
totalCrossBorrow
uint256
The total amount of cross borrow in this asset
totalIsolateBorrow
uint256
The total amount of isolate borrow in this asset
Last updated