Architecture
Margin System
- 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
For short Calls:
IM = Maximum (0.15 - OTM Amount/Underlying Mark Price, 0.1) + Mark Price of the Option MM = 0.075 + Mark Price of the Option
For short Puts:
IM = Maximum (Maximum (0.15 - OTM Amount/Underlying Mark Price, 0.1) + Mark Price of the Option, Maintenance Margin) MM = Maximum (0.075, 0.075 * Mark Price of the Option) + Mark Price of the Option