From 4be5305397a39278795dd0eef749b446ef829c72 Mon Sep 17 00:00:00 2001 From: 0xMithrandir <173684735+0xMithrandir@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:28:20 +0200 Subject: [PATCH] Fix for L-17 issue --- markets/bfp-market/contracts/storage/Position.sol | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/markets/bfp-market/contracts/storage/Position.sol b/markets/bfp-market/contracts/storage/Position.sol index c238560655..57ab7c66ba 100644 --- a/markets/bfp-market/contracts/storage/Position.sol +++ b/markets/bfp-market/contracts/storage/Position.sol @@ -508,14 +508,10 @@ library Position { globalConfig ); - uint256 liqKeeperFee = getLiquidationKeeperFee( - absSize, - ethPrice, - marketConfig, - globalConfig - ); + uint256 marginAdjustment = marketConfig.minMarginUsd + + liqFlagReward + + globalConfig.maxKeeperFeeUsd; - uint256 marginAdjustment = marketConfig.minMarginUsd + liqFlagReward + liqKeeperFee; im = notional.mulDecimal(imr) + marginAdjustment; mm = notional.mulDecimal(mmr) + marginAdjustment; }