function
stringlengths
12
63.3k
severity
stringclasses
4 values
```\nif (safe.getThreshold() != _getCorrectThreshold()) {\n revert SignersCannotChangeThreshold();\n}\n\nfunction _getCorrectThreshold() internal view returns (uint256 _threshold) {\n uint256 count = _countValidSigners(safe.getOwners());\n uint256 min = minThreshold;\n uint256 max = targetThreshold;\n if...
high
```\nfunction _estimateWithdrawalLp(\n uint256 reserve0,\n uint256 reserve1,\n uint256 _totalSupply,\n uint256 amount0,\n uint256 amount1\n) private pure returns (uint256 shareAmount) {\n shareAmount =\n ((amount0 * _totalSupply) / reserve0 + (amount1 * _totalSupply) / reserve1) /\n 2;\n...
high
```\nfunction _validateAccountAndPaymasterValidationData(uint256 opIndex, uint256 validationData, uint256 paymasterValidationData, address expectedAggregator) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(validationData);\n if (expectedAggregator != aggregator) {\n revert...
none
```\n function JOJOFlashLoan(\n address asset,\n uint256 amount,\n address to,\n bytes calldata param\n ) external {\n (address approveTarget, address swapTarget, uint256 minReceive, bytes memory data) = abi\n .decode(param, (address, address, uint256, bytes));\n ...
medium
```\nuint256 oldShare = pos.debtShareOf[debtToken];\n(uint256 amountPaid, uint256 share) = repayInternal(\n positionId,\n debtToken,\n amountCall\n);\n\nuint256 liqSize = (pos.collateralSize * share) / oldShare;\nuint256 uTokenSize = (pos.underlyingAmount * share) / oldShare;\nuint256 uVaultShare = (pos.underl...
high
```\n return \n (votes * cpMultipliers.votes / PERCENT) + \n (proposalsCreated * cpMultipliers.proposalsCreated / PERCENT) + \n (proposalsPassed * cpMultipliers.proposalsPassed / PERCENT);\n```\n
medium
```\nfunction flashRebalance(\n DestinationInfo storage destInfoOut,\n DestinationInfo storage destInfoIn,\n IERC3156FlashBorrower receiver,\n IStrategy.RebalanceParams memory params,\n FlashRebalanceParams memory flashParams,\n bytes calldata data\n) external returns (uint256 idle, uint256 debt) {\n ...
medium
```\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n}\n```\n
none
```\n// rest of code\n if (token == address(measure) && from != address(0)) { //add && from != to\n drip();\n// rest of code\n```\n
low
```\nfunction updatedevelopmentWallet(address newWallet) external onlyOwner {\n emit developmentWalletUpdated(newWallet, developmentWallet);\n developmentWallet = newWallet;\n}\n```\n
none
```\nfunction functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n}\n```\n
none
```\n if (balance >= borrows) {\n collateral += min(balance - borrows, info.maxCollateralAmount).mul(info.collateralWeight).mul(price);\n } else {\n debt += (borrows - balance).mul(info.debtWeight).mul(price);\n }\n```\n
medium
```\nrequire(\n currentAllowance >= subtractedValue,\n "Silo: decreased allowance below zero"\n);\n```\n
low
```\nfunction incentivize(\n address sender,\n address receiver, \n address operator,\n uint amountIn\n) external override onlyFei {\n updateOracle();\n\n if (isPair(sender)) {\n incentivizeBuy(receiver, amountIn);\n }\n\n if (isPair(receiver)) {\n require(isSellAllowlisted(sender) || isSellAllowlisted(opera...
high
```\nfunction getPayoutToken() public view returns (address) {\n return dividendTracker.getPayoutToken();\n}\n```\n
none
```\n function _extractTokens(address _from, address _token, uint256 _amount) internal returns (uint256) {\n uint256 balanceBefore = IERC20(_token).balanceOf(address(this));\n // IERC20(_token).safeTransferFrom(_from, address(this), _amount);\n pearlmit.transferFromERC20(_from, address(this), ad...
medium
```\nfunction safeApprove(address \_token, address \_spender, uint256 \_value) public onlyOwner {\n\n (bool success, bytes memory returndata) = \_token.call(abi.encodeWithSignature("approve(address,uint256)", \_spender, \_value));\n\n require(success, "SafeERC20: low-level call failed");\n\n}\n```\n
high
```\nfunction safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n}\n```\n
none
```\n{\n // 2. Swap rewards tokens to debt token\n uint256 rewards = _doCutRewardsFee(CRV);\n _ensureApprove(CRV, address(swapRouter), rewards);\n swapRouter.swapExactTokensForTokens(\n rewards,\n 0,\n swapPath,\n address(this),\n type(uint256).max\n );\n}\n```\n
high
```\n /// @notice Roll into the next Series if there isn't an active series and the cooldown period has elapsed.\n function roll() external {\n if (maturity != MATURITY_NOT_SET) revert RollWindowNotOpen();\n\n if (lastSettle == 0) {\n // If this is the first roll, lock some shares in by minting the...
medium
```\n function _depositAsset(uint256 amount) private {\n netAssetDeposits += amount;\n\n\n IERC20(assetToken).approve(address(vault), amount);\n vault.deposit(assetToken, amount);\n }\n```\n
medium
```\nfunction \_beforeTokenTransfer(address from, address to, uint256 amount) internal override {\n uint256 balanceFrom = (from != address(0)) ? balanceOf(from) : 0;\n uint256 balanceTo = (from != address(0)) ? balanceOf(to) : 0;\n uint256 newTotalSupply = totalSupply()\n .add(from == address(0) ? amoun...
medium
```\nFile: D3Trading.sol\n roState.toTokenMMInfo.cumulativeBid =\n allFlag (toTokenIndex) & 1 == 0 ? 0 : tokenCumMap[toToken].cumulativeAsk;\n```\n
medium
```\n function _payment(\n uint256 collateralId,\n uint8 position,\n uint256 paymentAmount,\n address payer\n ) internal returns (uint256) {\n if (paymentAmount == uint256(0)) {\n return uint256(0);\n }\n\n\n uint256 lienId = liens[collateralId][position];\n Lien storage lien = lienData[l...
medium
```\nfunction beneficiaryWithdrawable(\n address recipient,\n address sender,\n uint256 agentID,\n uint256 proposedAmount\n) external returns (\n uint256 amount\n) {\n AgentBeneficiary memory beneficiary = \_agentBeneficiaries[agentID];\n address benneficiaryAddress = beneficiary.active.beneficiary;\n // If the sender ...
high
```\nfunction _distributeERC20(\n address split,\n ERC20 token,\n address[] memory accounts,\n uint32[] memory percentAllocations,\n uint32 distributorFee,\n address distributorAddress\n) internal {\n uint256 amountToSplit;\n uint256 mainBalance = erc20Balances[token][split];\n uint256 proxyBalance = token.bal...
none
```\n require(\_dripRatePerSecond > 0, "TokenFaucet/dripRate-gt-zero");\n asset = \_asset;\n measure = \_measure;\n setDripRatePerSecond(\_dripRatePerSecond);\n```\n
low
```\n /// @notice Minimum voting period\n uint32 public constant MIN_VOTING_PERIOD = 5760; // About 24 hours\n\n /// @notice Maximum voting period\n uint32 public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks\n\n /// @notice Minimum voting delay\n uint32 public constant MIN_VOTING_DELAY = 1;\n\n /// @noti...
medium
```\nIPeUSD public EUSD;\n```\n
low
```\n function priceFromAddress(address tokenAddress) public view returns(uint256) {\n if(Utils.\_isETH(address(globalConfig), tokenAddress)) {\n return 1e18;\n }\n return uint256(globalConfig.chainLink().getLatestAnswer(tokenAddress));\n }\n```\n
high
```\nfunction updatePixelMintMerkleRoot(bytes32 hash)\n external\n onlyOwner\n returns (bool)\n{\n merkleRootOfPixelMintWhitelistAddresses = hash;\n emit UpdatedMerkleRootOfPixelMint(hash, msg.sender);\n\n return true;\n}\n```\n
none
```\nfunction updateSwapTokensAtAmount(uint256 newAmount)\n external\n onlyOwner\n returns (bool)\n{\n require(\n newAmount >= (totalSupply() * 1) / 100000,\n "Swap amount cannot be lower than 0.001% total supply."\n );\n require(\n newAmount <= (totalSupply() * 5) / 1000,\n ...
none
```\nfunction tokenFromReflection(uint256 rAmount) public view returns(uint256) {\n require(rAmount <= _rTotal, "Amount must be less than total reflections");\n uint256 currentRate = _getRate();\n return rAmount / currentRate;\n}\n```\n
none
```\n/// @notice Implements bitcoin's hash256 (double sha2)\n/// @dev abi.encodePacked changes the return to bytes instead of bytes32\n/// @param \_b The pre-image\n/// @return The digest\nfunction hash256(bytes memory \_b) internal pure returns (bytes32) {\n return abi.encodePacked(sha256(abi.encodePacked(sha256(\_...
low
```\nresult := mload(memPtr)\n```\n
high
```\nuint totalGenesisTribe = tribeBalance() - totalCommittedTribe;\n```\n
medium
```\nFile: TellerV2.sol\n 854 function calculateNextDueDate(uint256 _bidId)\n 855 public\n 856 view\n 857 returns (uint32 dueDate_)\n 858 {\n 859 Bid storage bid = bids[_bidId];\n 860 if (bids[_bidId].state != BidState.ACCEPTED) return dueDate_;\n 861\n 862 uint32...
medium
```\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 \...
high
```\nfor (uint i = 0; i < contractKeys.length; i++) {\n // Delete the key from the array + mapping if it is present\n if (contractKeys[i] == name) {\n delete registry[contractKeys[i]];\n contractKeys[i] = contractKeys[contractKeys.length - 1];\n delete contractKeys[contractKeys.length - 1];\n...
low
```\nfunction functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n}\n```\n
none
```\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
```\nfunction sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n}\n```\n
none
```\nfunction _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n}\n```\n
none
```\n // Transfer token to Aura protocol for boosted staking\n stakingContext.auraBooster.deposit(stakingContext.auraPoolId, bptMinted, true); // stake = true\n```\n
medium
```\nfunction setTheMaxWallet(uint256 newNum) external onlyOwner {\n require(newNum >= 5, "Cannot set maxWallet lower than 0.5%");\n maxWallet = (newNum * totalSupply()) / 1000;\n emit MaxWalletUpdated(maxWallet);\n}\n```\n
none
```\nrolloverQueue[index].assets = _assets;\n```\n
high
```\nfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n}\n```\n
none
```\nfunction allowance(address owner, address spender) public view override returns (uint256) {\n return _allowances[owner][spender];\n}\n```\n
none
```\nreceive() external payable {}\n```\n
none
```\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(categor...
high
```\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, decollater...
high
```\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, b...
medium
```\nbool[6] flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]\n```\n
low
```\nfunction feed(uint256 intoReserves, uint256 intoGrandPrize)\n external\n payable\n onlyOwner\n{\n require(\n msg.value > 0 && intoReserves.add(intoGrandPrize) == msg.value,\n "DCBW721: Balance-Value Mismatch"\n );\n _updateGrandPrizePool(_grandPrizePool.add(intoGrandPrize));\n _u...
none
```\n function burnNFT(uint256 tokenId) internal {\n //@dev No need to check downcast tokenId because it is handled in function that calls burnNFT\n AppStorage storage s = appStorage();\n STypes.NFT storage nft = s.nftMapping[tokenId];\n if (nft.owner == address(0)) revert Errors.NotMinted(...
low
```\nfunction max(uint256 x, uint256 y) internal pure returns (uint256) {\n return x >= y ? x : y;\n}\n```\n
high
```\nconstructor(address \_depositFactory)\n ERC721Metadata("tBTC Deopsit Token", "TDT")\n DepositFactoryAuthority(\_depositFactory)\npublic {\n // solium-disable-previous-line no-empty-blocks\n}\n```\n
low
```\n function _onlyCalmPeriods() private view {\n int24 tick = currentTick();\n int56 twapTick = twap();\n\n if(\n twapTick - maxTickDeviationNegative > tick ||\n twapTick + maxTickDeviationPositive < tick) revert NotCalm();\n }\n```\n
low
```\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 = ...
medium
```\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 ...
medium
```\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 = reg...
medium
```\nfunction DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n}\n```\n
none
```\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(extraReward...
medium
```\n/\*\*\n \* @notice Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.\n \* @notice In contrast to `underlyingToSharesView`, this function \*\*may\*\* make state modifications\n \* @param amountUnderlying is the amount of `underlyingToken` to calculate its conversion...
low
```\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.t...
medium
```\nfunction \_getTokensIn(uint256 spentTokenBalance) internal view returns(uint256[] memory amountsIn) {\n amountsIn = new uint256[](2);\n\n uint256 receivedTokenBalance = readOracle().mul(spentTokenBalance).mul(ONE\_PERCENT).div(NINETY\_NINE\_PERCENT).asUint256();\n\n if (address(assets[0]) == tokenSpent) {...
low
```\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...
medium
```\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 ...
medium
```\nfunction isExcludedFromRewards(address wallet) external view returns (bool) {\n return isAddressExcluded[wallet];\n}\n```\n
none
```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, enabledModuleCount);\n_existingModulesHash = keccak256(abi.encode(modules));\n```\n
high
```\nfunction \_undelegate(\n address delegator,\n address delegatee,\n uint256 amount\n) internal virtual {\n uint256 newDelegates = \_delegatesVotesCount[delegator][delegatee] - amount;\n\n if (newDelegates == 0) {\n assert(\_delegates[delegator].remove(delegatee)); // Should never fail.\n }\...
low
```\n// NOTE: amt after trimming must fit into uint64 (that's the point of\n// trimming, as Solana only supports uint64 for token amts)\nif (amountScaled > type(uint64).max) {\n revert AmountTooLarge(amt);\n}\n```\n
medium
```\nfunction includeInRewards(address wallet) external onlyOwner {\n require(isAddressExcluded[wallet], "Address is not excluded from rewards");\n for (uint i = 0; i < excludedFromRewards.length; i++) {\n if (excludedFromRewards[i] == wallet) {\n isAddressExcluded[wallet] = false;\n ...
none
```\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 Bun...
high
```\nfunction addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n // approve token transfer to cover all possible scenarios\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n uint256 minToken = (tokenAmount * _slipPercent) / 100;\n uint256 minEth = (ethAmount * _slipPercent) ...
none
```\nfunction doTransfer(\n address sender,\n address recipient,\n uint amount\n) internal returns (bool) {\n if (!isAuthorized[sender] && !isAuthorized[recipient]) {\n require(launched, "VoxNET: transfers not allowed yet");\n }\n\n require(balanceOf[sender] >= amount, "VoxNET: insufficient bal...
none
```\nfunction functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, "Address: low-level call failed");\n}\n```\n
none
```\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
medium
```\nfunction updateTokenPriceIfApplicable() internal {\n if (tokenPriceTimestamp != 0) {\n uint timeElapsed = block.timestamp - tokenPriceTimestamp;\n\n if (timeElapsed > priceUpdateTimeThreshold) {\n uint tokenPriceCumulative = getCumulativeTokenPrice();\n\n if (tokenPriceCumula...
none
```\nrequire(msg.value == value, "GenesisGroup: value mismatch");\n```\n
low
```\nfunction isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(acco...
none
```\nfunction _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tWallet,\n uint256 tDonation\n ) = _getTValues(tAmount);\n (uint256 rAmount, uint256 ...
none
```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint256 \_proofType,\n bytes32 \_parentStateRootHash\n)\n```\n
high
```\nfunction set(Map storage map, address key, uint256 val) internal {\n if (map.inserted[key]) {\n map.values[key] = val;\n } else {\n map.inserted[key] = true;\n map.values[key] = val;\n map.indexOf[key] = map.keys.length;\n map.keys.push(key);\n }\n}\n```\n
none
```\nfunction claim() external {\n dividendTracker.processAccount(payable(msg.sender), false);\n}\n```\n
none
```\nbalance = elapsedTime_ * (RATE_DECIMALS_MULTIPLIER * tokenAmount_ / duration) / RATE_DECIMALS_MULTIPLIER\n```\n
medium
```\nfunction setFeeCollector(address _feeCollector) external onlyRole(TOKEN_MANAGER) {\n feeCollector = _feeCollector;\n}\n```\n
none
```\ngtc = gtc\_;\n```\n
low
```\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...
high
```\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.\_get...
medium
```\nfunction pauseContract() external onlyOwner returns (bool) {\n _pause();\n return true;\n}\n```\n
none
```\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]...
high
```\nfunction toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return "0";\n }\n uin...
none
```\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...
medium
```\nuint256[50] private \_\_gap;\n```\n
medium
```\nenum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\n```\n
high
```\nfunction _grantRole(bytes32 role, address account) private {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n}\n```\n
none
```\n/// @notice Ensures that the caller is the admin\nmodifier onlyActiveOperator(uint256 \_operatorIndex) {\n \_onlyActiveOperator(\_operatorIndex);\n \_;\n}\n```\n
low
```\naveragePrice = existing._initAcc * 1e18 / INIT_SAMPLE_COUNT;\naveragePrice = 36e18 * 1e18 / 18\naveragePrice = 36e36 / 18\naveragePrice = 2e36\n```\n
high
```\nFile: BondBaseSDA.sol\n function payoutFor(\n uint256 amount_,\n uint256 id_,\n address referrer_\n ) public view override returns (uint256) {\n // Calculate the payout for the given amount of tokens\n uint256 fee = amount_.mulDiv(_teller.getFee(referrer_), 1e5);\n u...
medium