Skip to content

IFluidLiquidityResolver ​

Git Source

Functions ​

getRevenue ​

gets the revenueAmount_ for a token_.

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

getRevenueCollector ​

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

solidity
function getRevenueCollector() external view returns (address);

getStatus ​

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

solidity
function getStatus() external view returns (uint256);

isAuth ​

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.

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

isGuardian ​

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.

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

getUserClass ​

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.

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

getExchangePricesAndConfig ​

gets exchangePricesAndConfig packed uint256 storage slot for token_.

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

getRateConfig ​

gets rateConfig packed uint256 storage slot for token_.

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

getTotalAmounts ​

gets totalAmounts packed uint256 storage slot for token_.

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

getConfigs2 ​

gets configs2 packed uint256 storage slot for token_.

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

getUserSupply ​

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

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

getUserBorrow ​

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

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

listedTokens ​

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

solidity
function listedTokens() external view returns (address[] memory listedTokens_);

getTokenRateData ​

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

solidity
function getTokenRateData(address token_) external view returns (LiquidityStructs.RateData memory rateData_);

getTokensRateData ​

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

solidity
function getTokensRateData(address[] calldata tokens_)
    external
    view
    returns (LiquidityStructs.RateData[] memory rateDatas_);

getOverallTokenData ​

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

solidity
function getOverallTokenData(address token_)
    external
    view
    returns (LiquidityStructs.OverallTokenData memory overallTokenData_);

getOverallTokensData ​

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

solidity
function getOverallTokensData(address[] calldata tokens_)
    external
    view
    returns (LiquidityStructs.OverallTokenData[] memory overallTokensData_);

getAllOverallTokensData ​

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

solidity
function getAllOverallTokensData()
    external
    view
    returns (LiquidityStructs.OverallTokenData[] memory overallTokensData_);

getUserSupplyData ​

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

solidity
function getUserSupplyData(address user_, address token_)
    external
    view
    returns (
        LiquidityStructs.UserSupplyData memory userSupplyData_,
        LiquidityStructs.OverallTokenData memory overallTokenData_
    );

getUserMultipleSupplyData ​

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

solidity
function getUserMultipleSupplyData(address user_, address[] calldata tokens_)
    external
    view
    returns (
        LiquidityStructs.UserSupplyData[] memory userSuppliesData_,
        LiquidityStructs.OverallTokenData[] memory overallTokensData_
    );

getUserBorrowData ​

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

solidity
function getUserBorrowData(address user_, address token_)
    external
    view
    returns (
        LiquidityStructs.UserBorrowData memory userBorrowData_,
        LiquidityStructs.OverallTokenData memory overallTokenData_
    );

getUserMultipleBorrowData ​

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

solidity
function getUserMultipleBorrowData(address user_, address[] calldata tokens_)
    external
    view
    returns (
        LiquidityStructs.UserBorrowData[] memory userBorrowingsData_,
        LiquidityStructs.OverallTokenData[] memory overallTokensData_
    );

getUserMultipleBorrowSupplyData ​

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_

solidity
function getUserMultipleBorrowSupplyData(
    address user_,
    address[] calldata supplyTokens_,
    address[] calldata borrowTokens_
)
    external
    view
    returns (
        LiquidityStructs.UserSupplyData[] memory userSuppliesData_,
        LiquidityStructs.OverallTokenData[] memory overallSupplyTokensData_,
        LiquidityStructs.UserBorrowData[] memory userBorrowingsData_,
        LiquidityStructs.OverallTokenData[] memory overallBorrowTokensData_
    );