liquidate
liquidationCall()
Last updated
liquidationCall()
Last updated
This function is called by liquidators to liquidate "bad loans". Accounts with a health factor of less than 1 are eligible for liquidation.
Assuming user's healthFactor < 1:
if healthFactor > 0.95 => close factor set to 50%
if healthFactor <= 0.95 => close factor set to 100%
Liquidators are awarded with liquidation bonus, which can be paid in ATokens or the underlying asset as well.
user’s health factor: , the loan is eligible for a liquidation of 50%.
user’s health factor: , the loan is eligible for a liquidation of 100%.
executeLiquidationCall
contains the core logics
We will breakdown and examine the unique sections of logics within executeLiquidationCall. Code delineated in orange are common functions and can be explored in that section.