Farseen0/scar-pairs huggingface dataset:
HIGH severity: Vulnerable function: ```\nassembly {\n    flag := mload(add(\_data, 32))\n}\nif (flag == CHANGE\_PART. ```\nassembly {\n    flag := mload(add(\_data, 32))\n}\nif (flag == CHANGE\_PARTITION\_FLAG) {\n    assembly {\n        toPartition := mload(add(\_data, 64))\n```\n

Vulnerable code:
```\nassembly {\n    flag := mload(add(\_data, 32))\n}\nif (flag == CHANGE\_PARTITION\_FLAG) {\n    assembly {\n        toPartition := mload(add(\_data, 64))\n```\n
HIGH severity: Vulnerable function: ```\nfunction reduceWeight(IERC20Token \_reserveToken)\n    public\n    validReserve(\_reserveToken). ```\nfunction reduceWeight(IERC20Token \_reserveToken)\n    public\n    validReserve(\_reserveToken)\n    ownerOnly\n{\n    \_protected();\n```\n

Vulnerable code:
```\nfunction reduceWeight(IERC20Token \_reserveToken)\n    public\n    validReserve(\_reserveToken)\n    ownerOnly\n{\n    \_protected();\n```\n
HIGH severity: Vulnerable function: ```\n    Checkpoint memory cp = checkpoints[tokenId][_endIndex];\n      uint _la. ```\n    Checkpoint memory cp = checkpoints[tokenId][_endIndex];\n      uint _lastEpochStart = _bribeStart(cp.timestamp);\n        uint _lastEpochEnd = _lastEpochStart + DURATION;\n    if (block.timestamp > _lastEpochEnd) {\n            reward += (cp.balanceOf * \n         tokenRewardsPerEpoch[token

Vulnerable code:
```\n    Checkpoint memory cp = checkpoints[tokenId][_endIndex];\n      uint _lastEpochStart = _bribeStart(cp.timestamp);\n        uint _lastEpochEnd = _lastEpochStart + DURATION;\n    if (block.timestamp > _lastEpochEnd) {\n            reward += (cp.balanceOf * \n         tokenRewardsPerEpoch[token][_lastEpochStart]) /\n           supplyCheckpoints[getPriorSupplyIndex(_lastEpochEnd)].supply;\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _distribute(address[] memory, bytes memory, address _sender)\n        internal\n  . ```\n    function _distribute(address[] memory, bytes memory, address _sender)\n        internal\n        virtual\n        override\n        onlyInactivePool\n        onlyPoolManager(_sender)\n    {\n        // rest of code\n\n        IAllo.Pool memory pool = allo.getPool(poolId);\n        Milestone

Vulnerable code:
```\n    function _distribute(address[] memory, bytes memory, address _sender)\n        internal\n        virtual\n        override\n        onlyInactivePool\n        onlyPoolManager(_sender)\n    {\n        // rest of code\n\n        IAllo.Pool memory pool = allo.getPool(poolId);\n        Milestone storage milestone = milestones[upcomingMilestone];\n        Recipient memory recipient = _recipients[acceptedRecipientId];\n\n        if (recipient.proposalBid > poolAmount) revert NOT_ENOUGH_FUNDS();\n\n        uint256 amount = (recipient.proposalBid * milestone.amountPercentage) / 1e18;\n\n        poolAmount -= amount;//<@@ NOTICE the poolAmount get decrease over time\n\n        _transferAmount(pool.token, recipient.recipientAddress, amount);\n\n        // rest of code\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n(bool success,) = recipient.call{value: amount, gas: 10_000}('');\nif (!suc. ```\n(bool success,) = recipient.call{value: amount, gas: 10_000}('');\nif (!success) {revert ETH_TRANSFER_FAILED();}\n```\n

Vulnerable code:
```\n(bool success,) = recipient.call{value: amount, gas: 10_000}('');\nif (!success) {revert ETH_TRANSFER_FAILED();}\n```\n
HIGH severity: Vulnerable function: ```\n        (bool success, bytes memory data) = withdrawal.usr.call{value: with. ```\n        (bool success, bytes memory data) = withdrawal.usr.call{value: withdrawal.amount}("");\n        if (success) {\n            reserve -= withdrawal.amount;\n        } else {\n            emit WithdrawalFailed(withdrawal.usr, withdrawal.amount, data);\n        }\n        i += 1;\n```\n

Vulnerable code:
```\n        (bool success, bytes memory data) = withdrawal.usr.call{value: withdrawal.amount}("");\n        if (success) {\n            reserve -= withdrawal.amount;\n        } else {\n            emit WithdrawalFailed(withdrawal.usr, withdrawal.amount, data);\n        }\n        i += 1;\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: PartyBFacetImpl.sol\n    function emergencyClosePosition(uint256 quoteId, PairUpnlAndPric. ```\nFile: PartyBFacetImpl.sol\n    function emergencyClosePosition(uint256 quoteId, PairUpnlAndPriceSig memory upnlSig) internal {\n        AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n        Quote storage quote = QuoteStorage.layout().quotes[quoteId];\n        require(q

Vulnerable code:
```\nFile: PartyBFacetImpl.sol\n    function emergencyClosePosition(uint256 quoteId, PairUpnlAndPriceSig memory upnlSig) internal {\n        AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n        Quote storage quote = QuoteStorage.layout().quotes[quoteId];\n        require(quote.quoteStatus == QuoteStatus.OPENED, "PartyBFacet: Invalid state");\n..SNIP..\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction pendingFee(GMXTypes.Store storage self) public view returns (uint256) {\n        uint2. ```\nfunction pendingFee(GMXTypes.Store storage self) public view returns (uint256) {\n        uint256 totalSupply_ = IERC20(address(self.vault)).totalSupply();\n        uint256 _secondsFromLastCollection = block.timestamp - self.lastFeeCollected;\n        return (totalSupply_ * self.feePerSecond * 

Vulnerable code:
```\nfunction pendingFee(GMXTypes.Store storage self) public view returns (uint256) {\n        uint256 totalSupply_ = IERC20(address(self.vault)).totalSupply();\n        uint256 _secondsFromLastCollection = block.timestamp - self.lastFeeCollected;\n        return (totalSupply_ * self.feePerSecond * _secondsFromLastCollection) / SAFE_MULTIPLIER;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n NP_t = (1 + rate_s) * MOMP_s * TP_s * \frac{TP_s}{LUP_s} *  \frac{BI_s}{BI. ```\n NP_t = (1 + rate_s) * MOMP_s * TP_s * \frac{TP_s}{LUP_s} *  \frac{BI_s}{BI_t}\n```\n

Vulnerable code:
```\n NP_t = (1 + rate_s) * MOMP_s * TP_s * \frac{TP_s}{LUP_s} *  \frac{BI_s}{BI_t}\n```\n
HIGH severity: Vulnerable function: ```\ndef _debt_interest_since_last_update(_debt_token: address) -> uint256:\n\n . ```\ndef _debt_interest_since_last_update(_debt_token: address) -> uint256:\n\n    return (\n\n        (block.timestamp - self.last_debt_update[_debt_token])* self._current_interest_per_second(_debt_token)\n        * self.total_debt_amount[_debt_token]\n        / PERCENTAGE_BASE \n        / PRECISIO

Vulnerable code:
```\ndef _debt_interest_since_last_update(_debt_token: address) -> uint256:\n\n    return (\n\n        (block.timestamp - self.last_debt_update[_debt_token])* self._current_interest_per_second(_debt_token)\n        * self.total_debt_amount[_debt_token]\n        / PERCENTAGE_BASE \n        / PRECISION\n    )\n```\n
MEDIUM severity: Vulnerable function: ```\nuint256 fee = \_value.mul(buyFeePct).div(PCT\_BASE);\nuint256 value = \_val. ```\nuint256 fee = \_value.mul(buyFeePct).div(PCT\_BASE);\nuint256 value = \_value.sub(fee);\n\n// collect fee and collateral\nif (fee > 0) {\n    \_transfer(\_buyer, beneficiary, \_collateral, fee);\n}\n\_transfer(\_buyer, address(reserve), \_collateral, value);\n```\n

Vulnerable code:
```\nuint256 fee = \_value.mul(buyFeePct).div(PCT\_BASE);\nuint256 value = \_value.sub(fee);\n\n// collect fee and collateral\nif (fee > 0) {\n    \_transfer(\_buyer, beneficiary, \_collateral, fee);\n}\n\_transfer(\_buyer, address(reserve), \_collateral, value);\n```\n
MEDIUM severity: Vulnerable function: ```\namountsToBeneficiary = $oracle.getQuoteAmounts(quoteParams_);\n```\n. ```\namountsToBeneficiary = $oracle.getQuoteAmounts(quoteParams_);\n```\n

Vulnerable code:
```\namountsToBeneficiary = $oracle.getQuoteAmounts(quoteParams_);\n```\n
HIGH severity: Vulnerable function: ```\nfunction withdraw(uint256 amount) public {\n    withdrawFromAccount(msg.sender, amount);\n}\n``. ```\nfunction withdraw(uint256 amount) public {\n    withdrawFromAccount(msg.sender, amount);\n}\n```\n

Vulnerable code:
```\nfunction withdraw(uint256 amount) public {\n    withdrawFromAccount(msg.sender, amount);\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction canCallClaimFees()\n    internal\n    view\n    returns (bool, address[] memory, addre. ```\nfunction canCallClaimFees()\n    internal\n    view\n    returns (bool, address[] memory, address[] memory)\n{\n    return (true, WETH, new address[](0));\n}\n```\n

Vulnerable code:
```\nfunction canCallClaimFees()\n    internal\n    view\n    returns (bool, address[] memory, address[] memory)\n{\n    return (true, WETH, new address[](0));\n}\n```\n
HIGH severity: Vulnerable function: ```\nif (nativeMappingValue == NATIVE\_STATUS) {\n // Token is native on the loc. ```\nif (nativeMappingValue == NATIVE\_STATUS) {\n // Token is native on the local chain\n IERC20(\_nativeToken).safeTransfer(\_recipient, \_amount);\n} else {\n bridgedToken = nativeMappingValue;\n if (nativeMappingValue == EMPTY) {\n // New token\n bridgedToken = deployBridgedToken(\_nativeToken, 

Vulnerable code:
```\nif (nativeMappingValue == NATIVE\_STATUS) {\n // Token is native on the local chain\n IERC20(\_nativeToken).safeTransfer(\_recipient, \_amount);\n} else {\n bridgedToken = nativeMappingValue;\n if (nativeMappingValue == EMPTY) {\n // New token\n bridgedToken = deployBridgedToken(\_nativeToken, \_tokenMetadata);\n bridgedToNativeToken[bridgedToken] = \_nativeToken;\n nativeToBridgedToken[\_nativeToken] = bridgedToken;\n }\n BridgedToken(bridgedToken).mint(\_recipient, \_amount);\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction \_slash() private {\n    // Get contracts\n    RocketNodeStakingInterface rocketNodeSt. ```\nfunction \_slash() private {\n    // Get contracts\n    RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));\n    // Slash required amount and reset storage value\n    uint256 slashAmount = nodeSlashBalance;\n    nodeSlashBalance = 

Vulnerable code:
```\nfunction \_slash() private {\n    // Get contracts\n    RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));\n    // Slash required amount and reset storage value\n    uint256 slashAmount = nodeSlashBalance;\n    nodeSlashBalance = 0;\n    rocketNodeStaking.slashRPL(nodeAddress, slashAmount);\n    // Record slashing\n    slashed = true;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nint256 public constant chainlinkDecimalsAdapter = 10\*\*10;\n\nconstructor(address \_feeder) pu. ```\nint256 public constant chainlinkDecimalsAdapter = 10\*\*10;\n\nconstructor(address \_feeder) public {\n    feeder = IChainlinkFeeder(\_feeder);\n}\n\nfunction price() public view returns (uint256 newPrice, uint256 timestamp) {\n    newPrice = (feeder.latestAnswer() \* chainlinkDecimalsAdapter).

Vulnerable code:
```\nint256 public constant chainlinkDecimalsAdapter = 10\*\*10;\n\nconstructor(address \_feeder) public {\n    feeder = IChainlinkFeeder(\_feeder);\n}\n\nfunction price() public view returns (uint256 newPrice, uint256 timestamp) {\n    newPrice = (feeder.latestAnswer() \* chainlinkDecimalsAdapter).toUint256();\n    timestamp = feeder.latestTimestamp();\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nfinalUserAmount = finalToken.balanceOf(address(this)) - relayerFeeAmount;\n. ```\nfinalUserAmount = finalToken.balanceOf(address(this)) - relayerFeeAmount;\n```\n

Vulnerable code:
```\nfinalUserAmount = finalToken.balanceOf(address(this)) - relayerFeeAmount;\n```\n
HIGH severity: Vulnerable function: ```\nfunction withdrawUnstakedTokens(address staker)\n public\n virtual\n override\n whenNotPaused\n. ```\nfunction withdrawUnstakedTokens(address staker)\n public\n virtual\n override\n whenNotPaused\n{\n require(staker == \_msgSender(), "LQ20");\n uint256 \_withdrawBalance;\n uint256 \_unstakingExpirationLength = \_unstakingExpiration[staker]\n  .length;\n uint256 \_counter = \_withdrawCounters[st

Vulnerable code:
```\nfunction withdrawUnstakedTokens(address staker)\n public\n virtual\n override\n whenNotPaused\n{\n require(staker == \_msgSender(), "LQ20");\n uint256 \_withdrawBalance;\n uint256 \_unstakingExpirationLength = \_unstakingExpiration[staker]\n  .length;\n uint256 \_counter = \_withdrawCounters[staker];\n for (\n  uint256 i = \_counter;\n  i < \_unstakingExpirationLength;\n  i = i.add(1)\n ) {\n  //get getUnstakeTime and compare it with current timestamp to check if 21 days + epoch difference has passed\n  (uint256 \_getUnstakeTime, , ) = getUnstakeTime(\n   \_unstakingExpiration[staker][i]\n  );\n  if (block.timestamp >= \_getUnstakeTime) {\n   //if 21 days + epoch difference has passed, then add the balance and then mint uTokens\n   \_withdrawBalance = \_withdrawBalance.add(\n    \_unstakingAmount[staker][i]\n   );\n   \_unstakingExpiration[staker][i] = 0;\n   \_unstakingAmount[staker][i] = 0;\n   \_withdrawCounters[staker] = \_withdrawCounters[staker].add(1);\n  }\n }\n\n require(\_withdrawBalance > 0, "LQ21");\n emit WithdrawUnstakeTokens(staker, \_withdrawBalance, block.timestamp);\n \_uTokens.mint(staker, \_withdrawBalance);\n}\n```\n
HIGH severity: Vulnerable function: ```\n        ICurvePool(pool).remove_liquidity_one_coin(\n            amountPosR. ```\n        ICurvePool(pool).remove_liquidity_one_coin(\n            amountPosRemove,\n            int128(tokenIndex),\n            0\n        );\n```\n

Vulnerable code:
```\n        ICurvePool(pool).remove_liquidity_one_coin(\n            amountPosRemove,\n            int128(tokenIndex),\n            0\n        );\n```\n
MEDIUM severity: Vulnerable function: ```\n         for (uint256 i = 0; i < balances.length; i++) {\n               if. ```\n         for (uint256 i = 0; i < balances.length; i++) {\n               if (i == indexOfReferenceToken) {\n                amtsNeeded[i] = amtIn;\n         } else {\n         // amtsNeeded[i] = (amtIn * balances[i]) / \n                  balances[indexOfReferenceToken];\n                     a

Vulnerable code:
```\n         for (uint256 i = 0; i < balances.length; i++) {\n               if (i == indexOfReferenceToken) {\n                amtsNeeded[i] = amtIn;\n         } else {\n         // amtsNeeded[i] = (amtIn * balances[i]) / \n                  balances[indexOfReferenceToken];\n                     amtsNeeded[i] = Arithmetic.overflowResistantFraction(amtIn, \n                  balances[i], balances[indexOfReferenceToken]);\n               }\n            }\n```\n
MEDIUM severity: Vulnerable function: ```\nemit ApprovalByPartition(\_partition, \_tokenHolder, \_spender, \_amount);\. ```\nemit ApprovalByPartition(\_partition, \_tokenHolder, \_spender, \_amount);\n```\n

Vulnerable code:
```\nemit ApprovalByPartition(\_partition, \_tokenHolder, \_spender, \_amount);\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction _makePayment(uint256 collateralId, uint256 totalCapitalAvailable)\n  internal\n{\n  ui. ```\nfunction _makePayment(uint256 collateralId, uint256 totalCapitalAvailable)\n  internal\n{\n  uint256[] memory openLiens = liens[collateralId];\n  uint256 paymentAmount = totalCapitalAvailable;\n  for (uint256 i = 0; i < openLiens.length; ++i) {\n    uint256 capitalSpent = _payment(\n      colla

Vulnerable code:
```\nfunction _makePayment(uint256 collateralId, uint256 totalCapitalAvailable)\n  internal\n{\n  uint256[] memory openLiens = liens[collateralId];\n  uint256 paymentAmount = totalCapitalAvailable;\n  for (uint256 i = 0; i < openLiens.length; ++i) {\n    uint256 capitalSpent = _payment(\n      collateralId,\n      uint8(i),\n      paymentAmount,\n      address(msg.sender)\n    );\n    paymentAmount -= capitalSpent;\n  }\n}\n```\n
HIGH severity: Vulnerable function: ```\nFile: LMPVault.sol\n            profit = (currentNavPerShare - effectiveNav. ```\nFile: LMPVault.sol\n            profit = (currentNavPerShare - effectiveNavPerShareHighMark) * totalSupply;\n            fees = profit.mulDiv(performanceFeeBps, (MAX_FEE_BPS ** 2), Math.Rounding.Up);\n            if (fees > 0 && sink != address(0)) {\n                // Calculated separate from

Vulnerable code:
```\nFile: LMPVault.sol\n            profit = (currentNavPerShare - effectiveNavPerShareHighMark) * totalSupply;\n            fees = profit.mulDiv(performanceFeeBps, (MAX_FEE_BPS ** 2), Math.Rounding.Up);\n            if (fees > 0 && sink != address(0)) {\n                // Calculated separate from other mints as normal share mint is round down\n                shares = _convertToShares(fees, Math.Rounding.Up);\n                _mint(sink, shares);\n                emit Deposit(address(this), sink, fees, shares);\n            }\n```\n
MEDIUM severity: Vulnerable function: ```\n      uint256 userAmount = balanceOf(msg.sender);\n         // - Underlying. ```\n      uint256 userAmount = balanceOf(msg.sender);\n         // - Underlying (Frontend ONLY)\n            if (userAmount == 0) {\n            user.amount = 0;\n         } else {\n         user.amount -= r;\n      }\n```\n

Vulnerable code:
```\n      uint256 userAmount = balanceOf(msg.sender);\n         // - Underlying (Frontend ONLY)\n            if (userAmount == 0) {\n            user.amount = 0;\n         } else {\n         user.amount -= r;\n      }\n```\n
MEDIUM severity: Vulnerable function: ```\n    function recover(address token, uint256 amount) external onlyOwner {\n        if (Constants. ```\n    function recover(address token, uint256 amount) external onlyOwner {\n        if (Constants.ETH_ADDRESS == token) {\n            (bool status,) = msg.sender.call{value: amount}("");\n            require(status);\n        } else {\n          IERC20(token).transfer(msg.sender, amount);\n     

Vulnerable code:
```\n    function recover(address token, uint256 amount) external onlyOwner {\n        if (Constants.ETH_ADDRESS == token) {\n            (bool status,) = msg.sender.call{value: amount}("");\n            require(status);\n        } else {\n          IERC20(token).transfer(msg.sender, amount);\n        }\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction maxMint(address) public view virtual returns (uint256) {\n    return type(uint256).max. ```\nfunction maxMint(address) public view virtual returns (uint256) {\n    return type(uint256).max;\n}\n```\n

Vulnerable code:
```\nfunction maxMint(address) public view virtual returns (uint256) {\n    return type(uint256).max;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: MarketUtils.sol\n\n   cache.fundingUsd = (cache.sizeOfLargerSide / Pr. ```\nFile: MarketUtils.sol\n\n   cache.fundingUsd = (cache.sizeOfLargerSide / Precision.FLOAT_PRECISION) * cache.durationInSeconds * cache.fundingFactorPerSecond;\n\n   if (result.longsPayShorts) {\n         cache.fundingUsdForLongCollateral = cache.fundingUsd * cache.oi.longOpenInterestWithLongColl

Vulnerable code:
```\nFile: MarketUtils.sol\n\n   cache.fundingUsd = (cache.sizeOfLargerSide / Precision.FLOAT_PRECISION) * cache.durationInSeconds * cache.fundingFactorPerSecond;\n\n   if (result.longsPayShorts) {\n         cache.fundingUsdForLongCollateral = cache.fundingUsd * cache.oi.longOpenInterestWithLongCollateral / cache.oi.longOpenInterest;\n         cache.fundingUsdForShortCollateral = cache.fundingUsd * cache.oi.longOpenInterestWithShortCollateral / cache.oi.longOpenInterest;\n     } else {\n         cache.fundingUsdForLongCollateral = cache.fundingUsd * cache.oi.shortOpenInterestWithLongCollateral / cache.oi.shortOpenInterest;\n         cache.fundingUsdForShortCollateral = cache.fundingUsd * cache.oi.shortOpenInterestWithShortCollateral / cache.oi.shortOpenInterest;\n     }\n```\n
MEDIUM severity: Vulnerable function: ```\nrequire(\_votesRequired > 0, "Proposal cannot have a 0 votes required to be. ```\nrequire(\_votesRequired > 0, "Proposal cannot have a 0 votes required to be successful");\n```\n

Vulnerable code:
```\nrequire(\_votesRequired > 0, "Proposal cannot have a 0 votes required to be successful");\n```\n
HIGH severity: Vulnerable function: ```\nfunction setGlobalParameter(bytes32 key, uint256 value) public onlyWhitelistAdmin {\n    if (ke. ```\nfunction setGlobalParameter(bytes32 key, uint256 value) public onlyWhitelistAdmin {\n    if (key == "withdrawalLockBlockCount") {\n        withdrawalLockBlockCount = value;\n    } else if (key == "brokerLockBlockCount") {\n        brokerLockBlockCount = value;\n    } else {\n        revert("key

Vulnerable code:
```\nfunction setGlobalParameter(bytes32 key, uint256 value) public onlyWhitelistAdmin {\n    if (key == "withdrawalLockBlockCount") {\n        withdrawalLockBlockCount = value;\n    } else if (key == "brokerLockBlockCount") {\n        brokerLockBlockCount = value;\n    } else {\n        revert("key not exists");\n    }\n    emit UpdateGlobalParameter(key, value);\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction resetVaultUnderlying(uint256 _vaultNumber) internal {\n  vaults[_vaultNumber].totalUnd. ```\nfunction resetVaultUnderlying(uint256 _vaultNumber) internal {\n  vaults[_vaultNumber].totalUnderlying = 0;\n  vaultStage[_vaultNumber].underlyingReceived = 0;\n  vaults[_vaultNumber].totalSupply = 0;\n}\n```\n

Vulnerable code:
```\nfunction resetVaultUnderlying(uint256 _vaultNumber) internal {\n  vaults[_vaultNumber].totalUnderlying = 0;\n  vaultStage[_vaultNumber].underlyingReceived = 0;\n  vaults[_vaultNumber].totalSupply = 0;\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction executeOperation(\n    address[] memory \_assets,\n    uint256[] memory \_amounts,\n  . ```\nfunction executeOperation(\n    address[] memory \_assets,\n    uint256[] memory \_amounts,\n    uint256[] memory \_fees,\n    address \_initiator,\n    bytes memory \_params\n) public returns (bool) {\n    require(msg.sender == AAVE\_LENDING\_POOL, ERR\_ONLY\_AAVE\_CALLER);\n    require(\_init

Vulnerable code:
```\nfunction executeOperation(\n    address[] memory \_assets,\n    uint256[] memory \_amounts,\n    uint256[] memory \_fees,\n    address \_initiator,\n    bytes memory \_params\n) public returns (bool) {\n    require(msg.sender == AAVE\_LENDING\_POOL, ERR\_ONLY\_AAVE\_CALLER);\n    require(\_initiator == address(this), ERR\_SAME\_CALLER);\n\n    (Task memory currTask, address proxy) = abi.decode(\_params, (Task, address));\n\n    // Send FL amounts to user proxy\n    for (uint256 i = 0; i < \_assets.length; ++i) {\n        \_assets[i].withdrawTokens(proxy, \_amounts[i]);\n    }\n\n    address payable taskExecutor = payable(registry.getAddr(TASK\_EXECUTOR\_ID));\n\n    // call Action execution\n    IDSProxy(proxy).execute{value: address(this).balance}(\n        taskExecutor,\n        abi.encodeWithSelector(CALLBACK\_SELECTOR, currTask, bytes32(\_amounts[0] + \_fees[0]))\n    );\n\n    // return FL\n    for (uint256 i = 0; i < \_assets.length; i++) {\n        \_assets[i].approveToken(address(AAVE\_LENDING\_POOL), \_amounts[i] + \_fees[i]);\n    }\n\n    return true;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    /**\n     @dev Whitelist users\n     @param _address Address of User\n     */\n    function. ```\n    /**\n     @dev Whitelist users\n     @param _address Address of User\n     */\n    function setClaimBlock(address _address) external onlyRole(OPERATOR) {\n        blockClaim[_address] = true;\n    }\n```\n

Vulnerable code:
```\n    /**\n     @dev Whitelist users\n     @param _address Address of User\n     */\n    function setClaimBlock(address _address) external onlyRole(OPERATOR) {\n        blockClaim[_address] = true;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n       if (msg.sender != address(token)) {\n           revert AccessDeniedD. ```\n       if (msg.sender != address(token)) {\n           revert AccessDeniedDATATokenOnly();\n       }\n```\n

Vulnerable code:
```\n       if (msg.sender != address(token)) {\n           revert AccessDeniedDATATokenOnly();\n       }\n```\n