Configurator

This module is used to adding, removing and setting the assets in the custom pools.

Write Methods

addAssetERC20

function addAssetERC20(uint32 poolId, address asset) public

Adding a new ERC20 asset into the pool.

removeAssetERC20

function removeAssetERC20(uint32 poolId, address asset) public

Removing a ERC20 asset from the pool. The liquidity (supply & borrow) of the to be deleted asset MUST be empty.

addAssetERC721

function addAssetERC721(uint32 poolId, address asset) public

Adding a new ERC721 asset into the pool.

removeAssetERC721

function removeAssetERC721(uint32 poolId, address asset) public

Removing a ERC20 asset from the pool. The liquidity (supply & borrow) of the to be deleted asset MUST be empty.

addAssetGroup

function addAssetGroup(uint32 poolId, address asset, uint8 groupId, address rateModel_)

Adding a new group into asset. The asset MUST be ERC20 and the group MUST already added into the pool.

removeAssetGroup

function removeAssetGroup(uint32 poolId, address asset, uint8 groupId, address rateModel_)

Removing a group from asset. The liquidity (borrow) of the to be deleted group MUST be empty.

setAssetActive

function setAssetActive(uint32 poolId, address asset, bool isActive) public

Activate or deactivate a asset in the pool. Deactivated asset can not be operated at all.

setAssetFrozen

function setAssetFrozen(uint32 poolId, address asset, bool isFrozen) public

Freeze or unfreeze a asset in the pool. Fronzen asset can not be withdrawn or borrowed.

setAssetPause

function setAssetPause(uint32 poolId, address asset, bool isPause) public

Pause or unpause a asset in the pool. Paused asset can not be operated at all.

setAssetBorrowing

function setAssetBorrowing(uint32 poolId, address asset, bool isEnable) public

Enable or disable the borrowing flag of a asset in the pool. Only borrowing enabled asset can be borrowed by the user.

setAssetFlashLoan

function setAssetFlashLoan(uint32 poolId, address asset, bool isEnable) public

Enable or disable the flash loan flag of a asset in the pool.

setAssetSupplyCap

function setAssetSupplyCap(uint32 poolId, address asset, uint256 newCap) public

Setting the maximum supply capacity of a asset in the pool.

setAssetBorrowCap

function setAssetBorrowCap(uint32 poolId, address asset, uint256 newCap) public

Setting the maximum borrow capacity of a asset in the pool.

setAssetClassGroup

function setAssetClassGroup(uint32 poolId, address asset, uint8 classGroup) public

Setting the class group of a asset in the pool.

setAssetCollateralParams

function setAssetCollateralParams(
    uint32 poolId,
    address asset,
    uint16 collateralFactor,
    uint16 liquidationThreshold,
    uint16 liquidationBonus
  ) public

Setting the collateral parameters of a asset in the pool.

setAssetAuctionParams

function setAssetAuctionParams(
    uint32 poolId,
    address asset,
    uint16 redeemThreshold,
    uint16 bidFineFactor,
    uint16 minBidFineFactor,
    uint40 auctionDuration
  ) public

Setting the auction parameters of a asset in the pool. The asset MUST be ERC721.

setAssetProtocolFee

function setAssetProtocolFee(uint32 poolId, address asset, uint16 feeFactor)

Setting the protocol fee factor a asset in the pool.

Last updated