Farseen0/scar-pairs huggingface dataset:
HIGH severity: Vulnerable function: ```\n    function setFlagger(\n        STypes.ShortRecord storage short,\n        address cusd,\n   . ```\n    function setFlagger(\n        STypes.ShortRecord storage short,\n        address cusd,\n        uint16 flaggerHint\n    ) internal {\n\n           if (flagStorage.g_flaggerId == 0) {\n            address flaggerToReplace = s.flagMapping[flaggerHint];\n\n            // @audit if timeDiff > f

Vulnerable code:
```\n    function setFlagger(\n        STypes.ShortRecord storage short,\n        address cusd,\n        uint16 flaggerHint\n    ) internal {\n\n           if (flagStorage.g_flaggerId == 0) {\n            address flaggerToReplace = s.flagMapping[flaggerHint];\n\n            // @audit if timeDiff > firstLiquidationTime, replace the flagger address\n\n            uint256 timeDiff = flaggerToReplace != address(0)\n                ? LibOrders.getOffsetTimeHours()\n                    - s.assetUser[cusd][flaggerToReplace].g_updatedAt\n                : 0;\n            //@dev re-use an inactive flaggerId\n            if (timeDiff > LibAsset.firstLiquidationTime(cusd)) {\n                delete s.assetUser[cusd][flaggerToReplace].g_flaggerId;\n                short.flaggerId = flagStorage.g_flaggerId = flaggerHint;\n\n            // more code\n\n            s.flagMapping[short.flaggerId] = msg.sender;\n```\n
HIGH severity: Vulnerable function: ```\nfunction registerDomain(\n  uint256 parentId,\n  string memory name,\n  address domainOwner,\n . ```\nfunction registerDomain(\n  uint256 parentId,\n  string memory name,\n  address domainOwner,\n  address minter\n) external override onlyController returns (uint256) {\n  // Create the child domain under the parent domain\n  uint256 labelHash = uint256(keccak256(bytes(name)));\n  address control

Vulnerable code:
```\nfunction registerDomain(\n  uint256 parentId,\n  string memory name,\n  address domainOwner,\n  address minter\n) external override onlyController returns (uint256) {\n  // Create the child domain under the parent domain\n  uint256 labelHash = uint256(keccak256(bytes(name)));\n  address controller = msg.sender;\n\n  // Domain parents must exist\n  require(\_exists(parentId), "Zer0 Registrar: No parent");\n\n  // Calculate the new domain's id and create it\n  uint256 domainId =\n    uint256(keccak256(abi.encodePacked(parentId, labelHash)));\n  \_createDomain(domainId, domainOwner, minter, controller);\n\n  emit DomainCreated(domainId, name, labelHash, parentId, minter, controller);\n\n  return domainId;\n```\n
MEDIUM severity: Vulnerable function: ```\ncontracts/user/UserManager.sol\n\n function unstake(uint96 amount) external whenNotPaused nonRe. ```\ncontracts/user/UserManager.sol\n\n function unstake(uint96 amount) external whenNotPaused nonReentrant {\n       Staker storage staker = stakers[msg.sender];\n       // Stakers can only unstaked stake balance that is unlocked. Stake balance\n       // becomes locked when it is used to underwrit

Vulnerable code:
```\ncontracts/user/UserManager.sol\n\n function unstake(uint96 amount) external whenNotPaused nonReentrant {\n       Staker storage staker = stakers[msg.sender];\n       // Stakers can only unstaked stake balance that is unlocked. Stake balance\n       // becomes locked when it is used to underwrite a borrow.\n       if (staker.stakedAmount - staker.locked < amount) revert InsufficientBalance();\n       comptroller.withdrawRewards(msg.sender, stakingToken);\n       uint256 remaining = IAssetManager(assetManager).withdraw(stakingToken, msg.sender, amount);\n       if (uint96(remaining) > amount) {\n           revert AssetManagerWithdrawFailed();\n       }\n       uint96 actualAmount = amount - uint96(remaining);\n       _updateStakedCoinAge(msg.sender, staker);\n       staker.stakedAmount -= actualAmount;\n       totalStaked -= actualAmount;\n       emit LogUnstake(msg.sender, actualAmount);\n   }\n```\n
MEDIUM severity: Vulnerable function: ```\n    function stake(\n        uint256 amount_,\n        bytes calldata proof_\n    ) external no. ```\n    function stake(\n        uint256 amount_,\n        bytes calldata proof_\n    ) external nonReentrant requireInitialized updateRewards tryNewEpoch {\n// rest of code\n        uint256 userBalance = stakeBalance[msg.sender];\n        if (userBalance > 0) {\n            // Claim outstanding re

Vulnerable code:
```\n    function stake(\n        uint256 amount_,\n        bytes calldata proof_\n    ) external nonReentrant requireInitialized updateRewards tryNewEpoch {\n// rest of code\n        uint256 userBalance = stakeBalance[msg.sender];\n        if (userBalance > 0) {\n            // Claim outstanding rewards, this will update the rewards per token claimed\n            _claimRewards();\n        } else {\n            // Initialize the rewards per token claimed for the user to the stored rewards per token\n          rewardsPerTokenClaimed[msg.sender] = rewardsPerTokenStored;\n        }\n\n        // Increase the user's stake balance and the total balance\n        stakeBalance[msg.sender] = userBalance + amount_;\n        totalBalance += amount_;\n\n        // Transfer the staked tokens from the user to this contract\n        stakedToken.safeTransferFrom(msg.sender, address(this), amount_);\n    }\n```\n
HIGH severity: Vulnerable function: ```\n sets contract.exists.0xfefe=true\n sets contract.name.0xfefe=test\n sets c. ```\n sets contract.exists.0xfefe=true\n sets contract.name.0xfefe=test\n sets contract.address.test=0xfefe\n sets contract.abi.test=abi\n```\n

Vulnerable code:
```\n sets contract.exists.0xfefe=true\n sets contract.name.0xfefe=test\n sets contract.address.test=0xfefe\n sets contract.abi.test=abi\n```\n
MEDIUM severity: Vulnerable function: ```\nIf using contracts such as the ExchangeRouter, Oracle or Reader do note tha. ```\nIf using contracts such as the ExchangeRouter, Oracle or Reader do note that their addresses will change as new logic is added\n```\n

Vulnerable code:
```\nIf using contracts such as the ExchangeRouter, Oracle or Reader do note that their addresses will change as new logic is added\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: ConvexStakingMixin.sol\n    function _isInvalidRewardToken(address token) internal overri. ```\nFile: ConvexStakingMixin.sol\n    function _isInvalidRewardToken(address token) internal override view returns (bool) {\n        return (\n            token == TOKEN_1 ||\n            token == TOKEN_2 ||\n            token == address(CURVE_POOL_TOKEN) ||\n            token == address(CONVEX_REW

Vulnerable code:
```\nFile: ConvexStakingMixin.sol\n    function _isInvalidRewardToken(address token) internal override view returns (bool) {\n        return (\n            token == TOKEN_1 ||\n            token == TOKEN_2 ||\n            token == address(CURVE_POOL_TOKEN) ||\n            token == address(CONVEX_REWARD_POOL) ||\n            token == address(CONVEX_BOOSTER) ||\n            token == Deployments.ALT_ETH_ADDRESS\n        );\n    }\n```\n
HIGH severity: Vulnerable function: ```\nFile: src\Tranche.sol\n    function redeemWithYT(address from, address to, uint256 pyAmount) ex. ```\nFile: src\Tranche.sol\n    function redeemWithYT(address from, address to, uint256 pyAmount) external nonReentrant returns (uint256) {\n// rest of code\n        accruedInTarget += _computeAccruedInterestInTarget(\n            _gscales.maxscale,\n            _lscale,\n// rest of code\n          

Vulnerable code:
```\nFile: src\Tranche.sol\n    function redeemWithYT(address from, address to, uint256 pyAmount) external nonReentrant returns (uint256) {\n// rest of code\n        accruedInTarget += _computeAccruedInterestInTarget(\n            _gscales.maxscale,\n            _lscale,\n// rest of code\n            _yt.balanceOf(from)\n        );\n..\n        uint256 sharesRedeemed = pyAmount.divWadDown(_gscales.maxscale);\n// rest of code\n        _target.safeTransfer(address(adapter), sharesRedeemed + accruedInTarget);\n        (uint256 amountWithdrawn, ) = adapter.prefundedRedeem(to);\n// rest of code\n        return amountWithdrawn;\n    }\n```\n
HIGH severity: Vulnerable function: ```\n\_poolById[poolId].numberOfMakers = uint256(pool.numberOfMakers).safeAdd(1). ```\n\_poolById[poolId].numberOfMakers = uint256(pool.numberOfMakers).safeAdd(1).downcastToUint32();\n```\n

Vulnerable code:
```\n\_poolById[poolId].numberOfMakers = uint256(pool.numberOfMakers).safeAdd(1).downcastToUint32();\n```\n
MEDIUM severity: Vulnerable function: ```\n/\*\*\n \* @notice allows improsening an Operator if the validator have not been exited until e. ```\n/\*\*\n \* @notice allows improsening an Operator if the validator have not been exited until expectedExit\n \* @dev anyone can call this function\n \* @dev if operator has given enough allowence, they can rotate the validators to avoid being prisoned\n \*/\nfunction blameOperator(\n StakePool 

Vulnerable code:
```\n/\*\*\n \* @notice allows improsening an Operator if the validator have not been exited until expectedExit\n \* @dev anyone can call this function\n \* @dev if operator has given enough allowence, they can rotate the validators to avoid being prisoned\n \*/\nfunction blameOperator(\n StakePool storage self,\n DataStoreUtils.DataStore storage DATASTORE,\n bytes calldata pk\n) external {\n if (\n block.timestamp > self.TELESCOPE.\_validators[pk].expectedExit &&\n self.TELESCOPE.\_validators[pk].state != 3\n ) {\n OracleUtils.imprison(\n DATASTORE,\n self.TELESCOPE.\_validators[pk].operatorId\n );\n }\n}\n```\n
HIGH severity: Vulnerable function: ```\ndebt_amount: uint256 = self._debt(_position_uid)\n    margin_debt_ratio: ui. ```\ndebt_amount: uint256 = self._debt(_position_uid)\n    margin_debt_ratio: uint256 = position.margin_amount * PRECISION / debt_amount\n\n\n    amount_out_received: uint256 = self._swap(\n        position.position_token, position.debt_token, _reduce_by_amount, min_amount_out\n    )\n\n\n    # redu

Vulnerable code:
```\ndebt_amount: uint256 = self._debt(_position_uid)\n    margin_debt_ratio: uint256 = position.margin_amount * PRECISION / debt_amount\n\n\n    amount_out_received: uint256 = self._swap(\n        position.position_token, position.debt_token, _reduce_by_amount, min_amount_out\n    )\n\n\n    # reduce margin and debt, keep leverage as before\n    reduce_margin_by_amount: uint256 = (\n        amount_out_received * margin_debt_ratio / PRECISION\n    )\n    reduce_debt_by_amount: uint256 = amount_out_received - reduce_margin_by_amount\n\n\n    position.margin_amount -= reduce_margin_by_amount\n\n\n    burnt_debt_shares: uint256 = self._repay(position.debt_token, reduce_debt_by_amount)\n    position.debt_shares -= burnt_debt_shares\n    position.position_amount -= _reduce_by_amount\n```\n
MEDIUM severity: Vulnerable function: ```\n      if (self.withdrawCache.withdrawParams.token == address(self.WNT)) {\n. ```\n      if (self.withdrawCache.withdrawParams.token == address(self.WNT)) {\n        self.WNT.withdraw(self.withdrawCache.tokensToUser);\naudit transfer ETH and call        (bool success, ) = self.withdrawCache.user.call{value: address(this).balance}("");\n        require(success, "Transfer faile

Vulnerable code:
```\n      if (self.withdrawCache.withdrawParams.token == address(self.WNT)) {\n        self.WNT.withdraw(self.withdrawCache.tokensToUser);\naudit transfer ETH and call        (bool success, ) = self.withdrawCache.user.call{value: address(this).balance}("");\n        require(success, "Transfer failed.");\n      } else {\n        // Transfer requested withdraw asset to user\n        IERC20(self.withdrawCache.withdrawParams.token).safeTransfer(\n          self.withdrawCache.user,\n          self.withdrawCache.tokensToUser\n        );\n      }\n\n      // Transfer any remaining tokenA/B that was unused (due to slippage) to user as well\n      self.tokenA.safeTransfer(self.withdrawCache.user, self.tokenA.balanceOf(address(this)));\n      self.tokenB.safeTransfer(self.withdrawCache.user, self.tokenB.balanceOf(address(this)));\n\n      // Burn user shares\n burn is after      self.vault.burn(self.withdrawCache.user, self.withdrawCache.withdrawParams.shareAmt);\n```\n
HIGH severity: Vulnerable function: ```\n      uint _claimable = claimable[_gauge];\n      if (SATIN_CASH_LP_GAUGE =. ```\n      uint _claimable = claimable[_gauge];\n      if (SATIN_CASH_LP_GAUGE == _gauge) {\n            veShare = calculateSatinCashLPVeShare(_claimable);\n      _claimable -= veShare;\n      }\n      if (_claimable > IMultiRewardsPool(_gauge).left(token) && _claimable / DURATION > 0) {\n          

Vulnerable code:
```\n      uint _claimable = claimable[_gauge];\n      if (SATIN_CASH_LP_GAUGE == _gauge) {\n            veShare = calculateSatinCashLPVeShare(_claimable);\n      _claimable -= veShare;\n      }\n      if (_claimable > IMultiRewardsPool(_gauge).left(token) && _claimable / DURATION > 0) {\n          claimable[_gauge] = 0;\n      if (is4poolGauge[_gauge]) {\n              IGauge(_gauge).notifyRewardAmount(token, _claimable, true);\n      } else {\n                IGauge(_gauge).notifyRewardAmount(token, _claimable, false);\n           }\n      emit DistributeReward(msg.sender, _gauge, _claimable);\n        }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction borrow(address account, address token, uint amt)\n    external\n    whenNotPaused\n   . ```\nfunction borrow(address account, address token, uint amt)\n    external\n    whenNotPaused\n    onlyOwner(account)\n{\n    if (registry.LTokenFor(token) == address(0))\n        revert Errors.LTokenUnavailable();\n    if (!riskEngine.isBorrowAllowed(account, token, amt))\n        revert Errors.R

Vulnerable code:
```\nfunction borrow(address account, address token, uint amt)\n    external\n    whenNotPaused\n    onlyOwner(account)\n{\n    if (registry.LTokenFor(token) == address(0))\n        revert Errors.LTokenUnavailable();\n    if (!riskEngine.isBorrowAllowed(account, token, amt))\n        revert Errors.RiskThresholdBreached();\n    if (IAccount(account).hasAsset(token) == false)\n        IAccount(account).addAsset(token);\n    if (ILToken(registry.LTokenFor(token)).lendTo(account, amt))\n        IAccount(account).addBorrow(token);\n    emit Borrow(account, msg.sender, token, amt);\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: ProportionalRebalancingStrategy.sol\n    function calculateRebalance(\n        IPrimeCash. ```\nFile: ProportionalRebalancingStrategy.sol\n    function calculateRebalance(\n        IPrimeCashHoldingsOracle oracle,\n        uint8[] calldata rebalancingTargets\n    ) external view override onlyNotional returns (RebalancingData memory rebalancingData) {\n        address[] memory holdings = o

Vulnerable code:
```\nFile: ProportionalRebalancingStrategy.sol\n    function calculateRebalance(\n        IPrimeCashHoldingsOracle oracle,\n        uint8[] calldata rebalancingTargets\n    ) external view override onlyNotional returns (RebalancingData memory rebalancingData) {\n        address[] memory holdings = oracle.holdings();\n..SNIP..\n        for (uint256 i; i < holdings.length;) {\n            address holding = holdings[i];\n            uint256 targetAmount = totalValue * rebalancingTargets[i] / uint256(Constants.PERCENTAGE_DECIMALS);\n            uint256 currentAmount = values[i];\n\n            redeemHoldings[i] = holding;\n            depositHoldings[i] = holding;\n..SNIP..\n        }\n\n        rebalancingData.redeemData = oracle.getRedemptionCalldataForRebalancing(redeemHoldings, redeemAmounts);\n        rebalancingData.depositData = oracle.getDepositCalldataForRebalancing(depositHoldings, depositAmounts);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n(, int256 price, , , ) = priceFeedDAIETH.latestRoundData();\n\nreturn\n    . ```\n(, int256 price, , , ) = priceFeedDAIETH.latestRoundData();\n\nreturn\n    (wethPriceUSD * 1e18) /\n    ((DAIWethPrice + uint256(price) * 1e10) / 2);\n```\n

Vulnerable code:
```\n(, int256 price, , , ) = priceFeedDAIETH.latestRoundData();\n\nreturn\n    (wethPriceUSD * 1e18) /\n    ((DAIWethPrice + uint256(price) * 1e10) / 2);\n```\n
HIGH severity: Vulnerable function: ```\nuint256 shares = \_deposit(to, tokenAmount);\n\n// Transfer Token Transfer . ```\nuint256 shares = \_deposit(to, tokenAmount);\n\n// Transfer Token Transfer Message Sender\nIERC20Upgradeable(token).transferFrom(\n    msg.sender,\n    address(this),\n    tokenAmount\n);\n```\n

Vulnerable code:
```\nuint256 shares = \_deposit(to, tokenAmount);\n\n// Transfer Token Transfer Message Sender\nIERC20Upgradeable(token).transferFrom(\n    msg.sender,\n    address(this),\n    tokenAmount\n);\n```\n
MEDIUM severity: Vulnerable function: ```\n    function updateImpact(uint32 newImpact) external onlyOwner {\n        emit UpdateImpact(imp. ```\n    function updateImpact(uint32 newImpact) external onlyOwner {\n        emit UpdateImpact(impact, newImpact);\n        impact = newImpact;\n    }\n```\n

Vulnerable code:
```\n    function updateImpact(uint32 newImpact) external onlyOwner {\n        emit UpdateImpact(impact, newImpact);\n        impact = newImpact;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\ncontract FortaStaking is BaseComponentUpgradeable, ERC1155SupplyUpgradeable. ```\ncontract FortaStaking is BaseComponentUpgradeable, ERC1155SupplyUpgradeable, SubjectTypeValidator, ISlashingExecutor, IStakeMigrator {\n```\n

Vulnerable code:
```\ncontract FortaStaking is BaseComponentUpgradeable, ERC1155SupplyUpgradeable, SubjectTypeValidator, ISlashingExecutor, IStakeMigrator {\n```\n
MEDIUM severity: Vulnerable function: ```\nActionInfo memory deleverInfo = _createAndValidateActionInfo(\n  _setToken,. ```\nActionInfo memory deleverInfo = _createAndValidateActionInfo(\n  _setToken,\n  _collateralAsset,\n  _repayAsset,\n  _redeemQuantityUnits,\n  _minRepayQuantityUnits,\n  _tradeAdapterName,\n  false\n );\n```\n

Vulnerable code:
```\nActionInfo memory deleverInfo = _createAndValidateActionInfo(\n  _setToken,\n  _collateralAsset,\n  _repayAsset,\n  _redeemQuantityUnits,\n  _minRepayQuantityUnits,\n  _tradeAdapterName,\n  false\n );\n```\n
HIGH severity: Vulnerable function: ```\nfunction stakeFor(address _for, uint256 _amount)\n    public\n    returns(bool)\n{\n    _proces. ```\nfunction stakeFor(address _for, uint256 _amount)\n    public\n    returns(bool)\n{\n    _processStake(_amount, _for);\n\n    //take away from sender\n    stakingToken.safeTransferFrom(msg.sender, address(this), _amount);\n    emit Staked(_for, _amount);\n    \n    return true;\n}\n```\n

Vulnerable code:
```\nfunction stakeFor(address _for, uint256 _amount)\n    public\n    returns(bool)\n{\n    _processStake(_amount, _for);\n\n    //take away from sender\n    stakingToken.safeTransferFrom(msg.sender, address(this), _amount);\n    emit Staked(_for, _amount);\n    \n    return true;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _processPendingPosition(Context memory context, Position memory newPendingPosition. ```\n    function _processPendingPosition(Context memory context, Position memory newPendingPosition) private {\n        context.pendingCollateral = context.pendingCollateral\n            .sub(newPendingPosition.fee)\n            .sub(Fixed6Lib.from(newPendingPosition.keeper));\n          \n        

Vulnerable code:
```\n    function _processPendingPosition(Context memory context, Position memory newPendingPosition) private {\n        context.pendingCollateral = context.pendingCollateral\n            .sub(newPendingPosition.fee)\n            .sub(Fixed6Lib.from(newPendingPosition.keeper));\n          \n        context.closable = context.closable\n            .sub(context.previousPendingMagnitude\n                .sub(newPendingPosition.magnitude().min(context.previousPendingMagnitude)));\n      context.previousPendingMagnitude = newPendingPosition.magnitude();\n\n        if (context.previousPendingMagnitude.gt(context.maxPendingMagnitude))\n            context.maxPendingMagnitude = newPendingPosition.magnitude();\n    }\n```\n
HIGH severity: Vulnerable function: ```\n     function _getCurrentSqrtPriceX96(\n        bool zeroForA,\n        address tokenA,\n      . ```\n     function _getCurrentSqrtPriceX96(\n        bool zeroForA,\n        address tokenA,\n        address tokenB,\n        uint24 fee\n    ) private view returns (uint160 sqrtPriceX96) {\n        if (!zeroForA) {\n            (tokenA, tokenB) = (tokenB, tokenA);\n        }\n        address poolA

Vulnerable code:
```\n     function _getCurrentSqrtPriceX96(\n        bool zeroForA,\n        address tokenA,\n        address tokenB,\n        uint24 fee\n    ) private view returns (uint160 sqrtPriceX96) {\n        if (!zeroForA) {\n            (tokenA, tokenB) = (tokenB, tokenA);\n        }\n        address poolAddress = computePoolAddress(tokenA, tokenB, fee);\n        (sqrtPriceX96, , , , , , ) = IUniswapV3Pool(poolAddress).slot0(); //@audit-issue can be easily manipulated\n    }\n```\n
HIGH severity: Vulnerable function: ```\n    function withdrawToken(\n        address from,\n        address token,\n        address rec. ```\n    function withdrawToken(\n        address from,\n        address token,\n        address receiver,\n        uint256 sGlpAmount\n    ) external returns (uint256 amountOut) {\n        // user has approved periphery to use junior vault shares\n        dnGmxJuniorVault.withdraw(sGlpAmount, addre

Vulnerable code:
```\n    function withdrawToken(\n        address from,\n        address token,\n        address receiver,\n        uint256 sGlpAmount\n    ) external returns (uint256 amountOut) {\n        // user has approved periphery to use junior vault shares\n        dnGmxJuniorVault.withdraw(sGlpAmount, address(this), from);\n// rest of code\n\n    function redeemToken(\n        address from,\n        address token,\n        address receiver,\n        uint256 sharesAmount\n    ) external returns (uint256 amountOut) {\n        // user has approved periphery to use junior vault shares\n        dnGmxJuniorVault.redeem(sharesAmount, address(this), from);\n// rest of code\n```\n
MEDIUM severity: Vulnerable function: ```\ntransaction.data = abi.encodeWithSelector(\n IUniswapV2Router01.swapExactET. ```\ntransaction.data = abi.encodeWithSelector(\n IUniswapV2Router01.swapExactETHForTokens.selector,\n 0,\n path,\n msg.sender,\n type(uint256).max\n);\n```\n

Vulnerable code:
```\ntransaction.data = abi.encodeWithSelector(\n IUniswapV2Router01.swapExactETHForTokens.selector,\n 0,\n path,\n msg.sender,\n type(uint256).max\n);\n```\n
MEDIUM severity: Vulnerable function: ```\nwhitelistingAddress = \_whitelistingAddress;\nprojectAddress = \_projectAdd. ```\nwhitelistingAddress = \_whitelistingAddress;\nprojectAddress = \_projectAddress;\nfreezerAddress = \_projectAddress; // TODO change, here only for testing\nrescuerAddress = \_projectAddress; // TODO change, here only for testing\n```\n

Vulnerable code:
```\nwhitelistingAddress = \_whitelistingAddress;\nprojectAddress = \_projectAddress;\nfreezerAddress = \_projectAddress; // TODO change, here only for testing\nrescuerAddress = \_projectAddress; // TODO change, here only for testing\n```\n
HIGH severity: Vulnerable function: ```\n       require(IERC20(outputTokenAddress).balanceOf(address(this)) >= \n   . ```\n       require(IERC20(outputTokenAddress).balanceOf(address(this)) >= \n           (totalAllocatedOutputToken - totalReleasedOutputToken), \n       "INSUFFICIENT_OUTPUT_TOKEN");\n            IERC20(inputTokenAddress).transferFrom(msg.sender, address(0), \n       _inputTokenAmount);\n```\n

Vulnerable code:
```\n       require(IERC20(outputTokenAddress).balanceOf(address(this)) >= \n           (totalAllocatedOutputToken - totalReleasedOutputToken), \n       "INSUFFICIENT_OUTPUT_TOKEN");\n            IERC20(inputTokenAddress).transferFrom(msg.sender, address(0), \n       _inputTokenAmount);\n```\n
HIGH severity: Vulnerable function: ```\nFile: GMXWithdraw.sol#processWithdraw\nself.vault.burn(self.withdrawCache.u. ```\nFile: GMXWithdraw.sol#processWithdraw\nself.vault.burn(self.withdrawCache.user, self.withdrawCache.withdrawParams.shareAmt);\n```\n

Vulnerable code:
```\nFile: GMXWithdraw.sol#processWithdraw\nself.vault.burn(self.withdrawCache.user, self.withdrawCache.withdrawParams.shareAmt);\n```\n