Skip to main content

MM_TO_IM_RATIO

Constant MM_TO_IM_RATIO 

Source
pub const MM_TO_IM_RATIO: f64 = 0.85;
Expand description

Ratio of Maintenance Margin to Initial Margin.

MM = IM * MM_TO_IM_RATIO

This creates a buffer between the margin required to open a position (IM) and the margin required to maintain it (MM). When equity falls below MM, liquidation is triggered.

Example: With ratio 0.85, a position opened with $100 IM only needs $85 MM to avoid liquidation, giving the user a 15% buffer.