How Does a Smart Contract Enforce the Margin Call Process for a Perpetual Futures Contract?

The smart contract continuously monitors the maintenance margin level of a user's position against the current mark price. If the margin ratio falls below a predefined threshold, the contract's liquidation function becomes callable.

A 'keeper' bot or another user can then call this function, which automatically liquidates a portion of the collateral to cover the deficit and bring the margin back to a safe level.

How Is Margin Managed in a Smart Contract-Based Derivatives Platform?
How Can Smart Contracts Manage Margin Calls for Leveraged Derivatives?
How Does a Smart Contract Perform a Margin Call and Liquidation?
How Is Collateral Managed and Liquidated in a DeFi Smart Lending Contract?
What Are ‘Smart Contracts’ and How Do They Enforce the Peg?
How Does a Protocol Use Tokenized Assets to Meet Margin Requirements?
How Is the Collateral Ratio Monitored and Enforced by a Smart Contract?
How Do Smart Contracts Enforce Margin Requirements in Decentralized Finance (DeFi) Derivatives?

Glossar