Skip to main content

IMarketLiquidate.sol

IMarketLiquidate

Interface for liquidating and claiming positions in a market.

checkLiquidation

function checkLiquidation(uint256 positionId) external view returns (bool)

Checks if a position is eligible for liquidation.

  • Parameters:

    NameTypeDescription
    positionIduint256The ID of the position to check.
  • Return Values:

    NameTypeDescription
    [0]boolA boolean indicating if the position is eligible for liquidation.

checkLiquidationWithOracleVersion

function checkLiquidationWithOracleVersion(uint256 positionId, struct IOracleProvider.OracleVersion oracleVersion) external view returns (bool)

Checks if a position is eligible for liquidation.

  • Parameters:

    NameTypeDescription
    positionIduint256The ID of the position to check.
    oracleVersionstruct IOracleProvider.OracleVersionThe oracle version data for liquidation check.
  • Return Values:

    NameTypeDescription
    [0]boolA boolean indicating if the position is eligible for liquidation.

liquidate

function liquidate(uint256 positionId, address keeper, uint256 keeperFee) external

Liquidates a position.

  • Parameters:

    NameTypeDescription
    positionIduint256The ID of the position to liquidate.
    keeperaddressThe address of the keeper performing the liquidation.
    keeperFeeuint256The native token amount of the keeper's fee.

checkClaimPosition

function checkClaimPosition(uint256 positionId) external view returns (bool)

Checks if a position is eligible for claim.

  • Parameters:

    NameTypeDescription
    positionIduint256The ID of the position to check.
  • Return Values:

    NameTypeDescription
    [0]boolA boolean indicating if the position is eligible for claim.

claimPosition

function claimPosition(uint256 positionId, address keeper, uint256 keeperFee) external

Claims a closed position on behalf of a keeper.

  • Parameters:

    NameTypeDescription
    positionIduint256The ID of the position to claim.
    keeperaddressThe address of the keeper claiming the position.
    keeperFeeuint256The native token amount of the keeper's fee.