IPrimaryLendingPlatformLiquidation

Overview

License: MIT

interface IPrimaryLendingPlatformLiquidation

Functions info

liquidate (0xb44055fc)

function liquidate(
    address _account,
    Asset.Info memory _prjInfo,
    Asset.Info memory _lendingInfo,
    uint256 _lendingTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData,
    bytes[] memory buyCalldata
)
    external
    payable
    returns (address[] memory assets, uint256[] memory assetAmounts)

The function to be called when a user wants to liquidate their position. Support liquidation with hot borrowing or not.

Parameters:

liquidateFromModerator (0xc8359268)

function liquidateFromModerator(
    address _account,
    Asset.Info memory _prjInfo,
    Asset.Info memory _lendingInfo,
    uint256 _lendingTokenAmount,
    address liquidator,
    bytes32[] memory priceIds,
    bytes[] calldata updateData,
    bytes[] memory buyCalldata
)
    external
    payable
    returns (address[] memory assets, uint256[] memory assetAmounts)

The function to be called when a user wants to liquidate their position. Support liquidation with hot borrowing or not.

Parameters:

getLiquidationAmountWithUpdatePrices (0x02dfa5d4)

function getLiquidationAmountWithUpdatePrices(
    address _account,
    address _projectToken,
    address _lendingToken,
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) external payable returns (uint256 maxLA, uint256 minLA)

Returns the minimum and maximum liquidation amount for a given account, project token, and lending token after updating related token's prices.

Formula:

  • MinLA = min(MaxLA, MPA)

  • MaxLA = (LVR * CVc - THF * LVc) / (LRF * LVR - THF)

Parameters:

Return values:

Last updated