Margin ratio

Liquidations on Palmswap Protocol are determined based on the margin ratio of your position. If you are using 10x leverage your initial margin ratio will be 10%, if the margin ratio drops to 6.25% or below a partial liquidation will be initiated. If your margin ratio falls to 2.5% or below, your position will be liquidated completely.

The margin ratio is calculated by adding your margin size and your PnL for a given position and then dividing by the nominal value of the position (position size multiplied by the market price).

MarginRatio=(Margin+unrealizedPnL)PositionNotionalMargin Ratio = \frac{(Margin+unrealizedPnL)}{PositionNotional}

Note on the calculation of the margin ratio

After the flash crash on the perpetual protocol, changes were made in the calculation of the margin ratio. These have been extended and improved by us, in addition to the index price calculation, we are currently still working on the protocol protection barrier in the event of a severe flash crash.

Checking the index price calculation

Normally, the nominal position value is calculated by multiplying your position size by the market price of the asset. However, if the index price differs from the market price by 10% or more, the position notional is calculated by multiplying the position size by the index price of the asset. This serves as an additional check before liquidations are triggered in case of anomalous market conditions.

Profit & Loss calculation

PnL is calculated using both the Mark Price and the 15-minute TWAP of the Mark Price; the higher of the two values is used in evaluating liquidation conditions.

Protocol Backup (Working on it)

The lock occurs when the market price deviates from the index price by 5% or more, this prevents further positions in the negative direction, also liquidations are not performed until the market price is back within the Safe Zone. In this way, a more severe flash crash risk can be prevented.

Last updated