ReserveConfiguration
Implements the bitmap logic to handle the reserve configuration
LTV_MASK
LIQUIDATION_THRESHOLD_MASK
LIQUIDATION_BONUS_MASK
DECIMALS_MASK
ACTIVE_MASK
FROZEN_MASK
BORROWING_MASK
STABLE_BORROWING_MASK
PAUSED_MASK
SILOED_BORROWING_MASK
RESERVE_FACTOR_MASK
BORROW_CAP_MASK
SUPPLY_CAP_MASK
LIQUIDATION_PROTOCOL_FEE_MASK
ASSET_TYPE_MASK
LIQUIDATION_THRESHOLD_START_BIT_POSITION
For the LTV, the start bit is 0 (up to 15), hence no bitshifting is needed
LIQUIDATION_BONUS_START_BIT_POSITION
RESERVE_DECIMALS_START_BIT_POSITION
IS_ACTIVE_START_BIT_POSITION
IS_FROZEN_START_BIT_POSITION
BORROWING_ENABLED_START_BIT_POSITION
STABLE_BORROWING_ENABLED_START_BIT_POSITION
IS_PAUSED_START_BIT_POSITION
SILOED_BORROWING_START_BIT_POSITION
RESERVE_FACTOR_START_BIT_POSITION
bit 63 reserved
BORROW_CAP_START_BIT_POSITION
SUPPLY_CAP_START_BIT_POSITION
LIQUIDATION_PROTOCOL_FEE_START_BIT_POSITION
ASSET_TYPE_START_BIT_POSITION
MAX_VALID_LTV
MAX_VALID_LIQUIDATION_THRESHOLD
MAX_VALID_LIQUIDATION_BONUS
MAX_VALID_DECIMALS
MAX_VALID_RESERVE_FACTOR
MAX_VALID_BORROW_CAP
MAX_VALID_SUPPLY_CAP
MAX_VALID_LIQUIDATION_PROTOCOL_FEE
MAX_ASSET_TYPE
MAX_RESERVES_COUNT
setLtv
Sets the Loan to Value of the reserve
Parameters
getLtv
Gets the Loan to Value of the reserve
Parameters
Return Values
setLiquidationThreshold
Sets the liquidation threshold of the reserve
Parameters
getLiquidationThreshold
Gets the liquidation threshold of the reserve
Parameters
Return Values
setLiquidationBonus
Sets the liquidation bonus of the reserve
Parameters
getLiquidationBonus
Gets the liquidation bonus of the reserve
Parameters
Return Values
setDecimals
Sets the decimals of the underlying asset of the reserve
Parameters
getDecimals
Gets the decimals of the underlying asset of the reserve
Parameters
Return Values
setAssetType
Sets the asset type of the reserve
Parameters
getAssetType
Gets the asset type of the reserve
Parameters
Return Values
setActive
Sets the active state of the reserve
Parameters
getActive
Gets the active state of the reserve
Parameters
Return Values
setFrozen
Sets the frozen state of the reserve
Parameters
getFrozen
Gets the frozen state of the reserve
Parameters
Return Values
setPaused
Sets the paused state of the reserve
Parameters
getPaused
Gets the paused state of the reserve
Parameters
Return Values
setSiloedBorrowing
Sets the siloed borrowing flag for the reserve.
When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset.
Parameters
getSiloedBorrowing
Gets the siloed borrowing flag for the reserve.
When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset.
Parameters
Return Values
setBorrowingEnabled
Enables or disables borrowing on the reserve
Parameters
getBorrowingEnabled
Gets the borrowing state of the reserve
Parameters
Return Values
setReserveFactor
Sets the reserve factor of the reserve
Parameters
getReserveFactor
Gets the reserve factor of the reserve
Parameters
Return Values
setBorrowCap
Sets the borrow cap of the reserve
Parameters
getBorrowCap
Gets the borrow cap of the reserve
Parameters
Return Values
setSupplyCap
Sets the supply cap of the reserve
Parameters
getSupplyCap
Gets the supply cap of the reserve
Parameters
Return Values
setLiquidationProtocolFee
Sets the liquidation protocol fee of the reserve
Parameters
getLiquidationProtocolFee
Gets the liquidation protocol fee
Parameters
Return Values
getFlags
Gets the configuration flags of the reserve
Parameters
Return Values
getParams
Gets the configuration parameters of the reserve from storage
Parameters
Return Values
getCaps
Gets the caps parameters of the reserve from storage