Obedient Lava Monkey
Medium
The delayed health factor recalculation in executeLiquidationCall
allows liquidators to over-liquidate users, especially in scenarios involving multiple liquidations in a single block or gas-efficient batching systems.
In LiquidationLogic.sol
(within executeLiquidationCall), the user's health factor is not recalculated after each liquidation. As a result, if multiple liquidators act on the same user in rapid succession (e.g., during a high-stress market event), the user’s position can be over-liquidated. _burnCollateralATokens
_burnDebtTokens
- A user's health factor is initially below
1
, making them eligible for liquidation. - Multiple liquidators submit liquidation transactions within the same block or immediately after one another.
- The user has sufficient collateral for over-liquidation.
None (assumes the protocol is under high market activity or stress).
- A user’s position becomes liquidatable (health factor < 1).
- Liquidator A submits a transaction to liquidate part of the user's debt.
- Before the transaction is mined and the user's health factor is updated, Liquidator B also submits a liquidation transaction, assuming the original health factor.
- Both transactions succeed, resulting in the user’s position being over-liquidated.
The protocol allows over-liquidation of user positions, potentially reducing the collateral left for the user and transferring excess collateral to liquidators. This damages user trust and exposes the protocol to legal or reputational risks.
Recalculate and enforce the health factor after each liquidation to ensure no additional liquidations occur once the health factor recovers above the threshold.