```\n      if (isLong) {\n          uint swapFeeBP = getSwapFeeBP(isLong, true, collateralDelta);\n           collateralDelta = (collateralDelta * (BASIS_POINTS_DIVISOR + swapFeeBP)) / BASIS_POINTS_DIVISOR;\n      }\n      // add margin fee\n      // when we increase position, fee always got deducted from collateral\n          collateralDelta += _getPositionFee(currentPos.size, sizeDelta, currentPos.entryFundingRate);\n```\n