Contract that returns an array of all reserve or user data for a particular market, used by the [HypurrFi Interface] to display Markets and Dashboard data.

The [HypurrFi Utilities SDK] includes an interface to make calls to this contract, and functions to format the response for frontend use-cases.

Data Structures

AggregatedReserveData

View fields of AggregatedReserveData defined at [Github].

UserReserveData

NameTypeDescription
underlyingAssetaddressAddress of the underlying asset supplied/borrowed
scaledATokenBalanceuint256

scaled balance of hyToken

scaledBalance = balance/liquidityIndex

usageAsCollateralEnabledOnUserbooltrue if supplied asset is enabled to be used as collateral
stableBorrowRateuint256Stable rate at which underlying asset is borrowed by the user. 0 ⇒ no debt
scaledVariableDebtuint256

scaled balance of vToken

scaledBalance = balance/liquidityIndex

principalStableDebtuint256Principal amount borrowed at stable rate
stableBorrowLastUpdateTimestampuint256unix timestamp of last update on user’s stable borrow position.

BaseCurrencyInfo

Info data struct for base currency of the HypurrFi protocol market.

NameTypeDescription
marketReferenceCurrencyUnituint256Reference aka base currency of the HypurrFi market
marketReferenceCurrencyPriceInUsdint256Price of reference aka base currency in USD
networkBaseTokenPriceInUsdint256Price of native token of the network/chain in USD
networkBaseTokenPriceDecimalsuint8Decimals of native token of the network/chain

Methods

getReservesList

function getReservesList(IPoolAddressesProvider provider)

Returns the list of initialised reserves in the Pool associated with the given [provider].

getReservesData

function getReservesData(IPoolAddressesProvider provider)

Returns BaseCurrencyInfo of the Pool and AggregatedReserveData[] for all the initialised reserves in the Pool associated with the given [provider].

getUserReservesData

function getUserReservesData(IPoolAddressesProvider provider, address user)

Returns UserReserveData[] for all user reserves in the Pool associated with the given [provider].

ABI