How Is the Collateral Ratio Monitored and Enforced by a Smart Contract?

The smart contract is programmed to continuously calculate the collateral ratio using real-time price data provided by an oracle. This ratio is the value of the collateral divided by the value of the debt.

The contract enforces the ratio by comparing it to a predefined minimum threshold. If the calculated ratio falls below this minimum, the contract's code automatically triggers the liquidation function without any manual intervention.

Can a Mempool Be Monitored on a Derivatives-Focused Blockchain?
What Is the Difference between a Network-Enforced Minimum Fee and a Node’s Relay Policy?
Should the Limit Price Be Set above or below the Stop Price for a Sell Order?
What Role Does the Liquidation Ratio Play in CDP-based Stablecoins?
How Do Oracles Trigger the Liquidation of a Leveraged Perpetual Futures Position?
How Do Smart Contracts Handle the Continuous Mark-to-Market Requirement of Futures Contracts?
How Does a Smart Contract Perform a Margin Call and Liquidation?
How Is Collateral Managed and Liquidated in a DeFi Smart Lending Contract?

Glossar