Synthetixio / synthetix-v3

MIT License
117 stars 58 forks source link

Fix for L-22 issue #2323

Closed 0xMithrandir closed 3 weeks ago

0xMithrandir commented 4 weeks ago

Description

In the getCancellationKeeperFee and getSettlementKeeperFee functions the keeperProfitMarginUsd is not included in the consideration for the computed baseKeeperFeePlusProfitUsd.

This may be unexpected as the getLiquidationFlagReward, getLiquidationKeeperFee and getMarginLiquidationOnlyReward keeper fees include this static adjustment. In cases where the baseKeeperFeeUsd is small relative to the priority fee necessary to get the transaction recorded this can result in latent settlements and executions as the keeperProfitMarginPercent would not contribute as much as the static keeperProfitMarginUsd would have. https://www.notion.so/guardianaudits/L-22-593481c4b88f42148cf4602e2734b51e?pvs=4