Liquidation Trigger Logic
Liquidation trigger logic is the specific set of conditions and mathematical formulas that determine when a position must be liquidated. This logic is encoded into the smart contract and is designed to act automatically when a position becomes under-collateralized.
It must be precise, transparent, and resistant to manipulation. The logic typically considers the current price of the collateral, the size of the position, and the maintenance margin requirement.
If the price moves against the trader such that their equity drops below the threshold, the logic triggers a sale of the collateral. This must happen quickly to ensure the protocol recovers the debt before the price drops further.
The design of this logic is one of the most critical aspects of a derivatives protocol's risk management system. It must be tested against extreme market scenarios to ensure it behaves correctly.