A liquidation is triggered when an account's Health Factor goes below 100%, due to its collateral value not being sufficient to cover the debt value. This might happen when the collateral decreases in value or the borrowed debt increases in value.
Peko Protocol's liquidation mechanism is designed to make liquidators compete for the profit that they make during liquidations to minimize the loss taken by unhealthy accounts. This is achieved by introducing a variable discount with variable liquidation size, Instead of offering a fixed profit that is used in other protocols.
Liquidations on Peko Protocol follow 3 basic rules:
the initial health factor of the liquidated accounts has to be below 100%
the discounted sum of the taken collateral should be less than the sum of repaid assets
the final health factor of the liquidated accounts has to stay below 100%
The first rule only allows liquidating accounts in an unhealthy state. The second rule prevents from taking more collateral than the repaid sum (after discount). The third rule prevents the liquidator from repaying too much of the borrowed assets, only enough to bring closer to the 100%.