Synthetixio / synthetix-v3

MIT License
117 stars 58 forks source link

Fix for L-17 issue #2321

Open 0xMithrandir opened 4 weeks ago

0xMithrandir commented 4 weeks ago

Description

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.

https://www.notion.so/guardianaudits/L-17-3a6cba4df1064a22ac0ff906474beebd?pvs=4