function
stringlengths
12
63.3k
severity
stringclasses
4 values
```\nfunction includeInFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = false;\n}\n```\n
none
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n
none
```\nFile: FraxEtherRedemptionQueue.sol\n /// @notice Sets the fee for redeeming\n /// @param _newFee New redemption fee given in percentage terms, using 1e6 precision\n function setRedemptionFee(uint64 _newFee) external {\n _requireSenderIsTimelock();\n if (_newFee > FEE_PRECISION) revert Exceed...
medium
```\nfunction transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n{\n _transfer(_msgSender(), recipient, amount);\n return true;\n}\n```\n
none
```\nmodifier onlyTest() {\n```\n
low
```\nfunction _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), "ERC20: approve from the zero address");\n require(spender != address(0), "ERC20: approve to the zero address");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n}...
none
```\ntry IERC721(order.collection).safeTransferFrom(bear, bull, tokenId) {}\ncatch (bytes memory) {\n // Transfer NFT to BvbProtocol\n IERC721(order.collection).safeTransferFrom(bear, address(this), tokenId);\n // Store that the bull has to retrieve it\n withdrawableCollectionTokenId[order.collection][token...
medium
```\nFile: StableMath.sol\n function _calculateInvariant(\n uint256 amplificationParameter,\n uint256[] memory balances,\n bool roundUp\n ) internal pure returns (uint256) {\n /**********************************************************************************************\n // in...
high
```\n uint256 validSigCount = countValidSignatures(txHash, signatures, signatures.length / 65);\n // revert if there aren't enough valid signatures\n if (validSigCount < safe.getThreshold()) {\n revert InvalidSigners();\n }\n```\n
high
```\ndiff --git a/test/spell/ichivault.spell.test.ts b/test/spell/ichivault.spell.test.ts\nindex 258d653..551a6eb 100644\n--- a/test/spell/ichivault.spell.test.ts\n// Add the line below\n// Add the line below\n// Add the line below\n b/test/spell/ichivault.spell.test.ts\n@@ -163,6 // Add the line below\n163,26 @@ descr...
medium
```\nif (ownerToRollOverQueueIndex[_receiver] != 0) {\n // if so, update the queue\n uint256 index = getRolloverIndex(_receiver);\n rolloverQueue[index].assets = _assets;\n rolloverQueue[index].epochId = _epochId;\n```\n
high
```\nfunction _getRate() private view returns(uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply / tSupply;\n}\n```\n
none
```\nFile: SingleSidedLPVaultBase.sol\n /// @notice Allows the emergency exit role to trigger an emergency exit on the vault.\n /// In this situation, the `claimToExit` is withdrawn proportionally to the underlying\n /// tokens and held on the vault. The vault is locked so that no entries, exits or\n /// va...
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
```\nFile: contracts\OperatorTokenomics\StreamrConfig.sol\n /**\n * Minimum amount to pay reviewers+flagger\n * That is: minimumStakeWei >= (flaggerRewardWei + flagReviewerCount * flagReviewerRewardWei) / slashingFraction\n */\n function minimumStakeWei() public view returns (uint) {\n return (...
high
```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;...
none
```\nFile: AuraSpell.sol\n function openPositionFarm(\n OpenPosParam calldata param,\n uint256 minimumBPT\n )\n// rest of code\n {\n// rest of code\n /// 3. Add liquidity to the Balancer pool and receive BPT in return.\n {\n// rest of code\n if (poolAmountOut != 0) {\n ...
medium
```\nfunction _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n) private {\n if (takeFee) {\n removeAllFee();\n if (sender == uniswapV2Pair) {\n setBuy();\n }\n if (recipient == uniswapV2Pair) {\n setSell();\n ...
none
```\nuint256 activeAgents = gameInfo.activeAgents;\n if (activeAgents == 1) {\n revert GameOver();\n }\n```\n
high
```\nfunction setAutomatedMarketMakerPair(\n address pair,\n bool value\n) public onlyOwner {\n require(\n pair != dexPair,\n "The pair cannot be removed from automatedMarketMakerPairs"\n );\n\n _setAutomatedMarketMakerPair(pair, value);\n}\n```\n
none
```\nfunction _queueLockUpdate(\n address _owner,\n uint256 _lockId,\n uint256 _amount,\n uint64 _lockingDuration\n) internal onlyLockOwner(_lockId, _owner) {\n Lock memory lock = _getQueuedLockState(_lockId);\n LockUpdate memory lockUpdate = LockUpdate(updateBatchIndex, _updateLock(lock, _amount, _lo...
medium
```\nuint256 _maturity = utils.getFutureMaturity(targetDuration);\n\nfunction getFutureMaturity(uint256 monthsForward) public view returns (uint256) {\n (uint256 year, uint256 month, ) = DateTime.timestampToDate(DateTime.addMonths(block.timestamp, monthsForward));\n return DateTime.timestampFromDateTime(year, mon...
high
```\n function _liquidateUser(\n address user,\n uint256 maxBorrowPart,\n IMarketLiquidatorReceiver _liquidatorReceiver,\n bytes calldata _liquidatorReceiverData,\n uint256 _exchangeRate,\n uint256 minLiquidationBonus\n ) private {\n uint256 callerReward = _getCall...
high
```\n int256 rawCollateralPrice = strategy.collateralPriceOracle.latestAnswer();\n rebalanceInfo.collateralPrice = rawCollateralPrice.toUint256().mul(10 ** strategy.collateralDecimalAdjustment);\n int256 rawBorrowPrice = strategy.borrowPriceOracle.latestAnswer();\n rebalanceInfo.borrowPrice = rawBo...
medium
```\nfunction taxValues()\n external\n view\n returns (\n uint256 _buyTaxTotal,\n uint256 _buyMarketingTax,\n uint256 _buyProjectTax,\n uint256 _sellTaxTotal,\n uint256 _sellMarketingTax,\n uint256 _sellProjectTax\n )\n{\n _buyTaxTotal = buyTaxTotal;\n _buyMar...
none
```\nIPlatformIntegration(\_integration).checkBalance(\_bAsset);\n```\n
low
```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, enabledModuleCount);\n_existingModulesHash = keccak256(abi.encode(modules));\n```\n
high
```\nfunction toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n ...
none
```\nThe feeMultiplier enables the admin to subsidize or upcharge for the automation service.\n/**\n⦁ @notice feeMultiplier represents the total fee to be charged on the transaction\n⦁ Is set to 100% by default\n⦁ @dev In case feeMultiplier is less than BASE_BPS, fees charged will be less than 100%,\n⦁ subsidizing the ...
medium
```\nfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, "SafeMath: addition overflow");\n\n return c;\n}\n```\n
none
```\nSLeverageSwapData memory swapData = abi.decode(data, (SLeverageSwapData));\nuint256 daiAmount =\n _swapAndTransferToSender(false, assetAddress, daiAddress, assetAmountIn, swapData.swapperData);\n```\n
medium
```\nfunction updateMaxTransaction(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 1) / 1000) / 1e18,\n "Cannot set maxTransaction lower than 0.1%"\n );\n maxTransaction = newNum * (10**18);\n}\n```\n
none
```\nfunction eject(\n uint256 shares,\n address receiver,\n address owner\n) public returns (uint256 assets, uint256 excessBal, bool isExcessPTs) {\n\n // rest of code\n\n //@audit call of interest\n (excessBal, isExcessPTs) = _exitAndCombine(shares);\n\n _burn(owner, shares); // Burn after percen...
high
```\ntry IDepositCallbackReceiver(deposit.callbackContract()).afterDepositExecution{ gas: deposit.callbackGasLimit() }(key, deposit) {\n } catch (bytes memory reasonBytes) {\n (string memory reason, /* bool hasRevertMessage */) = ErrorUtils.getRevertMessage(reasonBytes);\n emit AfterDeposit...
high
```\nfunction _payout(DrawData memory current) private {\n require(current.winner != address(0), "DCBW721: Address cannot be 0");\n require(current.prizePoolWon > 0, "DCBW721: Prize pool is empty");\n\n /// @notice updating reserve pool & grand prize pool\n if (current.isGrandPrize == 1) {\n _updateG...
none
```\nfunction getSavedOrSpotOraclePrice(address asset) internal view returns (uint256) {\n if (LibOrders.getOffsetTime() - getTime(asset) < 15 minutes) {\n return getPrice(asset);\n } else {\n return getOraclePrice(asset);\n }\n}\n```\n
medium
```\nfunction mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n}\n```\n
none
```\n/// @dev Refunds up to `msg.value` leftover ETH at the end of the call.\nmodifier refundsAttachedEth() {\n \_;\n uint256 remainingBalance =\n LibSafeMathV06.min256(msg.value, address(this).balance);\n if (remainingBalance > 0) {\n msg.sender.transfer(remainingBalance);\n }\n}\n```\n
high
```\nfunction removeToken(\n bytes4 tokenSource, \n bytes32 tokenSourceAddress, \n address newAuthority) external onlyRole(TOKEN_MANAGER) {\n require(newAuthority != address(0), "Bridge: zero address authority");\n address tokenAddress = tokenSourceMap[tokenSource][tokenSourceAddress];\n require(token...
none
```\n/// @notice we poll the Keep contract to retrieve our pubkey\n/// @dev We store the pubkey as 2 bytestrings, X and Y.\n/// @param \_d deposit storage pointer\n/// @return True if successful, otherwise revert\nfunction retrieveSignerPubkey(DepositUtils.Deposit storage \_d) public {\n require(\_d.inAwaitingSigner...
high
```\nconstructor(IERC20 xABR_, uint256 baseFeeRateBP_, uint256 feeMultiplier_) {\n xABR = xABR_;\n baseFeeRateBP = baseFeeRateBP_;\n feeMultiplier = feeMultiplier_;\n}\n```\n
none
```\nfunction tryRecover(\n bytes32 hash,\n bytes memory signature\n) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currentl...
none
```\nfunction manualsend() external {\n require(_msgSender() == _feeAddrWallet1);\n uint256 contractETHBalance = address(this).balance;\n sendETHToFee(contractETHBalance);\n}\n```\n
none
```\nfunction getAccountAtIndex(uint256 index) public view returns (address, int256, int256, uint256,\n uint256, uint256) {\n if (index >= tokenHoldersMap.size()) {\n return (0x0000000000000000000000000000000000000000, -1, -1, 0, 0, 0);\n }\n\n ...
none
```\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
```\n} else {\n // Deduct the external swap fee\n uint256 fee = (bridgedAmount * dstExternalFeeRate) / FEE_BASE;\n bridgedAmount -= fee; // @@audit: fee should not be applied to internal swap \n\n TransferHelper.safeApprove(bridgedToken, address(wooRouter), bridgedAmount);\n if (dst1inch.swapRouter != a...
medium
```\nfunction sendPaymentForReimbursement() external payable returns (bool) {\n if (msg.sender != defaultPlatformAddress) revert UnAuthorizedRequest();\n\n if (msg.value == 0) revert UnAuthorizedRequest();\n\n emit PaymentSentInContractForReimbursements(msg.value, msg.sender);\n return true;\n}\n```\n
none
```\nif (unstakeAmount > totalPendingUnstake) {\n pool.receiveWithoutActivation{value: unstakeAmount - totalPendingUnstake}();\n unstakeAmount = totalPendingUnstake;\n}\n\ntotalPendingUnstake -= unstakeAmount;\ntotalUnstaked += unstakeAmount;\nuint256 amountToFill = unstakeAmount;\n\nfor (uint256 i = unstakeRequestCurr...
low
```\nfunction \_startRotation(bytes32 schainIndex, uint nodeIndex) private {\n ConstantsHolder constants = ConstantsHolder(contractManager.getContract("ConstantsHolder"));\n rotations[schainIndex].nodeIndex = nodeIndex;\n rotations[schainIndex].newNodeIndex = nodeIndex;\n rotations[schainIndex].freezeUntil ...
medium
```\nmapping(uint256 => bool) public liquidated;\n\n/// @notice `\_poolIDs` maps agentID to the pools they have actively borrowed from\nmapping(uint256 => uint256[]) private \_poolIDs;\n\n/// @notice `\_credentialUseBlock` maps signature bytes to when a credential was used\nmapping(bytes32 => uint256) private \_credent...
low
```\nfunction drawDebt(\n address borrowerAddress_,\n uint256 amountToBorrow_,\n uint256 limitIndex_,\n uint256 collateralToPledge_\n) external nonReentrant {\n PoolState memory poolState = _accruePoolInterest();\n\n // rest of code\n\n DrawDebtResult memory result = BorrowerActions.drawDebt(\n ...
medium
```\n/// @dev Target is a 256 bit number encoded as a 3-byte mantissa and 1 byte exponent\n/// @param \_header The header\n/// @return The target threshold\nfunction extractTarget(bytes memory \_header) internal pure returns (uint256) {\n bytes memory \_m = \_header.slice(72, 3);\n uint8 \_e = uint8(\_header[75])...
high
```\n /**\n * @dev Hook override to forbid transfers except from whitelisted \n addresses and minting\n */\n function _beforeTokenTransfer(address from, address to, uint256 \n /*amount*/) internal view override {\n require(from == address(0) || _transferWhitelist...
low
```\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
```\nwAuraPools.getVault(lpToken).exitPool(\n IBalancerPool(lpToken).getPoolId(),\n address(this),\n address(this),\n IBalancerVault.ExitPoolRequest(tokens, minAmountsOut, "", false)\n);\n```\n
high
```\nfunction getNftPower(uint256 tokenId) public view override returns (uint256) {\n if (block.timestamp <= powerCalcStartTimestamp) {\n return 0;\n }\n\n // @audit 0 for non-existent tokenId\n uint256 collateral = nftInfos[tokenId].currentCollateral;\n\n // Calculate the minimum possible power b...
high
```\ngaugeQueuedRewards[gauge] = QueuedRewards({\n priorCycleRewards: queuedRewards.priorCycleRewards + completedRewards,\n cycleRewards: uint112(nextRewards),\n storedCycle: currentCycle\n});\n```\n
high
```\nfunction pauseByType(bytes32 \_pauseType) external onlyRole(PAUSE\_MANAGER\_ROLE) {\n pauseTypeStatuses[\_pauseType] = true;\n emit Paused(\_msgSender(), \_pauseType);\n}\n```\n
low
```\n function baseOracleCircuitBreaker(\n uint256 protocolPrice,\n uint80 roundId,\n int256 chainlinkPrice,\n uint256 timeStamp,\n uint256 chainlinkPriceInEth\n ) private view returns (uint256 _protocolPrice) {\n \n // more code\n\n if (invalidFetchData || ...
low
```\nif (!emergencyProcessing) {\n require(\n proposal.tributeToken.transfer(proposal.proposer, proposal.tributeOffered),\n "failing vote token transfer failed"\n );\n```\n
high
```\nfunction getMemberAt(uint256 \_index) override public view returns (address) {\n AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));\n return addressSetStorage.getItem(keccak256(abi.encodePacked(daoNameSpace, "member.index")), \_index);\n}\n```\...
low
```\nFile: PoolMath.sol\n int256 internal constant N_COINS = 3;\n..SNIP..\n function swapExactBaseLpTokenForUnderlying(PoolState memory pool, uint256 exactBaseLptIn)\n internal\n..SNIP..\n // Note: Here we are multiplying by N_COINS because the swap formula is defined in terms of the amount of P...
high
```\nfunction average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n}\n```\n
none
```\nmapping(uint256 => bool) public liquidated;\n\n/// @notice `\_poolIDs` maps agentID to the pools they have actively borrowed from\nmapping(uint256 => uint256[]) private \_poolIDs;\n\n/// @notice `\_credentialUseBlock` maps signature bytes to when a credential was used\nmapping(bytes32 => uint256) private \_credent...
low
```\nfunction functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n) internal returns (bytes memory) {\n return\n functionCallWithValue(\n target,\n data,\n value,\n "Address: low-level call with value failed"\n );\n}\n```\n
none
```\nuint256 deployerPrivateKey = vm.envUint("PRIVATE\_KEY");\n```\n
high
```\nfunction _updateReserves(uint256 reserves) internal {\n require(\n reserves <= address(this).balance.sub(_grandPrizePool),\n "DCBW721: Reserve-Balance Mismatch"\n );\n _reserves = reserves;\n}\n```\n
none
```\n function _decreaseCurrentMinted(address account, uint256 amount) internal virtual {\n // If the burner is a vault, subtract burnt TAU from its currentMinted.\n // This has a few highly unimportant edge cases which can generally be rectified by increasing the relevant vault's mintLimit.\n u...
medium
```\nfunction swapAndSendDividends(uint256 tokens) private {\n if (tokens == 0) {\n return;\n }\n swapTokensForEth(tokens);\n uint256 totalAmount = buyAmount.add(sellAmount);\n\n bool success = true;\n bool successOp1 = true;\n\n uint256 dividends;\n uint256 dividendsFromBuy;\n uint256...
none
```\nfunction updatePartnershipsWallet(address newAddress) external onlyOwner {\n _partnershipswallet = newAddress;\n}\n```\n
none
```\n// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.9;\nimport "./Utils.sol";\n\ncontract MaliciousReceiver {\n uint256 public gas;\n receive() payable external {\n gas = gasleft();\n for(uint256 i = 0; i < 150000; i++) {} // 140k iteration uses about 28m gas. 150k uses slightly over 30...
high
```\nnpx hardhat test --network hardhat --grep 'usage of Attack contract and receiving NFT'\n```\n
low
```\nfunction setPair(address pairAddress) external onlyOwner {\n require(pairAddress != address(0), "VoxNET: DEx pair address cannot be zero");\n pair = pairAddress;\n setIsPool(pairAddress, true);\n}\n```\n
none
```\n/// @notice Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud\n/// @dev For interface, reading auctionValue will give a past value. the current is better\n/// @param \_d deposit storage pointer\nfunction purchaseSignerBondsAtAuction(DepositUtils.Deposit storage \_...
medium
```\nconstructor() {\n \_disableInitializers();\n}\n```\n
low
```\n/\*\*\n\* @dev Create a new MiniMe token and save it for the user\n\* @param \_name String with the name for the token used by share holders in the organization\n\* @param \_symbol String with the symbol for the token used by share holders in the organization\n\*/\nfunction newToken(string memory \_name, string me...
medium
```\nshell.assimilators[\_derivative] = Assimilators.Assimilator(\_assimilator, \_numeraireAssim.ix);\n```\n
low
```\nRocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));\nif (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) {\n // Update the price\n updatePrices...
medium
```\nfunction buyCollateralFromAuction(address token, uint amount) override external {\n Auction memory auction = auctions[token];\n // validate auction\n require(_isAuctionOngoing(auction.startedAt, auction.expiryTime), "IF.no_ongoing_auction");\n\n // transfer funds\n uint vusdToTransfer = _calcVusdAmo...
medium
```\n/// @notice if window has passed, reward caller and reset window\nfunction \_incentivize() internal virtual {\n if (isTimeEnded()) {\n \_initTimed(); // reset window\n fei().mint(msg.sender, incentiveAmount);\n }\n}\n```\n
medium
```\n (s.share, left) = _claim(s);\n require(left > 0, "TokenSale: Nothing to claim");\n uint256 refundTaxAmount;\n if (s.taxAmount > 0) {\n uint256 tax = userTaxRate(s.amount, msg.sender);\n uint256 taxFreeAllc = _maxTaxfreeAllocation(msg.sender) * PCT_BASE;\n ...
high
```\nfunction changeReserveRate(uint256 reservesRate) public onlyOwner {\n require(\n _reservesRate != reservesRate,\n "DCBW721: reservesRate cannot be same as previous"\n );\n _reservesRate = reservesRate;\n}\n```\n
none
```\nuint256 proofNb = (\_operatorData.length - 84) / 32;\nbytes32[] memory proof = new bytes32[](proofNb);\nuint256 index = 0;\nfor (uint256 i = 116; i <= \_operatorData.length; i = i + 32) {\n bytes32 temp;\n assembly {\n temp := mload(add(\_operatorData, i))\n }\n proof[index] = temp;\n index++...
medium
```\nfunction getPrice(address pair) external view returns (uint) {\n (uint r0, uint r1,) = IUniswapV2Pair(pair).getReserves();\n\n // 2 * sqrt(r0 * r1 * p0 * p1) / totalSupply\n return FixedPointMathLib.sqrt(\n r0\n .mulWadDown(r1)\n .mulWadDown(oracle.getPrice(IUniswapV2Pair(pair).token0...
high
```\n require(\_validityStatus, "CollateralizationOracleWrapper: CollateralizationOracle is invalid");\n\n // set cache variables\n cachedProtocolControlledValue = \_protocolControlledValue;\n cachedUserCirculatingFei = \_userCirculatingFei;\n cachedProtocolEquity = \_protocolEquity;\n\n // reset time...
medium
```\nfunction calculateTaxFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_taxFee).div(10**2);\n}\n```\n
none
```\n// @audit no staleness check\n(, int256 externallyReportedV3Balance, , , ) = AggregatorV3Interface(\n ExternalV3ReservesPoROracle\n).latestRoundData();\n```\n
low
```\n function validateWithdraw(\n address reserveAddress,\n uint256 amount,\n uint256 userBalance,\n mapping(address => DataTypes.ReserveData) storage reservesData,\n DataTypes.UserConfigurationMap storage userConfig,\n mapping(uint256 => address) storage reserves,\n uint256 reservesCount,\n a...
medium
```\n function _verifyRemoveSig(address fidOwner, bytes memory key, uint256 deadline, bytes memory sig) internal {\n _verifySig(\n _hashTypedDataV4(\n keccak256(abi.encode(REMOVE_TYPEHASH, fidOwner, keccak256(key), _useNonce(fidOwner), deadline))\n ),\n fidOwner...
medium
```\nfunction requestLinkTopHatToTree(uint32 _topHatDomain, uint256 _requestedAdminHat) external {\n uint256 fullTopHatId = uint256(_topHatDomain) << 224; // (256 - TOPHAT_ADDRESS_SPACE);\n\n _checkAdmin(fullTopHatId);\n\n linkedTreeRequests[_topHatDomain] = _requestedAdminHat;\n emit TopHatLinkRequested(_t...
high
```\n// SPDX-License-Identifier: MIT\npragma solidity 0.8.0;\n\nstruct WithdrawalTransaction {\n uint256 nonce;\n address sender;\n address target;\n uint256 value;\n uint256 gasLimit;\n bytes data;\n}\n\ninterface IOptimismPortal {\n function finalizeWithdrawalTransaction(WithdrawalTransaction memory _tx...
high
```\nrequire(msg.sender == amp, "Invalid sender");\n```\n
low
```\nfunction setFees(\n uint ecosystem,\n uint marketing,\n uint treasury\n) external authorized {\n fee = ecosystem + marketing + treasury;\n require(fee <= 20, "VoxNET: fee cannot be more than 20%");\n\n ecosystemFee = ecosystem;\n marketingFee = marketing;\n treasuryFee = treasury;\n\n em...
none
```\nfunction executeRoutes(\n uint32[] calldata routeIds,\n bytes[] calldata dataItems,\n bytes[] calldata eventDataItems\n) external payable {\n uint256 routeIdslength = routeIds.length;\n for (uint256 index = 0; index < routeIdslength; ) {\n (bool success, bytes memory result) = addressAt(route...
low
```\n function execute(\n mapping(uint256 => IGovPool.Proposal) storage proposals,\n uint256 proposalId\n ) external {\n // rest of code. // code\n\n for (uint256 i; i < actionsLength; i++) {\n> (bool status, bytes memory returnedData) = actions[i].executor.call{\n ...
medium
```\nfunction _takeDonationFee(uint256 tDonation) private {\n uint256 currentRate = _getRate();\n uint256 rDonation = tDonation.mul(currentRate);\n _rOwned[_donationAddress] = _rOwned[_donationAddress].add(rDonation);\n if (_isExcluded[_donationAddress])\n _tOwned[_donationAddress] = _tOwned[_donatio...
none
```\n// Get reserves in boosted position.\n(uint256 reserveTokenA, uint256 reserveTokenB) = boostedPosition.getReserves();\n\n// Get total supply of lp tokens from boosted position.\nuint256 boostedPositionTotalSupply = boostedPosition.totalSupply();\n\nIRootPriceOracle rootPriceOracle = systemRegistry.rootPriceOracle(...
high
```\n function _setTemplate(\n string memory templateName,\n uint256 templateVersion,\n address implementationAddress\n ) internal {\n// rest of code\n\n if (latestImplementation[templateName] == address(0)) { /****add other version, _templateNames will duplicate ****/\n _tem...
medium
```\nfunction excludeFromLimit(address account) public onlyOwner {\n _isExcludedFromLimit[account] = true;\n}\n```\n
none
```\nfunction sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n return c;\n}\n```\n
none