Liquidations
A Liquidation is the process where a Vault that fell below the Minimum Collateral Ratio is closed, its funds are withdrawn and the debt paid by an external Participant. Liquidations/Liquidators are key in keeping the stablecoins pegs because their job is maintaining the protocol with enough collateral to back up their price.
A Vault's Liquidation is open as soon as the collateral ratio of the Vault falls below the Minimum Collateral Ratio unless the protocol is in Panic Mode (learn more about it here).
The Liquidation occurs when a Liquidator or the Safety Pool pays out the Vault's debt by depositing the current debt's amount in the stablecoin denomination issued when the Vault was created.
This process (The Safety Pool doesn't get charged by this fee) of the collateral withdrawn, the profit for the liquidator is the percentage between the debt's amount and the total collateral withdrawn.
You can calculate your expected profit like this:
In the example above, a Vault with a debt of $10,000 was in Liquidation mode at a collateral price of $0.0936 and a deposit of $XLM 115,011.3301124. You as a Liquidator, pay back its debt by depositing $10,000 in the Vault's stablecoin denomination and you get back the collateral deposited ($XLM 115,011.330112) minus the current Protocol's fee ($XLM 575.0566506).
You ended up with a total of $XLM 114,436.2735 which is valued at $10,711.2352 and that means you profited from the Liquidation a total of $711.2351996 in terms of your initial deposit.
If you liquidate below 100% of the Collateral Ratio, you will end up with less value in collateral than the one you used to pay the Vault's debt and liquidate it. This scenario is unlike to happen because more Liquidators or the Safety Pool would have liquidated it already to get the profits.
In order yo avoid such loses we suggest always checking the current Collateral Ratio of the Vault before trying to liquidate it.