The health of the Aave Protocol is dependant on the 'health' of the loans within the system, also known as the 'health factor'. When the 'health factor' of an account's total loans is below 1, anyone can make a liquidationCall() to the LendingPool contract, paying back part of the debt owed and receiving discounted collateral in return.
Any of the deposited assets that are being used as a collateral can be liquidated, when HF < 1
. A liquidation bot monitoring the user health factor can extract profit by liquidating positions as they go underwater.
Moderate
This is a re occurring MEV. As market fluctuates many debt positions go underwater and profitable to liquidate. Also, With new markets deployed on Aave protocol, opportunity for new Liquidation bot arises.
- Flashloan debt asset from Aave
- Liquidate the bad debt position in exchange for collateral asset
- Swap part (or all if you want profit in debt asset) of collateral asset to repay flashLoan.
- The remaining asset is your profit
For liquidation calls to be profitable, you must take into account the gas cost involved in liquidating the loan. If a high gas price is used, then the liquidation may be unprofitable for you.
Refer Aave docs for liquidation details.