M1PoolConfigurator
M1Pool configuration contract, risk control and administrator operations.
function setM1CollateralBorrowing(address collateralAddress, bool enabled) external override onlyRiskOrPoolAdmins
Set whether this type of collateral pool is available for re-borrowing in M1Pool
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:allow borrowing, false:do not allow borrowing |
function setM1CollateralActive(address collateralAddress, bool enabled) external override onlyRiskOrPoolAdmin
Set whether the collateral pool of this type can be active again in M1Pool
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:activated, false:inactive |
function setM1CollateralFrozen(address collateralAddress, bool enabled) external override onlyRiskOrPoolAdmins
Set whether the collateral pool of this type can be frozen in M1Pool or not
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
enabled | bool | true:frozen, false:unfrozen |
function setM1CollateralMaxBorrowLimitInBaseCurrency(address collateralAddress, uint256 quantity) external override onlyRiskOrPoolAdmins
Set the maximum amount of USD value that can be borrowed for this type of asset.
Name | Type | Description |
---|---|---|
collateralAddress | address | the contract address of collateral |
quantity | uint256 | Maximum number of USD values available for borrowing |
function setM1CollateralLiquidationThreshold(address collateralAddress, uint256 liquidationThreshold, uint256 liquidationBonus) external override onlyRiskOrPoolAdmins
Set the parameters of
LiquidationThreshold
for this type of collateral pool.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 |
function setM1CollateralFactor(address collateralAddress, uint256 factor) external override onlyRiskOrPoolAdmins
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral asset |
factor | uint256 | the factor of loan to value |
function addM1CollateralAsset(address collateralAddress, address asset) external override onlyRiskOrPoolAdmins
Add a lendable asset to a particular collateral pool (the asset must be in Pool)
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral asset |
asset | address | the available borrowing asset type for the collatral |
function setM1CollateralAssetBorrowing(address collateralAddress, address asset, bool enabled) external override onlyRiskOrPoolAdmins
To set the available borrowing asset for a collateral asset
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of the collateral |
asset | address | available asset to borrow |
enabled | bool | true: enable borrowing, false: disable borrowing |
function setM1CollateralAssetPaused(address collateralAddress, address asset, bool enabled) external override onlyRiskOrPoolAdmins
To set collateral asset paused
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of the collateral |
asset | address | contract address of the collateral |
enabled | bool | true: paused,false: on going |
function setM1CollateralAssetFrozen(address collateralAddress, address asset, bool enabled) external override onlyRiskOrPoolAdmins
When an asset is frozen, all function will be frozen
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral |
asset | address | available borrwoing assset |
enabled | bool | true: frozen,false: unfrozen |
function setM1EModeCategory( uint8 categoryId, uint16 ltv, uint16 liquidationThreshold, uint16 liquidationBonus, address oracle, string calldata label ) external override onlyRiskOrPoolAdmins
Set the perameters for E-mode
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 |
function setCollateralEModeCategory(address collateralAddress, uint8 newCategoryId) external override onlyRiskOrPoolAdmins
set E-mode for a specifical collateral asset.
Name | Type | Description |
---|---|---|
collateralAddress | address | Contract address of collateral |
newCategoryId | uint8 | Catagory ID of E-mode |
function getM1Configuration(address collateralAddress) external view virtual override returns (DataTypes.M1CollateralConfiguration memory)
Check the basic configuration of the collateral pool
Name | Type | Description |
---|---|---|
collateralAddress | address | Contract address of collateral |
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 |
function getM1AssetConfigruation(address collateralAddress, address asset) external view override returns (DataTypes.M1AssetConfiguration memory)
Check the configuration of an asset in this collateral pool
Name | Type | Description |
---|---|---|
collateralAddress | address | 抵押物合约地址 |
collateralAddress | asset | 可借资产配置 |
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 |
function getM1CollateralAssetsList(address collateralAddress) external view override returns (address[] memory)
Get a collection of lending asset addresses backed by this collateralized lending pool.
Name | Type | Description |
---|---|---|
collateralAddress | address | contract address of collateral |
Type | Description |
---|---|
address[] | Available borrowing assets address |
function getM1CollateralList() external view returns (address[] memory)
Query contract addresses of all collateral pools supported by M1Pool
Type | Description |
---|---|
address[] | supported lending pool address |
function getM1EModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory)
Get the configuration information of E-mode according to E-mode id
Last modified 1yr ago