```\n        if (_isLever) {\n            uint256 netBorrowLimit = _actionInfo.collateralValue\n                .preciseMul(maxLtvRaw.mul(10 ** 14))\n                .preciseMul(PreciseUnitMath.preciseUnit().sub(execution.unutilizedLeveragePercentage));\n\n            return netBorrowLimit\n                .sub(_actionInfo.borrowValue)\n                .preciseDiv(_actionInfo.collateralPrice);\n        } else {\n            uint256 netRepayLimit = _actionInfo.collateralValue\n                .preciseMul(liquidationThresholdRaw.mul(10 ** 14))\n                .preciseMul(PreciseUnitMath.preciseUnit().sub(execution.unutilizedLeveragePercentage));\n\n            return _actionInfo.collateralBalance\n                .preciseMul(netRepayLimit.sub(_actionInfo.borrowValue)) \n                .preciseDiv(netRepayLimit);\n        \n```\n