How Does a Smart Contract Perform a Margin Call and Liquidation?

The smart contract constantly monitors the collateralization ratio of a user's position using a real-time price feed from an oracle. If the ratio drops below a pre-set maintenance margin threshold, the contract automatically triggers a "margin call" and allows a liquidator (often a bot) to repay the debt.

The contract then sells the collateral at a discount to cover the debt, often imposing a penalty fee on the borrower.

What Is the Purpose of ‘Maintenance Margin’ and When Is a Margin Call Triggered?
How Does Collateralization in DeFi Minimize Default Risk?
How Is Collateral Managed and Liquidated in a DeFi Smart Lending Contract?
What Happens If the Collateralization Ratio Falls below a Minimum Threshold?
How Does the Collateralization Mechanism in a Smart Contract-Based Options Protocol Ensure Solvency?
What Is the Role of the ‘Liquidation Engine’ on a Crypto Derivatives Platform?
What Is the Role of the Liquidation Engine on a Cryptocurrency Exchange?
How Does Network Congestion Affect the Liquidation Process?

Glossar