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
Description
In the
getCancellationKeeperFee
andgetSettlementKeeperFee
functions thekeeperProfitMarginUsd
is not included in the consideration for the computedbaseKeeperFeePlusProfitUsd
.This may be unexpected as the
getLiquidationFlagReward
,getLiquidationKeeperFee
andgetMarginLiquidationOnlyReward
keeper fees include this static adjustment. In cases where thebaseKeeperFeeUsd
is small relative to the priority fee necessary to get the transaction recorded this can result in latent settlements and executions as thekeeperProfitMarginPercent
would not contribute as much as the statickeeperProfitMarginUsd
would have. https://www.notion.so/guardianaudits/L-22-593481c4b88f42148cf4602e2734b51e?pvs=4