Config

INIT Configuration contract.

View Functions

whitelistedWLps

Get whether the wrapped LP contract address is supported.

function whitelistedWLps(address _wlp) external view returns (bool);

getModeConfig

Get mode's configuration.

If the mode does not exist, then the return values will be Solidity's default values (0 values).

function getModeConfig(uint16 _mode) external view returns (address[] memory collTokens, address[] memory borrTokens, uint maxHealthAfterLiq_e18, uint8 maxCollWLpCount);

Parameters:

Returns:

getPoolConfig

Get lending pool's configuration.

If the lending pool does not exist, then the return values will be Solidity's default values (0 values).

struct PoolConfig {
    uint128 supplyCap; // pool supply cap
    uint128 borrowCap; // pool borrow cap
    bool canMint; // pool mint status
    bool canBurn; // pool burn status
    bool canBorrow; // pool borrow status
    bool canRepay; // pool repay status
    bool canFlash; // pool flash status
}

function getPoolConfig(address _pool) external view returns (PoolConfig memory config);

Parameters:

Returns:

isAllowedForBorrow

Get whether the lending pool is allowed to borrow in the specified mode.

function isAllowedForBorrow(uint16 _mode, address _pool) external view returns (bool flag);

Parameters:

Returns:

isAllowedForCollateral

Get whether the lending pool is allowed for collateral in the specified mode.

function isAllowedForCollateral(uint16 _mode, address _pool) external view returns (bool flag);

Parameters:

Returns:

getTokenFactors

Get token factors for the specified mode and lending pool.

If the mode does not exist, then the return values will be Solidity's default values (0 values).

struct TokenFactors {
    uint128 collFactor_e18; // collateral factor in 1e18 (1e18 = 100%)
    uint128 borrFactor_e18; // borrow factor in 1e18 (1e18 = 100%)
}

function getTokenFactors(uint16 _mode, address _pool) external view returns (TokenFactors memory factors);

Parameters:

Returns:

getMaxHealthAfterLiq_e18

Get mode's max health allowed after liquidation with 10^18 precision.

If the mode does not exist, then the return values will be Solidity's default values (0 values).

function getMaxHealthAfterLiq_e18(uint16 _mode) external view returns (uint maxHealthAfterLiq_e18);

Parameters:

Returns:

getModeStatus

Get the mode's status.

If the mode does not exist, then the return values will be Solidity's default values (0 values).

struct ModeStatus {
    bool canCollateralize; // mode collateralize status
    bool canDecollateralize; // mode decollateralize status
    bool canBorrow; // mode borrow status
    bool canRepay; // mode repay status
}

function getModeStatus(uint16 _mode) external view returns (ModeStatus memory modeStatus);

Parameters:

Returns:

getModeMaxCollWLpCount

Get a mode's max collateral wrapped LP count

function getModeMaxCollWLpCount(uint16 _mode) external view returns (uint8 count);

Parameters:

Returns:

Last updated