This piece is written by @Edyta from Phezzan Discord server
Maintenance margin, also known as variation margin, is the amount of capital that must be available in a user account to keep a leveraged trade open. It ensures users always have enough money to fund the present value of the position and cover any running losses.
To keep a leveraged position open, a certain amount of funds must be paid and kept in user account. If a user position starts to make a loss, his deposit may no longer be enough to keep the trade open. In this case, the user must put up additional capital to balance his account. This is known as a margin call.
Liquidation occurs when protocol closes a user leveraged position due to a partial or total loss of the user initial margin. It happens when a user is unable to meet the margin requirements for a leveraged position (fails to have sufficient funds to keep the trade open).
Liquidation can also be prevented by lowering a position’s leverage, which is equivalent to adding margin, or setting up a stop loss at any point between the entry price and the Liquidation Price.
Maintenance margin requirement is usually lower than initial margin requirement. This will prevent trader being immediately liquidated after opening the position.
Right now, Phezzan Protocol requires 6.25% of maintenance margin (mmRatio = 6.25%). The exact formula for liquidation price is a bit complicated, but our website will display it clearly.
For long position:
liquidation price of token A = index price - ((account value - total position value * mmRatio) / ((1 - mmRatio) * position size of tokenA))
For short position:
liquidation price of token A = index price - ((account value - total position value * mmRatio) / ((1 + mmRatio) * position size of tokenA))
Phezzan protocol uses cross-margin. That is all your positions are combined together when it comes to calculate your margin and liquidation price. PnL of each position will impact the liquidation price of other positions.