How Does the Calculation of Margin Requirements Work On-Chain?
The calculation of margin requirements is performed by the smart contract's internal logic, using real-time price data from an oracle. The contract uses a predefined formula that considers the derivative's notional value, the volatility of the underlying asset, and the chosen collateral's liquidation penalty.
This calculation is executed programmatically and transparently on the blockchain, ensuring all parties can verify the requirement without relying on a centralized clearing house's opaque calculations.