Farseen0/scar-pairs huggingface dataset:
HIGH severity: Vulnerable function: ```\n        if (inversed && balance < amountDesired) {\n             // collat . ```\n        if (inversed && balance < amountDesired) {\n             // collat = 0\n        uint256 transferAmount = amountDesired - balance;\n         uint256 parentPoolBalance = \n             ILiquidityPool(parentLiquidityPool).getBalance(address(token0));\n        if (parentPoolBalance < transf

Vulnerable code:
```\n        if (inversed && balance < amountDesired) {\n             // collat = 0\n        uint256 transferAmount = amountDesired - balance;\n         uint256 parentPoolBalance = \n             ILiquidityPool(parentLiquidityPool).getBalance(address(token0));\n        if (parentPoolBalance < transferAmount) { revert \n            CustomErrors.WithdrawExceedsLiquidity(); \n        }\n        SafeTransferLib.safeTransferFrom(address(token0), msg.sender, \n         address(this), transferAmount);\n            } \n```\n
HIGH severity: Vulnerable function: ```\nfunction setCustomContract(\n address \_nativeToken,\n address \_targetContract\n) external onl. ```\nfunction setCustomContract(\n address \_nativeToken,\n address \_targetContract\n) external onlyOwner isNewToken(\_nativeToken) {\n nativeToBridgedToken[\_nativeToken] = \_targetContract;\n bridgedToNativeToken[\_targetContract] = \_nativeToken;\n emit CustomContractSet(\_nativeToken, \_targetC

Vulnerable code:
```\nfunction setCustomContract(\n address \_nativeToken,\n address \_targetContract\n) external onlyOwner isNewToken(\_nativeToken) {\n nativeToBridgedToken[\_nativeToken] = \_targetContract;\n bridgedToNativeToken[\_targetContract] = \_nativeToken;\n emit CustomContractSet(\_nativeToken, \_targetContract);\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction cancelVesting(uint256 categoryId, uint256 vestingId, address user, bool giveUnclaimed). ```\nfunction cancelVesting(uint256 categoryId, uint256 vestingId, address user, bool giveUnclaimed)\n        external\n        onlyOwner\n{\n        UserVesting memory userVesting = userVestings[categoryId][vestingId][user];\n\n        if (userVesting.amount == 0) {\n            revert UserVestingD

Vulnerable code:
```\nfunction cancelVesting(uint256 categoryId, uint256 vestingId, address user, bool giveUnclaimed)\n        external\n        onlyOwner\n{\n        UserVesting memory userVesting = userVestings[categoryId][vestingId][user];\n\n        if (userVesting.amount == 0) {\n            revert UserVestingDoesNotExists(categoryId, vestingId, user);\n        }\n\n        if (userVesting.startTime + vestingInfos[categoryId][vestingId].period <= block.timestamp) {\n            revert AlreadyVested(categoryId, vestingId, user);\n        }\n\n        uint256 lockupId = lockupIds[categoryId][vestingId][user];\n\n        if (lockupId != 0) {\n            veTRUF.unstakeVesting(user, lockupId - 1, true);\n            delete lockupIds[categoryId][vestingId][user];\n            userVesting.locked = 0;\n        }\n\n        VestingCategory storage category = categories[categoryId];\n\n        uint256 claimableAmount = claimable(categoryId, vestingId, user);\n        if (giveUnclaimed && claimableAmount != 0) {\n            trufToken.safeTransfer(user, claimableAmount);\n\n            userVesting.claimed += claimableAmount;\n            category.totalClaimed += claimableAmount;\n            emit Claimed(categoryId, vestingId, user, claimableAmount);\n        }\n\n        uint256 unvested = userVesting.amount - userVesting.claimed;\n\n        delete userVestings[categoryId][vestingId][user];\n\n        category.allocated -= unvested;\n\n        emit CancelVesting(categoryId, vestingId, user, giveUnclaimed);\n}\n```\n
HIGH severity: Vulnerable function: ```\n    function repay (uint256 loanID, uint256 repaid) external {\n        Loan storage loan = loa. ```\n    function repay (uint256 loanID, uint256 repaid) external {\n        Loan storage loan = loans[loanID];\n// rest of code\n        debt.transferFrom(msg.sender, loan.lender, repaid);   //***<------- lender in debt token's blocklist will revert , example :debt = usdc\n        collateral.transf

Vulnerable code:
```\n    function repay (uint256 loanID, uint256 repaid) external {\n        Loan storage loan = loans[loanID];\n// rest of code\n        debt.transferFrom(msg.sender, loan.lender, repaid);   //***<------- lender in debt token's blocklist will revert , example :debt = usdc\n        collateral.transfer(owner, decollateralized);\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\n  function fulfillDomainBid(\n  uint256 parentId,\n  uint256 bidAmount,\n  uint256 royaltyAmoun. ```\n  function fulfillDomainBid(\n  uint256 parentId,\n  uint256 bidAmount,\n  uint256 royaltyAmount,\n  string memory bidIPFSHash,\n  string memory name,\n  string memory metadata,\n  bytes memory signature,\n  bool lockOnCreation,\n  address recipient\n) external {\n  bytes32 recoveredBidHash = c

Vulnerable code:
```\n  function fulfillDomainBid(\n  uint256 parentId,\n  uint256 bidAmount,\n  uint256 royaltyAmount,\n  string memory bidIPFSHash,\n  string memory name,\n  string memory metadata,\n  bytes memory signature,\n  bool lockOnCreation,\n  address recipient\n) external {\n  bytes32 recoveredBidHash = createBid(parentId, bidAmount, bidIPFSHash, name);\n  address recoveredBidder = recover(recoveredBidHash, signature);\n  require(recipient == recoveredBidder, "ZNS: bid info doesnt match/exist");\n  bytes32 hashOfSig = keccak256(abi.encode(signature));\n  require(approvedBids[hashOfSig] == true, "ZNS: has been fullfilled");\n  infinity.safeTransferFrom(recoveredBidder, controller, bidAmount);\n  uint256 id = registrar.registerDomain(parentId, name, controller, recoveredBidder);\n  registrar.setDomainMetadataUri(id, metadata);\n  registrar.setDomainRoyaltyAmount(id, royaltyAmount);\n  registrar.transferFrom(controller, recoveredBidder, id);\n  if (lockOnCreation) {\n    registrar.lockDomainMetadataForOwner(id);\n  }\n  approvedBids[hashOfSig] = false;\n  emit DomainBidFulfilled(\n    metadata,\n    name,\n    recoveredBidder,\n    id,\n    parentId\n  );\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction max(uint256 x, uint256 y) internal pure returns (uint256) {\n    return x >= y ? x : y. ```\nfunction max(uint256 x, uint256 y) internal pure returns (uint256) {\n    return x >= y ? x : y;\n}\n```\n

Vulnerable code:
```\nfunction max(uint256 x, uint256 y) internal pure returns (uint256) {\n    return x >= y ? x : y;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\nif (newURl != keccak256(bytes(node.url))) {\n\n    // deleting the old entr. ```\nif (newURl != keccak256(bytes(node.url))) {\n\n    // deleting the old entry\n    delete urlIndex[keccak256(bytes(node.url))];\n\n    // make sure the new url is not already in use\n    require(!urlIndex[newURl].used, "url is already in use");\n\n    UrlInformation memory ui;\n    ui.used = tru

Vulnerable code:
```\nif (newURl != keccak256(bytes(node.url))) {\n\n    // deleting the old entry\n    delete urlIndex[keccak256(bytes(node.url))];\n\n    // make sure the new url is not already in use\n    require(!urlIndex[newURl].used, "url is already in use");\n\n    UrlInformation memory ui;\n    ui.used = true;\n    ui.signer = msg.sender;\n    urlIndex[newURl] = ui;\n    node.url = \_url;\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _rebalanceNegativePnlWithSwap(\n        uint256 amount,\n        uint256 amountOut. ```\n    function _rebalanceNegativePnlWithSwap(\n        uint256 amount,\n        uint256 amountOutMinimum,\n        uint160 sqrtPriceLimitX96,\n        uint24 swapPoolFee,\n        address account\n    ) private returns (uint256, uint256) {\n        uint256 normalizedAmount = amount.fromDecimalToD

Vulnerable code:
```\n    function _rebalanceNegativePnlWithSwap(\n        uint256 amount,\n        uint256 amountOutMinimum,\n        uint160 sqrtPriceLimitX96,\n        uint24 swapPoolFee,\n        address account\n    ) private returns (uint256, uint256) {\n        uint256 normalizedAmount = amount.fromDecimalToDecimal(\n            ERC20(quoteToken).decimals(),\n            18\n        );\n        _checkNegativePnl(normalizedAmount);\n        bool isShort = false;\n        bool amountIsInput = true;\n        (uint256 baseAmount, uint256 quoteAmount) = _placePerpOrder(\n            normalizedAmount,\n            isShort,\n            amountIsInput,\n            sqrtPriceLimitX96\n        );\n        vault.withdraw(assetToken, baseAmount);\n        SwapParams memory params = SwapParams({\n            tokenIn: assetToken,\n            tokenOut: quoteToken,\n            amountIn: baseAmount,\n            amountOutMinimum: amountOutMinimum,\n            sqrtPriceLimitX96: sqrtPriceLimitX96, //@audit \n            poolFee: swapPoolFee\n        });\n        uint256 quoteAmountOut = spotSwapper.swapExactInput(params);\n```\n
MEDIUM severity: Vulnerable function: ```\n    function _loadContext(\n        Registration memory registration\n    ) private view return. ```\n    function _loadContext(\n        Registration memory registration\n    ) private view returns (MarketStrategyContext memory marketContext) {\n// rest of code\n        // current position\n      Order memory pendingGlobal = registration.market.pendings(address(this));\n        marketContext.c

Vulnerable code:
```\n    function _loadContext(\n        Registration memory registration\n    ) private view returns (MarketStrategyContext memory marketContext) {\n// rest of code\n        // current position\n      Order memory pendingGlobal = registration.market.pendings(address(this));\n        marketContext.currentPosition = registration.market.position();\n        marketContext.currentPosition.update(pendingGlobal);\n        marketContext.minPosition = marketContext.currentAccountPosition.maker\n            .unsafeSub(marketContext.currentPosition.maker\n                .unsafeSub(marketContext.currentPosition.skew().abs()).min(marketContext.closable));\n        marketContext.maxPosition = marketContext.currentAccountPosition.maker\n            .add(marketContext.riskParameter.makerLimit.unsafeSub(marketContext.currentPosition.maker));\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: MainRewarder.sol\n    function _processRewards(address account, bool claimExtras) interna. ```\nFile: MainRewarder.sol\n    function _processRewards(address account, bool claimExtras) internal {\n        _getReward(account);\n\n        //also get rewards from linked rewards\n        if (claimExtras) {\n            for (uint256 i = 0; i < extraRewards.length; ++i) {\n                IExtra

Vulnerable code:
```\nFile: MainRewarder.sol\n    function _processRewards(address account, bool claimExtras) internal {\n        _getReward(account);\n\n        //also get rewards from linked rewards\n        if (claimExtras) {\n            for (uint256 i = 0; i < extraRewards.length; ++i) {\n                IExtraRewarder(extraRewards[i]).getReward(account);\n            }\n        }\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nFile: LibQuote.sol\n    function closeQuote(Quote storage quote, uint256 filledAmount, uint256 . ```\nFile: LibQuote.sol\n    function closeQuote(Quote storage quote, uint256 filledAmount, uint256 closedPrice) internal {\n        QuoteStorage.Layout storage quoteLayout = QuoteStorage.layout();\n        AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n\n        quote.modif

Vulnerable code:
```\nFile: LibQuote.sol\n    function closeQuote(Quote storage quote, uint256 filledAmount, uint256 closedPrice) internal {\n        QuoteStorage.Layout storage quoteLayout = QuoteStorage.layout();\n        AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n\n        quote.modifyTimestamp = block.timestamp;\n\n        LockedValues memory lockedValues = LockedValues(\n            quote.lockedValues.cva -\n                ((quote.lockedValues.cva * filledAmount) / (LibQuote.quoteOpenAmount(quote))),\n            quote.lockedValues.mm -\n                ((quote.lockedValues.mm * filledAmount) / (LibQuote.quoteOpenAmount(quote))),\n            quote.lockedValues.lf -\n                ((quote.lockedValues.lf * filledAmount) / (LibQuote.quoteOpenAmount(quote)))\n        );\n        accountLayout.lockedBalances[quote.partyA].subQuote(quote).add(lockedValues);\n        accountLayout.partyBLockedBalances[quote.partyB][quote.partyA].subQuote(quote).add(\n            lockedValues\n        );\n        quote.lockedValues = lockedValues;\n\n        (bool hasMadeProfit, uint256 pnl) = LibQuote.getValueOfQuoteForPartyA(\n            closedPrice,\n            filledAmount,\n            quote\n        );\n        if (hasMadeProfit) {\n            accountLayout.allocatedBalances[quote.partyA] += pnl;\n            accountLayout.partyBAllocatedBalances[quote.partyB][quote.partyA] -= pnl;\n        } else {\n            accountLayout.allocatedBalances[quote.partyA] -= pnl;\n            accountLayout.partyBAllocatedBalances[quote.partyB][quote.partyA] += pnl;\n        }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction withdrawDeposit(\n address token\n)\n external\n{\n address owner = \_getContextAccoun. ```\nfunction withdrawDeposit(\n address token\n)\n external\n{\n address owner = \_getContextAccount();\n uint256 lockedUntil = deposits[owner].withdrawalLockedUntil[token];\n\n /\* solhint-disable not-rely-on-time \*/\n\n if (lockedUntil != 0 && lockedUntil <= now) {\n deposits[owner].withdrawalLo

Vulnerable code:
```\nfunction withdrawDeposit(\n address token\n)\n external\n{\n address owner = \_getContextAccount();\n uint256 lockedUntil = deposits[owner].withdrawalLockedUntil[token];\n\n /\* solhint-disable not-rely-on-time \*/\n\n if (lockedUntil != 0 && lockedUntil <= now) {\n deposits[owner].withdrawalLockedUntil[token] = 0;\n\n address depositAccount = deposits[owner].account;\n uint256 depositValue;\n\n if (token == address(0)) {\n depositValue = depositAccount.balance;\n } else {\n depositValue = ERC20Token(token).balanceOf(depositAccount);\n }\n\n \_transferFromDeposit(\n depositAccount,\n owner,\n token,\n depositValue\n );\n\n emit DepositWithdrawn(\n depositAccount,\n owner,\n token,\n depositValue\n );\n } else {\n \_deployDepositAccount(owner);\n\n lockedUntil = now.add(depositWithdrawalLockPeriod);\n\n deposits[owner].withdrawalLockedUntil[token] = lockedUntil;\n\n emit DepositWithdrawalRequested(\n deposits[owner].account,\n owner,\n token,\n lockedUntil\n );\n }\n /\* solhint-enable not-rely-on-time \*/\n}\n```\n
MEDIUM severity: Vulnerable function: ```\n## Balancer.sol\n\n    router.swap{value: msg.value}(\n        _dstChainId,. ```\n## Balancer.sol\n\n    router.swap{value: msg.value}(\n        _dstChainId,\n        _srcPoolId,\n        _dstPoolId,\n        payable(this),\n        _amount,\n        _computeMinAmount(_amount, _slippage),\n        IStargateRouterBase.lzTxObj({dstGasForCall: 0, dstNativeAmount: 0, dstNativeAd

Vulnerable code:
```\n## Balancer.sol\n\n    router.swap{value: msg.value}(\n        _dstChainId,\n        _srcPoolId,\n        _dstPoolId,\n        payable(this),\n        _amount,\n        _computeMinAmount(_amount, _slippage),\n        IStargateRouterBase.lzTxObj({dstGasForCall: 0, dstNativeAmount: 0, dstNativeAddr: "0x0"}),\n        _dst,\n    "0x" => this is the payload that is being sent with the transaction\n    );\n```\n
HIGH severity: Vulnerable function: ```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, ena. ```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, enabledModuleCount);\n_existingModulesHash = keccak256(abi.encode(modules));\n```\n

Vulnerable code:
```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, enabledModuleCount);\n_existingModulesHash = keccak256(abi.encode(modules));\n```\n
HIGH severity: Vulnerable function: ```\n    function getProtocolOwnedLiquidityOhm() external view override returns (uint256) {\n\n     . ```\n    function getProtocolOwnedLiquidityOhm() external view override returns (uint256) {\n\n        uint256 len = bunniTokens.length;\n        uint256 total;\n        for (uint256 i; i < len; ) {\n            TokenData storage tokenData = bunniTokens[i];\n            BunniLens lens = tokenData.le

Vulnerable code:
```\n    function getProtocolOwnedLiquidityOhm() external view override returns (uint256) {\n\n        uint256 len = bunniTokens.length;\n        uint256 total;\n        for (uint256 i; i < len; ) {\n            TokenData storage tokenData = bunniTokens[i];\n            BunniLens lens = tokenData.lens;\n            BunniKey memory key = _getBunniKey(tokenData.token);\n\n        // rest of code// rest of code// rest of code\n\n            total += _getOhmReserves(key, lens);\n            unchecked {\n                ++i;\n            }\n        }\n\n\n        return total;\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction beginGlobalSettlement(uint256 price) public onlyWhitelistAdmin {\n    require(status !. ```\nfunction beginGlobalSettlement(uint256 price) public onlyWhitelistAdmin {\n    require(status != LibTypes.Status.SETTLED, "already settled");\n    settlementPrice = price;\n    status = LibTypes.Status.SETTLING;\n    emit BeginGlobalSettlement(price);\n}\n```\n

Vulnerable code:
```\nfunction beginGlobalSettlement(uint256 price) public onlyWhitelistAdmin {\n    require(status != LibTypes.Status.SETTLED, "already settled");\n    settlementPrice = price;\n    status = LibTypes.Status.SETTLING;\n    emit BeginGlobalSettlement(price);\n}\n```\n
HIGH severity: Vulnerable function: ```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint2. ```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint256 \_proofType,\n bytes32 \_parentStateRootHash\n)\n```\n

Vulnerable code:
```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint256 \_proofType,\n bytes32 \_parentStateRootHash\n)\n```\n
MEDIUM severity: Vulnerable function: ```\nbalance = elapsedTime_ * (RATE_DECIMALS_MULTIPLIER * tokenAmount_ / duratio. ```\nbalance = elapsedTime_ * (RATE_DECIMALS_MULTIPLIER * tokenAmount_ / duration) / RATE_DECIMALS_MULTIPLIER\n```\n

Vulnerable code:
```\nbalance = elapsedTime_ * (RATE_DECIMALS_MULTIPLIER * tokenAmount_ / duration) / RATE_DECIMALS_MULTIPLIER\n```\n
HIGH severity: Vulnerable function: ```\n  function initializeDistributionRecord(\n    uint32 _domain, // the domain of the beneficiary\. ```\n  function initializeDistributionRecord(\n    uint32 _domain, // the domain of the beneficiary\n    address _beneficiary, // the address that will receive tokens\n    uint256 _amount, // the total claimable by this beneficiary\n    bytes32[] calldata merkleProof\n  ) external validMerkleProof(_

Vulnerable code:
```\n  function initializeDistributionRecord(\n    uint32 _domain, // the domain of the beneficiary\n    address _beneficiary, // the address that will receive tokens\n    uint256 _amount, // the total claimable by this beneficiary\n    bytes32[] calldata merkleProof\n  ) external validMerkleProof(_getLeaf(_beneficiary, _amount, _domain), merkleProof) {\n    _initializeDistributionRecord(_beneficiary, _amount);\n  }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction convertFundsFromInput(address \_from, address \_to, uint256 \_inputAmount, uint256 \_m. ```\nfunction convertFundsFromInput(address \_from, address \_to, uint256 \_inputAmount, uint256 \_minOutputAmount) external override returns (uint256 \_outputAmount)\n{\n address \_sender = msg.sender;\n Transfers.\_pullFunds(\_from, \_sender, \_inputAmount);\n \_inputAmount = Math.\_min(\_inputAmo

Vulnerable code:
```\nfunction convertFundsFromInput(address \_from, address \_to, uint256 \_inputAmount, uint256 \_minOutputAmount) external override returns (uint256 \_outputAmount)\n{\n address \_sender = msg.sender;\n Transfers.\_pullFunds(\_from, \_sender, \_inputAmount);\n \_inputAmount = Math.\_min(\_inputAmount, Transfers.\_getBalance(\_from)); // deals with potential transfer tax\n \_outputAmount = UniswapV2ExchangeAbstraction.\_convertFundsFromInput(router, \_from, \_to, \_inputAmount, \_minOutputAmount);\n \_outputAmount = Math.\_min(\_outputAmount, Transfers.\_getBalance(\_to)); // deals with potential transfer tax\n Transfers.\_pushFunds(\_to, \_sender, \_outputAmount);\n return \_outputAmount;\n}\n```\n
HIGH severity: Vulnerable function: ```\n    uint extraRewardsCount = IAuraRewarder(crvRewarder)\n        .extraRewa. ```\n    uint extraRewardsCount = IAuraRewarder(crvRewarder)\n        .extraRewardsLength(); <- @audit-issue rewardTokenCount pulled fresh\n    tokens = new address[](extraRewardsCount + 1);\n    rewards = new uint256[](extraRewardsCount + 1);\n\n    tokens[0] = IAuraRewarder(crvRewarder).rewardToke

Vulnerable code:
```\n    uint extraRewardsCount = IAuraRewarder(crvRewarder)\n        .extraRewardsLength(); <- @audit-issue rewardTokenCount pulled fresh\n    tokens = new address[](extraRewardsCount + 1);\n    rewards = new uint256[](extraRewardsCount + 1);\n\n    tokens[0] = IAuraRewarder(crvRewarder).rewardToken();\n    rewards[0] = _getPendingReward(\n        stCrvPerShare,\n        crvRewarder,\n        amount,\n        lpDecimals\n    );\n\n    for (uint i = 0; i < extraRewardsCount; i++) {\n        address rewarder = IAuraRewarder(crvRewarder).extraRewards(i);\n\n        @audit-issue attempts to pull from array which will be too small if tokens are added\n        uint256 stRewardPerShare = accExtPerShare[tokenId][i];\n        tokens[i + 1] = IAuraRewarder(rewarder).rewardToken();\n        rewards[i + 1] = _getPendingReward(\n            stRewardPerShare,\n            rewarder,\n            amount,\n            lpDecimals\n        );\n    }\n```\n
MEDIUM severity: Vulnerable function: ```\nfunction \_delayExecution(bytes \_evmCallScript) internal returns (uint256) {\n    uint256 dela. ```\nfunction \_delayExecution(bytes \_evmCallScript) internal returns (uint256) {\n    uint256 delayedScriptIndex = delayedScriptsNewIndex;\n    delayedScriptsNewIndex++;\n\n    delayedScripts[delayedScriptIndex] = DelayedScript(getTimestamp64().add(executionDelay), 0, \_evmCallScript);\n\n    emit

Vulnerable code:
```\nfunction \_delayExecution(bytes \_evmCallScript) internal returns (uint256) {\n    uint256 delayedScriptIndex = delayedScriptsNewIndex;\n    delayedScriptsNewIndex++;\n\n    delayedScripts[delayedScriptIndex] = DelayedScript(getTimestamp64().add(executionDelay), 0, \_evmCallScript);\n\n    emit DelayedScriptStored(delayedScriptIndex);\n\n    return delayedScriptIndex;\n}\n```\n
HIGH severity: Vulnerable function: ```\nenum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_O. ```\nenum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\n```\n

Vulnerable code:
```\nenum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\n```\n
HIGH severity: Vulnerable function: ```\naveragePrice = existing._initAcc * 1e18 / INIT_SAMPLE_COUNT;\naveragePrice . ```\naveragePrice = existing._initAcc * 1e18 / INIT_SAMPLE_COUNT;\naveragePrice = 36e18 * 1e18 / 18\naveragePrice = 36e36 / 18\naveragePrice = 2e36\n```\n

Vulnerable code:
```\naveragePrice = existing._initAcc * 1e18 / INIT_SAMPLE_COUNT;\naveragePrice = 36e18 * 1e18 / 18\naveragePrice = 36e36 / 18\naveragePrice = 2e36\n```\n