IFluidLiquidityResolver

getRevenue

function getRevenue(address token_) external view returns (uint256 revenueAmount_)

gets the revenueAmount_ for a token_.

getRevenueCollector

function getRevenueCollector() external view returns (address)

address of contract that gets sent the revenue. Configurable by governance

getStatus

function getStatus() external view returns (uint256)

Liquidity contract paused status: status = 1 -> normal. status = 2 -> paused.

isAuth

function isAuth(address auth_) external view returns (uint256)

checks if auth_ is an allowed auth on Liquidity. Auths can set most config values. E.g. contracts that automate certain flows like e.g. adding a new fToken. Governance can add/remove auths. Governance is auth by default.

isGuardian

function isGuardian(address guardian_) external view returns (uint256)

checks if guardian_ is an allowed Guardian on Liquidity. Guardians can pause lower class users. Governance can add/remove guardians. Governance is guardian by default.

getUserClass

function getUserClass(address user_) external view returns (uint256)

gets user class for user_. Class defines which protocols can be paused by guardians. Currently there are 2 classes: 0 can be paused by guardians. 1 cannot be paused by guardians. New protocols are added as class 0 and will be upgraded to 1 over time.

getExchangePricesAndConfig

function getExchangePricesAndConfig(address token_) external view returns (uint256)

gets exchangePricesAndConfig packed uint256 storage slot for token_.

getRateConfig

function getRateConfig(address token_) external view returns (uint256)

gets rateConfig packed uint256 storage slot for token_.

getTotalAmounts

function getTotalAmounts(address token_) external view returns (uint256)

gets totalAmounts packed uint256 storage slot for token_.

getConfigs2

function getConfigs2(address token_) external view returns (uint256)

gets configs2 packed uint256 storage slot for token_.

getUserSupply

function getUserSupply(address user_, address token_) external view returns (uint256)

gets userSupply data packed uint256 storage slot for user_ and token_.

getUserBorrow

function getUserBorrow(address user_, address token_) external view returns (uint256)

gets userBorrow data packed uint256 storage slot for user_ and token_.

listedTokens

function listedTokens() external view returns (address[] listedTokens_)

returns all listedTokens_ at the Liquidity contract. Once configured, a token can never be removed.

getTokenRateData

function getTokenRateData(address token_) external view returns (struct Structs.RateData rateData_)

get the Rate config data rateData_ for a token_ compiled from the packed uint256 rateConfig storage slot

getTokensRateData

function getTokensRateData(address[] tokens_) external view returns (struct Structs.RateData[] rateDatas_)

get the Rate config datas rateDatas_ for multiple tokens_ compiled from the packed uint256 rateConfig storage slot

getOverallTokenData

function getOverallTokenData(address token_) external view returns (struct Structs.OverallTokenData overallTokenData_)

returns general data for token_ such as rates, exchange prices, utilization, fee, total amounts etc.

getOverallTokensData

function getOverallTokensData(address[] tokens_) external view returns (struct Structs.OverallTokenData[] overallTokensData_)

returns general data for multiple tokens_ such as rates, exchange prices, utilization, fee, total amounts etc.

getAllOverallTokensData

function getAllOverallTokensData() external view returns (struct Structs.OverallTokenData[] overallTokensData_)

returns general data for all listedTokens() such as rates, exchange prices, utilization, fee, total amounts etc.

getUserSupplyData

function getUserSupplyData(address user_, address token_) external view returns (struct Structs.UserSupplyData userSupplyData_, struct Structs.OverallTokenData overallTokenData_)

returns user_ supply data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for token_

getUserMultipleSupplyData

function getUserMultipleSupplyData(address user_, address[] tokens_) external view returns (struct Structs.UserSupplyData[] userSuppliesData_, struct Structs.OverallTokenData[] overallTokensData_)

returns user_ supply data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for multiple tokens_

getUserBorrowData

function getUserBorrowData(address user_, address token_) external view returns (struct Structs.UserBorrowData userBorrowData_, struct Structs.OverallTokenData overallTokenData_)

returns user_ borrow data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for token_

getUserMultipleBorrowData

function getUserMultipleBorrowData(address user_, address[] tokens_) external view returns (struct Structs.UserBorrowData[] userBorrowingsData_, struct Structs.OverallTokenData[] overallTokensData_)

returns user_ borrow data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for multiple tokens_

getUserMultipleBorrowSupplyData

function getUserMultipleBorrowSupplyData(address user_, address[] supplyTokens_, address[] borrowTokens_) external view returns (struct Structs.UserSupplyData[] userSuppliesData_, struct Structs.OverallTokenData[] overallSupplyTokensData_, struct Structs.UserBorrowData[] userBorrowingsData_, struct Structs.OverallTokenData[] overallBorrowTokensData_)

returns user_ supply data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for multiple supplyTokens_ and returns user_ borrow data and general data (such as rates, exchange prices, utilization, fee, total amounts etc.) for multiple borrowTokens_