Configurator
This module is used to adding, removing and setting the assets in the custom pools.
Write Methods
addAssetERC20
Adding a new ERC20 asset into the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
removeAssetERC20
Removing a ERC20 asset from the pool. The liquidity (supply & borrow) of the to be deleted asset MUST be empty.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
addAssetERC721
Adding a new ERC721 asset into the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
removeAssetERC721
Removing a ERC20 asset from the pool. The liquidity (supply & borrow) of the to be deleted asset MUST be empty.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
addAssetGroup
Adding a new group into asset. The asset MUST be ERC20 and the group MUST already added into the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
groupId | uint8 | The id of the group |
rateModel_ | address | The address of interest rate model contract |
removeAssetGroup
Removing a group from asset. The liquidity (borrow) of the to be deleted group MUST be empty.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
groupId | uint8 | The id of the group. |
setAssetActive
Activate or deactivate a asset in the pool. Deactivated asset can not be operated at all.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
isActive | bool | The active flag |
setAssetFrozen
Freeze or unfreeze a asset in the pool. Fronzen asset can not be withdrawn or borrowed.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
isFrozen | bool | The freeze flag |
setAssetPause
Pause or unpause a asset in the pool. Paused asset can not be operated at all.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
isPause | bool | The pause flag |
setAssetBorrowing
Enable or disable the borrowing flag of a asset in the pool. Only borrowing enabled asset can be borrowed by the user.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
isEnable | bool | The enable flag |
setAssetFlashLoan
Enable or disable the flash loan flag of a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
isEnable | bool | The enable flag |
setAssetSupplyCap
Setting the maximum supply capacity of a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
newCap | bool | The new capacity value which must be decimals |
setAssetBorrowCap
Setting the maximum borrow capacity of a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
newCap | bool | The new capacity value which must be decimals |
setAssetClassGroup
Setting the class group of a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
classGroup | uint8 | The group id which MUST be in [1, 2, 3] |
setAssetCollateralParams
Setting the collateral parameters of a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
collateralFactor | uint16 | The LTV (loan to value) of the asset in percentage which has 2 decimals. E.g. 5000 is 50%. |
liquidationThreshold | uint16 | The liquidation threshold of the asset in percentage which has 2 decimals. E.g. 8000 is 80%. |
liquidationBonus | uint16 | The liquidation bonus of the asset in percentage which has 2 decimals. E.g. 1000 is 10%. |
setAssetAuctionParams
Setting the auction parameters of a asset in the pool. The asset MUST be ERC721.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
redeemThreshold | uint16 | The redeem threshold of the asset in percentage which has 2 decimals. E.g. 5000 is 50%. |
bidFineFactor | uint16 | The bid fine factor of the asset in percentage which has 2 decimals. E.g. 1000 is 10%. |
minBidFineFactor | uint16 | The minimum bid fine factor of the asset in percentage which has 2 decimals. E.g. 2000 is 20%. |
auctionDuration | uint40 | The auction duration of the asset in seconds. |
setAssetProtocolFee
Setting the protocol fee factor a asset in the pool.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset, E.g. WETH, USDT |
feeFactor | uint16 | The protocol fee factor of the asset in percentage which has 2 decimals. E.g. 1000 is 10%. |
Last updated