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.