M1PoolConfigurator
M1PoolConfigurator
M1Pool configuration contract, risk control and administrator operations.
Write Methods
setM1CollateralBorrowing
Set whether this type of collateral pool is available for re-borrowing in M1Pool
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:allow borrowing, false:do not allow borrowing |
setM1CollateralActive
Set whether the collateral pool of this type can be active again in M1Pool
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:activated, false:inactive |
setM1CollateralActive
Set whether the collateral pool of this type can be frozen in M1Pool or not
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:frozen, false:unfrozen |
setM1CollateralMaxBorrowLimitInBaseCurrency
Set the maximum amount of USD value that can be borrowed for this type of asset.
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
quantity | uint256 | Maximum number of USD values available for borrowing |
setM1CollateralLiquidationThreshold
Set the parameters of LiquidationThreshold
for this type of collateral pool.
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of the collateral asset |
liquidationThreshold | uint256 | Actual collateral value to the collateral value. |
liquidationBonus | uint256 | The bonus for the liquidators |
setM1CollateralFactor
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral asset |
factor | uint256 | the factor of loan to value |
addM1CollateralAsset
Add a lendable asset to a particular collateral pool (the asset must be in Pool)
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral asset |
asset | address | the available borrowing asset type for the collatral |
setM1CollateralAssetBorrowing
To set the available borrowing asset for a collateral asset
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of the collateral |
asset | address | available asset to borrow |
enabled | bool | true: enable borrowing, false: disable borrowing |
setM1CollateralAssetPaused
To set collateral asset paused
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of the collateral |
asset | address | contract address of the collateral |
enabled | bool | true: paused,false: on going |
setM1CollateralAssetFrozen
When an asset is frozen, all function will be frozen
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral |
asset | address | available borrwoing assset |
enabled | bool | true: frozen,false: unfrozen |
setM1EModeCategory
Set the perameters for E-mode
Call Params
Name | Type | Description |
---|---|---|
categoryId | uint8 | category id |
ltv | uint16 | ltv |
liquidationThreshold | uint16 | Liquidationthreshold |
liquidationBonus | uint16 | bonus for liquidators |
oracle | oracle | smart contract address of Oracle |
label | string | discription |
setCollateralEModeCategory
set E-mode for a specifical collateral asset.
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | Contract address of collateral |
newCategoryId | uint8 | Catagory ID of E-mode |
View Methods
getM1Configuration
Check the basic configuration of the collateral pool
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | Contract address of collateral |
Return value
Name | Type | Description |
---|---|---|
name | string | Name of collateral pool |
m1CollateralTypeModel | M1CollateralTypeModel | Collateral pool types 0: unconfigured type, 1: UNISWAP V3 pool, 2: UNISWAP V2 pool, 3: single LP (ERC20) pool |
isBorrowing | bool | Borrowable or not true:can be borrowed, false:cannot be borrowed |
isActive | bool | Activated or not true:activated, false: not activated |
isFrozen | bool | Whether to freeze or not true:frozen, false:not frozen |
maxBorrowLimitInBaseCurrency | uint256 | The total maximum number of USD that can be borrowed in this collateralized lending pool |
ltv | uint256 | loan to value |
liquidationThreshold | uint256 | liquidation threshold |
liquidationBonus | uint256 | bonus to value for liquidator |
factor | uint256 | factor |
categoryId | uint8 | catagory ID for E-mode |
getM1AssetConfigruation
Check the configuration of an asset in this collateral pool
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | 抵押物合约地址 |
collateralAddress | asset | 可借资产配置 |
Return Value
Name | Type | Description |
---|---|---|
isBorrowing | bool | Borrowable or not true:can be borrowed, false:cannot be borrowed |
isActive | bool | Activated or not true:activated, false:not activated |
isFrozen | bool | Whether to freeze or not true:frozen, false:not frozen |
getM1CollateralAssetsList
Get a collection of lending asset addresses backed by this collateralized lending pool.
Call Params
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral |
Return Values
Type | Description |
---|---|
address[] | Available borrowing assets address |
getM1CollateralList
Query contract addresses of all collateral pools supported by M1Pool
Return Values
Type | Description |
---|---|
address[] | supported lending pool address |
getM1EModeCategoryData
Get the configuration information of E-mode according to E-mode id
Last updated