Farseen0/scar-pairs huggingface dataset:
MEDIUM severity: Vulnerable function: ```\n    uint256 unhedgedGlp = (state.unhedgedGlpInUsdc + dnUsdcDepositedPos).mu. ```\n    uint256 unhedgedGlp = (state.unhedgedGlpInUsdc + dnUsdcDepositedPos).mulDivDown(\n        PRICE_PRECISION,\n        _getGlpPrice(state, !maximize)\n    );\n\n    // calculate current borrow amounts\n    (uint256 currentBtc, uint256 currentEth) = _getCurrentBorrows(state);\n    uint256 total

Vulnerable code:
```\n    uint256 unhedgedGlp = (state.unhedgedGlpInUsdc + dnUsdcDepositedPos).mulDivDown(\n        PRICE_PRECISION,\n        _getGlpPrice(state, !maximize)\n    );\n\n    // calculate current borrow amounts\n    (uint256 currentBtc, uint256 currentEth) = _getCurrentBorrows(state);\n    uint256 totalCurrentBorrowValue = _getBorrowValue(state, currentBtc, currentEth);\n\n    // add negative part to current borrow value which will be subtracted at the end\n    // convert usdc amount into glp amount\n    uint256 borrowValueGlp = (totalCurrentBorrowValue + dnUsdcDepositedNeg).mulDivDown(\n        PRICE_PRECISION,\n        _getGlpPrice(state, !maximize)\n    );\n\n    // if we need to minimize then add additional slippage\n    if (!maximize) unhedgedGlp = unhedgedGlp.mulDivDown(MAX_BPS - state.slippageThresholdGmxBps, MAX_BPS);\n    if (!maximize) borrowValueGlp = borrowValueGlp.mulDivDown(MAX_BPS - state.slippageThresholdGmxBps, MAX_BPS);\n```\n
MEDIUM severity: Vulnerable function: ```\n  function compound(GMXTypes.Store storage self, GMXTypes.CompoundParams memory cp) external {l. ```\n  function compound(GMXTypes.Store storage self, GMXTypes.CompoundParams memory cp) external {lt\n      if (self.tokenA.balanceOf(address(self.trove)) > 0) {\n          self.tokenA.safeTransferFrom(address(self.trove), address(this), self.tokenA.balanceOf(address(self.trove)));\n      }\n      

Vulnerable code:
```\n  function compound(GMXTypes.Store storage self, GMXTypes.CompoundParams memory cp) external {lt\n      if (self.tokenA.balanceOf(address(self.trove)) > 0) {\n          self.tokenA.safeTransferFrom(address(self.trove), address(this), self.tokenA.balanceOf(address(self.trove)));\n      }\n      if (self.tokenB.balanceOf(address(self.trove)) > 0) {\n          self.tokenB.safeTransferFrom(address(self.trove), address(this), self.tokenB.balanceOf(address(self.trove)));\n      }\n\n      uint256 _tokenInAmt = IERC20(cp.tokenIn).balanceOf(address(this));\n\n      // Only compound if tokenIn amount is more than 0\n      if (_tokenInAmt > 0) {\n          self.refundee = payable(msg.sender); // the msg.sender is the keeper.\n\n          self.compoundCache.compoundParams = cp; // storage update.\n\n          ISwap.SwapParams memory _sp;\n\n          _sp.tokenIn = cp.tokenIn;\n          _sp.tokenOut = cp.tokenOut;\n          _sp.amountIn = _tokenInAmt;\n          _sp.amountOut = 0; // amount out minimum calculated in Swap\n          _sp.slippage = self.minSlippage; // minSlipage may result to a revert an cause the tokens stays in this contract.\n          _sp.deadline = cp.deadline;\n\n          GMXManager.swapExactTokensForTokens(self, _sp); // return value not checked.\n\n          GMXTypes.AddLiquidityParams memory _alp;\n\n          _alp.tokenAAmt = self.tokenA.balanceOf(address(this));\n          _alp.tokenBAmt = self.tokenB.balanceOf(address(this));\n          /// what this return in case zero balance?? zero\n          self.compoundCache.depositValue = GMXReader.convertToUsdValue(\n              self, address(self.tokenA), self.tokenA.balanceOf(address(this))\n          ) + GMXReader.convertToUsdValue(self, address(self.tokenB), self.tokenB.balanceOf(address(this)));\n          // revert if zero value, status not open or compound_failed , executionFee < minExecutionFee.\n          GMXChecks.beforeCompoundChecks(self);\n\n          self.status = GMXTypes.Status.Compound;\n\n          _alp.minMarketTokenAmt =\n              GMXManager.calcMinMarketSlippageAmt(self, self.compoundCache.depositValue, cp.slippage);\n\n          _alp.executionFee = cp.executionFee;\n          self.compoundCache.depositKey = GMXManager.addLiquidity(self, _alp);\n      }\n```\n
HIGH severity: Vulnerable function: ```\n@external\n@nonreentrant('lock')\ndef remove_liquidity_one_coin(token_amoun. ```\n@external\n@nonreentrant('lock')\ndef remove_liquidity_one_coin(token_amount: uint256, i: uint256, min_amount: uint256,\n                              use_eth: bool = False, receiver: address = msg.sender) -> uint256:\n    A_gamma: uint256[2] = self._A_gamma()\n\n    dy: uint256 = 0\n    D: uin

Vulnerable code:
```\n@external\n@nonreentrant('lock')\ndef remove_liquidity_one_coin(token_amount: uint256, i: uint256, min_amount: uint256,\n                              use_eth: bool = False, receiver: address = msg.sender) -> uint256:\n    A_gamma: uint256[2] = self._A_gamma()\n\n    dy: uint256 = 0\n    D: uint256 = 0\n    p: uint256 = 0\n    xp: uint256[N_COINS] = empty(uint256[N_COINS])\n    future_A_gamma_time: uint256 = self.future_A_gamma_time\n    dy, p, D, xp = self._calc_withdraw_one_coin(A_gamma, token_amount, i, (future_A_gamma_time > 0), True)\n    assert dy >= min_amount, "Slippage"\n\n    if block.timestamp >= future_A_gamma_time:\n        self.future_A_gamma_time = 1\n\n    self.balances[i] -= dy\n    CurveToken(self.token).burnFrom(msg.sender, token_amount)\n\n    coin: address = self.coins[i]\n    if use_eth and coin == WETH20:\n        raw_call(receiver, b"", value=dy)\n    else:\n        if coin == WETH20:\n            WETH(WETH20).deposit(value=dy)\n        response: Bytes[32] = raw_call(\n            coin,\n            _abi_encode(receiver, dy, method_id=method_id("transfer(address,uint256)")),\n            max_outsize=32,\n        )\n        if len(response) != 0:\n            assert convert(response, bool)\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction testnew_GaugePointAdjustment() public {\n    uint256 currentGaugePoints = 1189; \n    . ```\nfunction testnew_GaugePointAdjustment() public {\n    uint256 currentGaugePoints = 1189; \n    uint256 optimalPercentDepositedBdv = 64; \n    uint256 percentOfDepositedBdv = 64; \n\n    uint256 newGaugePoints = gaugePointFacet.defaultGaugePointFunction(\n        currentGaugePoints,\n        opt

Vulnerable code:
```\nfunction testnew_GaugePointAdjustment() public {\n    uint256 currentGaugePoints = 1189; \n    uint256 optimalPercentDepositedBdv = 64; \n    uint256 percentOfDepositedBdv = 64; \n\n    uint256 newGaugePoints = gaugePointFacet.defaultGaugePointFunction(\n        currentGaugePoints,\n        optimalPercentDepositedBdv,\n        percentOfDepositedBdv\n    );\n\n    assertTrue(newGaugePoints <= MAX_GAUGE_POINTS, "New gauge points exceed the maximum allowed");\n    assertEq(newGaugePoints, currentGaugePoints, "Gauge points adjustment does not match expected outcome");\n}\n```\n
HIGH severity: Vulnerable function: ```\npolicyHolders[\_msgSender()] = PolicyHolder(\_coverTokens, currentEpochNumb. ```\npolicyHolders[\_msgSender()] = PolicyHolder(\_coverTokens, currentEpochNumber,\n  \_endEpochNumber, \_totalPrice, \_reinsurancePrice);\n\nepochAmounts[\_endEpochNumber] = epochAmounts[\_endEpochNumber].add(\_coverTokens);\n```\n

Vulnerable code:
```\npolicyHolders[\_msgSender()] = PolicyHolder(\_coverTokens, currentEpochNumber,\n  \_endEpochNumber, \_totalPrice, \_reinsurancePrice);\n\nepochAmounts[\_endEpochNumber] = epochAmounts[\_endEpochNumber].add(\_coverTokens);\n```\n
HIGH severity: Vulnerable function: ```\nint256 internal constant INTERNAL_TOKEN_PRECISION = 1e8;\nuint256 internal . ```\nint256 internal constant INTERNAL_TOKEN_PRECISION = 1e8;\nuint256 internal constant BALANCER_PRECISION = 1e18;\n```\n

Vulnerable code:
```\nint256 internal constant INTERNAL_TOKEN_PRECISION = 1e8;\nuint256 internal constant BALANCER_PRECISION = 1e18;\n```\n
HIGH severity: Vulnerable function: ```\n  function multisigInterestClaim() external {\n    if(msg.sender != multisig) revert NotMultisi. ```\n  function multisigInterestClaim() external {\n    if(msg.sender != multisig) revert NotMultisig();\n    uint256 interestClaim = multisigClaims;\n    multisigClaims = 0;\n    SafeTransferLib.safeTransfer(ibgt, multisig, interestClaim);\n  }\n\n  /// @inheritdoc IGoldilend\n  function apdaoInter

Vulnerable code:
```\n  function multisigInterestClaim() external {\n    if(msg.sender != multisig) revert NotMultisig();\n    uint256 interestClaim = multisigClaims;\n    multisigClaims = 0;\n    SafeTransferLib.safeTransfer(ibgt, multisig, interestClaim);\n  }\n\n  /// @inheritdoc IGoldilend\n  function apdaoInterestClaim() external {\n    if(msg.sender != apdao) revert NotAPDAO();\n    uint256 interestClaim = apdaoClaims;\n    apdaoClaims = 0;\n    SafeTransferLib.safeTransfer(ibgt, apdao, interestClaim);\n  }\n\n// rest of code\n\n  function sunsetProtocol() external {\n    if(msg.sender != timelock) revert NotTimelock();\n    SafeTransferLib.safeTransfer(ibgt, multisig, poolSize - outstandingDebt);\n  }\n```\n
MEDIUM severity: Vulnerable function: ```\nif addr == dump.MessagePasserAddress {\n    statedumper.WriteMessage(caller. ```\nif addr == dump.MessagePasserAddress {\n    statedumper.WriteMessage(caller.Address(), input)\n}\n```\n

Vulnerable code:
```\nif addr == dump.MessagePasserAddress {\n    statedumper.WriteMessage(caller.Address(), input)\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n        if(proposals[_proposalId].actionType == TYPE_DEL_OWNER) {\n        . ```\n        if(proposals[_proposalId].actionType == TYPE_DEL_OWNER) {\n                (address _owner) = abi.decode(proposals[_proposalId].payload, (address));\n        require(contains(_owner) != 0, "Invalid owner address");\n            uint index = contains(_owner);\n                for (uint25

Vulnerable code:
```\n        if(proposals[_proposalId].actionType == TYPE_DEL_OWNER) {\n                (address _owner) = abi.decode(proposals[_proposalId].payload, (address));\n        require(contains(_owner) != 0, "Invalid owner address");\n            uint index = contains(_owner);\n                for (uint256 i = index; i < councilMembers.length - 1; i++) {\n            councilMembers[i] = councilMembers[i + 1];\n        }\n            councilMembers.pop();\n                 proposals[_proposalId].executed = true;\n                     isCouncil[_owner] = false;\n          }\n```\n
MEDIUM severity: Vulnerable function: ```\ncontract FootiumPlayer is\n    ERC721Upgradeable,\n    AccessControlUpgrade. ```\ncontract FootiumPlayer is\n    ERC721Upgradeable,\n    AccessControlUpgradeable,\n    ERC2981Upgradeable,\n    PausableUpgradeable,\n    ReentrancyGuardUpgradeable,\n    OwnableUpgradeable\n{\n```\n

Vulnerable code:
```\ncontract FootiumPlayer is\n    ERC721Upgradeable,\n    AccessControlUpgradeable,\n    ERC2981Upgradeable,\n    PausableUpgradeable,\n    ReentrancyGuardUpgradeable,\n    OwnableUpgradeable\n{\n```\n
HIGH severity: Vulnerable function: ```\n    function _killWoundedAgents(\n        uint256 roundId,\n        uint256 currentRoundAgentsA. ```\n    function _killWoundedAgents(\n        uint256 roundId,\n        uint256 currentRoundAgentsAlive\n    ) private returns (uint256 deadAgentsCount) {\n        // rest of code\n        for (uint256 i; i < woundedAgentIdsCount; ) {\n            uint256 woundedAgentId = woundedAgentIdsInRound[i.u

Vulnerable code:
```\n    function _killWoundedAgents(\n        uint256 roundId,\n        uint256 currentRoundAgentsAlive\n    ) private returns (uint256 deadAgentsCount) {\n        // rest of code\n        for (uint256 i; i < woundedAgentIdsCount; ) {\n            uint256 woundedAgentId = woundedAgentIdsInRound[i.unsafeAdd(1)];\n\n            uint256 index = agentIndex(woundedAgentId);\n          if (agents[index].status == AgentStatus.Wounded) {\n                // rest of code\n            }\n\n            // rest of code\n        }\n\n        emit Killed(roundId, woundedAgentIds);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n    function checkForInvalidTimestampOrAnswer(\n        uint256 timestamp,\n        int256 answ. ```\n    function checkForInvalidTimestampOrAnswer(\n        uint256 timestamp,\n        int256 answer,\n        uint256 currentTimestamp\n    ) private pure returns (bool) {\n        // Check for an invalid timeStamp that is 0, or in the future\n        if (timestamp == 0 || timestamp > currentTime

Vulnerable code:
```\n    function checkForInvalidTimestampOrAnswer(\n        uint256 timestamp,\n        int256 answer,\n        uint256 currentTimestamp\n    ) private pure returns (bool) {\n        // Check for an invalid timeStamp that is 0, or in the future\n        if (timestamp == 0 || timestamp > currentTimestamp) return true;\n        // Check if Chainlink's price feed has timed out\n        if (currentTimestamp.sub(timestamp) > CHAINLINK_TIMEOUT) return true;\n        // Check for non-positive price\n        if (answer <= 0) return true;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: NapierRouter.sol\n    function swapUnderlyingForYt(\n        address pool,\n        uint2. ```\nFile: NapierRouter.sol\n    function swapUnderlyingForYt(\n        address pool,\n        uint256 index,\n        uint256 ytOutDesired,\n        uint256 underlyingInMax,\n        address recipient,\n        uint256 deadline\n    ) external payable override nonReentrant checkDeadline(deadline) r

Vulnerable code:
```\nFile: NapierRouter.sol\n    function swapUnderlyingForYt(\n        address pool,\n        uint256 index,\n        uint256 ytOutDesired,\n        uint256 underlyingInMax,\n        address recipient,\n        uint256 deadline\n    ) external payable override nonReentrant checkDeadline(deadline) returns (uint256) {\n..SNIP..\n            // Variable Definitions:\n            // - `uDeposit`: The amount of underlying asset that needs to be deposited to issue PT and YT.\n            // - `ytOutDesired`: The desired amount of PT and YT to be issued.\n            // - `cscale`: Current scale of the Tranche.\n            // - `maxscale`: Maximum scale of the Tranche (denoted as 'S' in the formula).\n            // - `issuanceFee`: Issuance fee in basis points. (10000 =100%).\n\n            // Formula for `Tranche.issue`:\n            // ```\n            // shares = uDeposit / s\n            // fee = shares * issuanceFeeBps / 10000\n            // pyIssue = (shares - fee) * S\n            // ```\n\n            // Solving for `uDeposit`:\n            // ```\n            // uDeposit = (pyIssue * s / S) / (1 - issuanceFeeBps / 10000)\n            // ```\n            // Hack:\n            // Buffer is added to the denominator.\n            // This ensures that at least `ytOutDesired` amount of PT and YT are issued.\n            // If maximum scale and current scale are significantly different or `ytOutDesired` is small, the function might fail.\n            // Without this buffer, any rounding errors that reduce the issued PT and YT could lead to an insufficient amount of PT to be repaid to the pool.\n            uint256 uDepositNoFee = cscale * ytOutDesired / maxscale;\n            uDeposit = uDepositNoFee * MAX_BPS / (MAX_BPS - (series.issuanceFee + 1)); // 0.01 bps buffer\n```\n
MEDIUM severity: Vulnerable function: ```\ndataLen := uint64(len(data))\n// Bump the required gas by the amount of tra. ```\ndataLen := uint64(len(data))\n// Bump the required gas by the amount of transactional data\nif dataLen > 0 {\n    // rest of code\n}\n```\n

Vulnerable code:
```\ndataLen := uint64(len(data))\n// Bump the required gas by the amount of transactional data\nif dataLen > 0 {\n    // rest of code\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    if ((lockEndTime - weekCursor) > (minLockDurationForReward)) {\n       . ```\n    if ((lockEndTime - weekCursor) > (minLockDurationForReward)) {\n         toDistribute +=\n            (balanceOf * tokensPerWeek[weekCursor]) / veSupply[weekCursor];\n    weekCursor += WEEK;\n         }\n```\n

Vulnerable code:
```\n    if ((lockEndTime - weekCursor) > (minLockDurationForReward)) {\n         toDistribute +=\n            (balanceOf * tokensPerWeek[weekCursor]) / veSupply[weekCursor];\n    weekCursor += WEEK;\n         }\n```\n
HIGH severity: Vulnerable function: ```\nFile: SingleSidedLPVaultBase.sol\n    function reinvestReward(\n        SingleSidedRewardTradeP. ```\nFile: SingleSidedLPVaultBase.sol\n    function reinvestReward(\n        SingleSidedRewardTradeParams[] calldata trades,\n        uint256 minPoolClaim\n    ) external whenNotLocked onlyRole(REWARD_REINVESTMENT_ROLE) returns (\n        address rewardToken,\n        uint256 amountSold,\n        ui

Vulnerable code:
```\nFile: SingleSidedLPVaultBase.sol\n    function reinvestReward(\n        SingleSidedRewardTradeParams[] calldata trades,\n        uint256 minPoolClaim\n    ) external whenNotLocked onlyRole(REWARD_REINVESTMENT_ROLE) returns (\n        address rewardToken,\n        uint256 amountSold,\n        uint256 poolClaimAmount\n    ) {\n        // Will revert if spot prices are not in line with the oracle values\n        _checkPriceAndCalculateValue();\n\n        // Require one trade per token, if we do not want to buy any tokens at a\n        // given index then the amount should be set to zero. This applies to pool\n        // tokens like in the ComposableStablePool.\n        require(trades.length == NUM_TOKENS());\n        uint256[] memory amounts;\n        (rewardToken, amountSold, amounts) = _executeRewardTrades(trades);\n```\n
HIGH severity: Vulnerable function: ```\n            uint deltaTime;\n            // 1.1 check the amount of time si. ```\n            uint deltaTime;\n            // 1.1 check the amount of time since position is marked\n            if (pos.startLiqTimestamp > 0) {\n                 deltaTime = Math.max(deltaTime, block.timestamp - pos.startLiqTimestamp);\n            }\n            // 1.2 check the amount of time

Vulnerable code:
```\n            uint deltaTime;\n            // 1.1 check the amount of time since position is marked\n            if (pos.startLiqTimestamp > 0) {\n                 deltaTime = Math.max(deltaTime, block.timestamp - pos.startLiqTimestamp);\n            }\n            // 1.2 check the amount of time since position is past the deadline\n             if (block.timestamp > pos.positionDeadline) {\n                    deltaTime = Math.max(deltaTime, block.timestamp - pos.positionDeadline);\n            }\n            // 1.3 cap time-based discount, as configured\n              uint timeDiscountMultiplierE18 = Math.max(\n                IConfig(config).minLiquidateTimeDiscountMultiplierE18(),\n                     ONE_E18 - deltaTime * IConfig(config).liquidateTimeDiscountGrowthRateE18()\n            );\n            // 2. calculate health-based discount factor\n            uint curHealthFactorE18 = (ONE_E18 * ONE_E18) /\n             getPositionDebtRatioE18(_positionManager, _user, _posId);\n                 uint minDesiredHealthFactorE18 = IConfig(config).minDesiredHealthFactorE18s(strategy);\n            // 2.1 interpolate linear health discount factor (according to the diagram in documentation)\n            uint healthDiscountMultiplierE18 = ONE_E18;\n             if (curHealthFactorE18 < ONE_E18) {\n                 healthDiscountMultiplierE18 = curHealthFactorE18 > minDesiredHealthFactorE18\n                     ? ((curHealthFactorE18 - minDesiredHealthFactorE18) * ONE_E18) /\n            (ONE_E18 - minDesiredHealthFactorE18)\n            : 0;\n            }\n            // 3. final liquidation discount = apply the two discount methods together\n            liquidationDiscountMultiplierE18 =\n            (timeDiscountMultiplierE18 * healthDiscountMultiplierE18) /\n            ONE_E18;\n```\n
MEDIUM severity: Vulnerable function: ```\n        try params.contracts.swapHandler.swap(\n            SwapUtils.SwapP. ```\n        try params.contracts.swapHandler.swap(\n            SwapUtils.SwapParams(\n                params.contracts.dataStore,\n                params.contracts.eventEmitter,\n                params.contracts.oracle,\n                Bank(payable(order.market())),\n                params.key,\n

Vulnerable code:
```\n        try params.contracts.swapHandler.swap(\n            SwapUtils.SwapParams(\n                params.contracts.dataStore,\n                params.contracts.eventEmitter,\n                params.contracts.oracle,\n                Bank(payable(order.market())),\n                params.key,\n                result.outputToken,\n                result.outputAmount,\n                params.swapPathMarkets,\n                0,\n                order.receiver(),\n                order.uiFeeReceiver(),\n                order.shouldUnwrapNativeToken()\n            )\n        ) returns (address tokenOut, uint256 swapOutputAmount) {\n            `(\n                params.contracts.oracle,\n                tokenOut,\n                swapOutputAmount,\n                order.minOutputAmount()\n            );\n        } catch (bytes memory reasonBytes) {\n            (string memory reason, /* bool hasRevertMessage */) = ErrorUtils.getRevertMessage(reasonBytes);\n\n            _handleSwapError(\n                params.contracts.oracle,\n                order,\n                result,\n                reason,\n                reasonBytes\n            );\n        }\n    }\n```\n
HIGH severity: Vulnerable function: ```\nFile: VaultAccountAction.sol\n        if (vaultAccount.accountDebtUnderlyin. ```\nFile: VaultAccountAction.sol\n        if (vaultAccount.accountDebtUnderlying == 0 && vaultAccount.vaultShares == 0) {\n            // If the account has no position in the vault at this point, set the maturity to zero as well\n            vaultAccount.maturity = 0;\n        }\n        vaultAcco

Vulnerable code:
```\nFile: VaultAccountAction.sol\n        if (vaultAccount.accountDebtUnderlying == 0 && vaultAccount.vaultShares == 0) {\n            // If the account has no position in the vault at this point, set the maturity to zero as well\n            vaultAccount.maturity = 0;\n        }\n        vaultAccount.setVaultAccount({vaultConfig: vaultConfig, checkMinBorrow: true});\n\n        // It's possible that the user redeems more vault shares than they lend (it is not always the case\n        // that they will be increasing their collateral ratio here, so we check that this is the case). No\n        // need to check if the account has exited in full (maturity == 0).\n        if (vaultAccount.maturity != 0) {\n            IVaultAccountHealth(address(this)).checkVaultAccountCollateralRatio(vault, account);\n        }\n```\n
HIGH severity: Vulnerable function: ```\n_v3SwapExactInput(\n    v3SwapExactInputParams({\n        fee: params.fee,\. ```\n_v3SwapExactInput(\n    v3SwapExactInputParams({\n        fee: params.fee,\n        tokenIn: cache.holdToken,\n        tokenOut: cache.saleToken,\n        amountIn: holdTokenAmountIn,\n        amountOutMinimum: (saleTokenAmountOut * params.slippageBP1000) /\n            Constants.BPS\n    })\n`

Vulnerable code:
```\n_v3SwapExactInput(\n    v3SwapExactInputParams({\n        fee: params.fee,\n        tokenIn: cache.holdToken,\n        tokenOut: cache.saleToken,\n        amountIn: holdTokenAmountIn,\n        amountOutMinimum: (saleTokenAmountOut * params.slippageBP1000) /\n            Constants.BPS\n    })\n```\n
HIGH severity: Vulnerable function: ```\nfunction approveOperatorContract(address operatorContract) public onlyRegistryKeeper {\n    ope. ```\nfunction approveOperatorContract(address operatorContract) public onlyRegistryKeeper {\n    operatorContracts[operatorContract] = 1;\n}\n\nfunction disableOperatorContract(address operatorContract) public onlyPanicButton {\n    operatorContracts[operatorContract] = 2;\n}\n```\n

Vulnerable code:
```\nfunction approveOperatorContract(address operatorContract) public onlyRegistryKeeper {\n    operatorContracts[operatorContract] = 1;\n}\n\nfunction disableOperatorContract(address operatorContract) public onlyPanicButton {\n    operatorContracts[operatorContract] = 2;\n}\n```\n