Dapp Use Cases
Liquidation Health Factor
Make sure that liquidations can only happen if the position is unhealthy
Use Case
In DeFi protocols, users can borrow assets. This happens through overcollateralized borrowing. If a position loses value, the health factor of the position will decrease. If the health factor is below the liquidation threshold, the position can be liquidated. It’s important to make sure that it’s not possible to liquidate a position if the health factor is above the liquidation threshold.
Explanation
This assertions checks if the health factor is below the liquidation threshold before a liquidation is performed to make sure that the liquidation can’t happen if the position is healthy. Furthermore it checks that the health factor improves after the liquidation.