In the getLiquidationMarginUsd function the marginAdjustment includes the estimated liquidation flag fee and liquidation fees. These fees are a best estimate of what the real fees may be in the event that the position were to be liquidated. However as the Initial margin aims to provide a safety buffer it may be prudent to use the maximum that these liquidation costs can be in the estimate of the margin requirements.
Description
In the
getLiquidationMarginUsd
function themarginAdjustment
includes the estimated liquidation flag fee and liquidation fees. These fees are a best estimate of what the real fees may be in the event that the position were to be liquidated. However as the Initial margin aims to provide a safety buffer it may be prudent to use the maximum that these liquidation costs can be in the estimate of the margin requirements.https://www.notion.so/guardianaudits/L-17-3a6cba4df1064a22ac0ff906474beebd?pvs=4