Config
INIT Configuration contract.
View Functions
whitelistedWLps
Get whether the wrapped LP contract address is supported.
getModeConfig
Get mode's configuration.
Parameters:
_mode
uint16
mode to get config
Returns:
collTokens
address[]
supported collateral tokens in the mode
borrTokens
address[]
supported borrow tokens in the mode
maxHealthAfterLiq_e18
uint256
max health after liquidation allowed in the mode
maxCollWLpCount
uint8
max wLp collateral count allowed in the mode
getPoolConfig
Get lending pool's configuration.
Parameters:
_pool
address
lending pool address to get configuration
Returns:
config
PoolConfig
pool configuration, containing: - supply cap - borrow cap - can mint flag - can burn flag - can borrow flag - can repay flag - can flash flag
isAllowedForBorrow
Get whether the lending pool is allowed to borrow in the specified mode.
Parameters:
_mode
uint16
mode to check
_pool
address
lending pool address to check
Returns:
flag
bool
boolean flag whether the lending pool is allowed for borrow in the mode
isAllowedForCollateral
Get whether the lending pool is allowed for collateral in the specified mode.
Parameters:
_mode
uint16
mode to check
_pool
address
lending pool address to check
Returns:
flag
bool
boolean flag whether the lending pool is allowed for collateral in the mode
getTokenFactors
Get token factors for the specified mode and lending pool.
Parameters:
_mode
uint16
mode to get token factors
_pool
address
lending pool address to get token factors
Returns:
tokenFactors
TokenFactors
token factors including: - collFactor_e18 - borrFactor_e18
getMaxHealthAfterLiq_e18
Get mode's max health allowed after liquidation with 10^18
precision.
Parameters:
_mode
uint16
mode to get max health after liquidation
Returns:
maxHealthAfterLiq_e18
uint256
mode's max health allowed after liquidation with 10^18
precision.
getModeStatus
Get the mode's status.
Parameters:
_mode
uint16
mode to get status
Returns:
modeStatus
ModeStatus
mode status including: - can collateralize flag - can decollateralize flag - can borrow flag - can repay flag
getModeMaxCollWLpCount
Get a mode's max collateral wrapped LP count
Parameters:
_mode
uint16
mode to get max collateral wrapped LP count
Returns:
count
uint8
max collateral wrapped LP count
Last updated