Margin
Margin Ratio Formula
where
πππ₯πππ‘π΅ππ π(π) is motivated as follows: Instead of taking |π΅ππ ππ΄πππ’ππ‘(π) + ππππππππ΅πππ (π) β ππππππππ΄π ππ (π)| , we take the max above, since otherwise a user could place equivalent bids and asks without raising its leverage, thus artificially deepening the order book.
Initial and Maintenance Margin Ratio (IMR/MMR)
The IMR and MMR are set at market creation. These are the inverse of leverage, e.g., an IMR of 0.1 equals a maximum leverage of 10x and an MMR of 0.05 means a position can get liquidated once its leverage reaches 20x.
The owner of the AdminCapability
may change these parameters, but the smart contract first stores the new values, so they are visible on-chain, and only updates the actual market parameters after sufficient time has passed (a few days).
Position Margin Requirements
To check that the position's margin ratio is above the market's IMR:
To get the Maintenance Margin Requirements of a position, simply replace πΌππ with πππ .
Last updated