IsolateLiquidation

Write Methods

isolateAuction

function isolateAuction(
    uint32 poolId,
    address nftAsset,
    uint256[] calldata nftTokenIds,
    address asset,
    uint256[] calldata amounts
  ) public payable

Function to auction a non-healthy position collateral-wise. The caller (liquidator) want to buy collateral asset of the user getting liquidated. Auction mechanism in Bend is English Auction, the highest bidder will be the winner.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

nftAsset

address

The address of the underlying asset to be auctioned

nftTokenIds

uint256[]

The token id list of the underlying asset to be auctioned

asset

address

The address of the underlying asset to be repaid

amounts

uint256[]

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

isolateRedeem

function isolateRedeem(
    uint32 poolId,
    address nftAsset,
    uint256[] calldata nftTokenIds,
    address asset,
    uint256[] calldata /*amounts*/
  ) public payable

Function to redeem a non-healthy NFT loan which state is in Auction. The caller must be borrower of loan. The borrower can redeem his own things before the redemption time expires.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

nftAsset

address

The address of the underlying asset to be redeemed

nftTokenIds

uint256[]

The token id list of the underlying asset to be redeemed

asset

address

The address of the underlying asset to be repaid

amounts

uint256[]

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

isolateLiquidate

function isolateLiquidate(
    uint32 poolId,
    address nftAsset,
    uint256[] calldata nftTokenIds,
    address asset,
    uint256[] calldata /*amounts*/,
    bool supplyAsCollateral
  ) public payable

Function to liquidate a non-healthy NFT loan which state is in Auction. The caller (liquidator) buy collateral asset of the user getting liquidated, and receives the collateral asset.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

nftAsset

address

The address of the underlying asset to be redeemed

nftTokenIds

uint256[]

The token id list of the underlying asset to be redeemed

asset

address

The address of the underlying asset to be repaid

amounts

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

Last updated