- User deposits collateral which opens the margin account
- Two health factors are present: 1. The first related to Initial Margin; 2. The other related to Maintenance Margin.
- If the user has multiple positions then initial margin is the sum of all IMs of all positions and MM is the sum of MMs of all positions
- To open a new order the user must have collateral > Initial margin of the position (i.e. IM_HF (Initial Margin Health Factor) > 1)
- If the Initial margin becomes greater than the collateral deposited no more orders can be opened (IM_HF < 1)
- If Maintenance Margin becomes less than 0.8 (0.8 just as an example) the user can be liquidated (Maintenance Margin Health Factor (MM_HF) < 1)
- Liquidation penalty here is 0.2 -> will be shared by liquidators and the insurance fund