validateLiquidationCall
Last updated
Was this helpful?
Last updated
Was this helpful?
A valid liquidationCall must fulfil the following criteria:
Status flags for both collateral and borrow asset must be ACTIVE and NOT PAUSED
L2 check
Ensure user's health factor < 1
Collateral check
check that liquidation threshold is non-zero
confirm that user is using the collateral: isUsingAsCollateral
Since the liquidator can claim a single collateral of choice - we need to check the collateral address passed to ensure that it is indeed a valid selection. Else we might liquidate an asset that was not marked as collateral.