CrossLiquidation

Write Methods

crossLiquidateERC20

function crossLiquidateERC20(
    uint32 poolId,
    address borrower,
    address collateralAsset,
    address debtAsset,
    uint256 debtToCover,
    bool supplyAsCollateral
  ) public payable

Liquidate an amount of ERC20 collateral asset from the pool with cross margin mode.

Parameter Name
Type
Description

poolId

uint32

The id of the pool

borrower

address

The address whom account will be liquidated

collateralAsset

address

The address of the underlying collateral asset to liquidated

debtAsset

address

The address of the underlying debt asset to repaid

debtToCover

uint256

The underlying amount to be repaid, expressed in underlying asset decimals units

supplyAsCollateral

bool

The liquidated collateral asset whether be supplied as liquidator's collateral into pool or not

crossLiquidateERC721

function crossLiquidateERC721(
    uint32 poolId,
    address borrower,
    address collateralAsset,
    uint256[] calldata collateralTokenIds,
    address debtAsset,
    bool supplyAsCollateral
  ) public payable

Liquidate an amount of ERC721 collateral asset from the pool with cross margin mode.

Parameter Name
Type
Description

poolId

uint32

The id of the pool

borrower

address

The address whom account will be liquidated

collateralAsset

address

The address of the underlying collateral asset to liquidated

collateralTokenIds

uint256

The token id list of the underlying collateral asset to liquidated

debtAsset

address

The address of the underlying debt asset to repaid

supplyAsCollateral

bool

The liquidated collateral asset whether be supplied as liquidator's collateral into pool or not

Last updated