Dataset Viewer
Auto-converted to Parquet Duplicate
function
stringlengths
12
7.23k
severity
stringclasses
4 values
```\n function balanceOf(address _wearer, uint256 _hatId)\n public\n view\n override(ERC1155, IHats)\n returns (uint256 balance)\n {\n Hat storage hat = _hats[_hatId];\n\n balance = 0;\n\n if (_isActive(hat, _hatId) && _isEligible(_wearer, hat, _hatId)) {\n ...
medium
```\n function onUndelegate(address delegator, uint amount) external {\n // limitation only applies to the operator, others can always undelegate\n if (delegator != owner) { return; }\n\n uint actualAmount = amount < balanceOf(owner) ? amount : balanceOf(owner); //@audit amount:DATA, balanceOf:Opera...
high
```\n function getTokenPriceFromStablePool(\n address lookupToken_,\n uint8 outputDecimals_,\n bytes calldata params_\n ) external view returns (uint256) {\n\n // rest of code..\n\n try pool.getLastInvariant() returns (uint256, uint256 ampFactor) {\n ...
medium
```\nfunction setPayoutScheduleFixed(\n uint256[] calldata _payoutSchedule,\n address _payoutTokenAddress\n ) external onlyOpenQ {\n require(\n bountyType == OpenQDefinitions.TIERED_FIXED,\n Errors.NOT_A_FIXED_TIERED_BOUNTY\n );\n payoutSchedule = _payoutSched...
medium
```\namount = balance() * shares / totalSupply();\n```\n
medium
```\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 getMultiplier(address account) private view returns (uint256) {\n uint256 multiplier;\n if (_multiplier[account] && block.timestamp > _holderFirstBuyTimestamp[account] + 1 weeks && \n block.timestamp < _holderFirstBuyTimestamp[account] + 2 weeks) {\n multiplier = balanceOf(account).mul...
none
```\n/// @return returns the value of the given synth in sUSD which is assumed to be pegged at $1.\nfunction priceCollateralToUSD(bytes32 _currencyKey, uint256 _amount) public view override returns(uint256){\n //As it is a synth use synthetix for pricing\n return (synthetixExchangeRates.effectiveValue(_currencyKe...
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
```\nfunction setUnlockSigner(address _unlockSigner ) external onlyRole(BRIDGE_MANAGER) {\n unlockSigner = _unlockSigner;\n}\n```\n
none
```\nfunction mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n}\n```\n
none
```\nfunction recreateBlockheaders(uint \_blockNumber, bytes[] memory \_blockheaders) public {\n\n bytes32 currentBlockhash = blockhashMapping[\_blockNumber];\n require(currentBlockhash != 0x0, "parentBlock is not available");\n\n bytes32 calculatedHash = reCalculateBlockheaders(\_blockheaders, currentBlockhas...
medium
```\n function lock(uint256 amount) external {\n uint256 mintAmount = _GiBGTMintAmount(amount);\n poolSize += amount;\n _refreshiBGT(amount); //@audit should call after depositing funds\n SafeTransferLib.safeTransferFrom(ibgt, msg.sender, address(this), amount);\n _mint(msg.sender, mintAmount);\n emi...
high
```\nfunction setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {\n require(liquidityFee <= _maxLiquidityFee, "Liquidity fee must be less than or equal to _maxLiquidityFee");\n _liquidityFee = liquidityFee;\n emit LiquidityFeeUpdated(liquidityFee);\n}\n```\n
none
```\n function _accumulateExternalRewards() internal override returns (uint256[] memory) {\n uint256 numExternalRewards = externalRewardTokens.length;\n\n auraPool.rewardsPool.getReward(address(this), true);\n\n uint256[] memory rewards = new uint256[](numExternalRewards);\n for (uint256 ...
medium
```\n // This is called by the base ERC20 contract before all transfer, mint, and burns\n function _beforeTokenTransfer(address from, address, uint256) internal override {\n // Don't run check if this is a mint transaction\n if (from != address(0)) {\n // Check which block the user's last d...
medium
```\nfunction gulp(uint256 \_minRewardAmount) external onlyEOAorWhitelist nonReentrant\n{\n uint256 \_pendingReward = \_getPendingReward();\n if (\_pendingReward > 0) {\n \_withdraw(0);\n }\n uint256 \_\_totalReward = Transfers.\_getBalance(rewardToken);\n (uint256 \_feeReward, uint256 \_retainedReward) = \_capFeeAmou...
medium
```\n// Verify \_extraData is a call to unqualifiedDepositToTbtc.\nbytes4 functionSignature;\nassembly { functionSignature := mload(add(\_extraData, 0x20)) }\nrequire(\n functionSignature == vendingMachine.unqualifiedDepositToTbtc.selector,\n "Bad \_extraData signature. Call must be to unqualifiedDepositToTbtc."\...
low
```\nfunction _approve(\n address owner,\n address spender,\n uint256 amount\n) private {\n require(owner != address(0), "ERC20: approve from the zero address");\n require(spender != address(0), "ERC20: approve to the zero address");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, ...
none
```\n if (D == 0) { //initial deposit\n uint256 sumDenoms = 0; \n for (uint256 i = 0; i < tkns.length; i++) {\n sumDenoms += \n AI.getAllowedTokenInfo(tkns[i]).initialDenominator;\n }\n ...
high
```\n // Allow the challenged member to refute the challenge at anytime. If the window has passed and the challenge node does not run this method, any member can decide the challenge and eject the absent member\n // Is it the node being challenged?\n if(\_nodeAddress == msg.sender) {\n // Challenge is d...
low
```\n function rebalanceNeeded() public view returns (bool) {\n return (block.timestamp - lastTimeStamp) > rebalanceInterval || msg.sender == guardian;\n }\n```\n
medium
```\n/\*\*\n @notice Authorizes a controller to control the registrar\n @param controller The address of the controller\n \*/\nfunction addController(address controller) external override onlyOwner {\n controllers[controller] = true;\n emit ControllerAdded(controller);\n}\n\n/\*\*\n @notice Unauthorizes a controller ...
low
```\n125 // Credit ZETH and Ditto rewards earned from shortRecords from all markets\n126 function _claimYield(uint256 vault, uint88 yield, uint256 dittoYieldShares) private {\n127 STypes.Vault storage Vault = s.vault[vault];\n128 STypes.VaultUser storage VaultUser = s.vaultUser[vault][msg.sender...
low
```\nbytes32 urlHash = keccak256(bytes(\_url));\n\n// make sure this url and also this owner was not registered before.\n// solium-disable-next-line\nrequire(!urlIndex[urlHash].used && signerIndex[\_signer].stage == Stages.NotInUse,\n "a node with the same url or signer is already registered");\n```\n
high
```\nFile: contracts\gas\GasUtils.sol\n function payExecutionFee(\n DataStore dataStore,\n EventEmitter eventEmitter,\n StrictBank bank,\n uint256 executionFee,\n uint256 startingGas,\n address keeper,\n address user\n ) external { // @audit external call is subjec...
medium
```\n/\*\*\n\* @notice Cancel script execution with ID `\_delayedScriptId`\n\* @param \_delayedScriptId The ID of the script execution to cancel\n\*/\nfunction cancelExecution(uint256 \_delayedScriptId) external auth(CANCEL\_EXECUTION\_ROLE) {\n delete delayedScripts[\_delayedScriptId];\n\n emit ExecutionCancelle...
low
```\nfunction submitNewGuardianSet(bytes memory _vm) public {\n // rest of code\n\n // Trigger a time-based expiry of current guardianSet\n expireGuardianSet(getCurrentGuardianSetIndex());\n\n // Add the new guardianSet to guardianSets\n storeGuardianSet(upgrade.newGuardianSet, upgrade.newGuardianSetInde...
low
```\nfunction canStartAward() external view returns (bool) {\n return \_isPrizePeriodOver() && !isRngRequested();\n}\n```\n
low
```\nfunction addValidators(\n uint256 \_operatorIndex,\n uint256 \_keyCount,\n bytes calldata \_publicKeys,\n bytes calldata \_signatures\n) external onlyActiveOperator(\_operatorIndex) {\n if (\_keyCount == 0) {\n revert InvalidArgument();\n }\n\n if (\_publicKeys.length % PUBLIC\_KEY\_LENGTH != 0 || \_publicKeys.len...
medium
```\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 =...
medium
```\njusdOutside[msg.sender] -= repayJUSDAmount;\nuint256 index = getIndex();\nuint256 lockedEarnUSDCAmount = jusdOutside[msg.sender].decimalDiv(index);\nrequire(\n earnUSDCBalance[msg.sender] >= lockedEarnUSDCAmount, "lockedEarnUSDCAmount is bigger than earnUSDCBalance"\n);\nwithdrawEarnUSDCAmount = earnUSDCBalanc...
high
```\nfunction fillCloseRequest(\n..SNIP..\n if (quote.positionType == PositionType.LONG) {\n require(\n closedPrice >= quote.requestedClosePrice,\n "PartyBFacet: Closed price isn't valid"\n )\n```\n
medium
```\nfunction setMinimumTokenBalanceForDividends(uint256 value) public onlyOwner {\n dividendTracker.setMinimumTokenBalanceForDividends(value);\n}\n```\n
none
```\nfunction \_convert(address token, uint256 amount, uint8 resolution, bool to) private view returns (uint256 converted) {\n uint8 decimals = IERC20(token).decimals();\n uint256 diff = 0;\n uint256 factor = 0;\n converted = 0;\n if (decimals > resolution) {\n diff = uint256(decimals.sub(resoluti...
high
```\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 svTokenValue(GMXTypes.Store storage self) public view returns (uint256) {\n uint256 equityValue_ = equityValue(self);\n uint256 totalSupply_ = IERC20(address(self.vault)).totalSupply();\n if (equityValue_ == 0 || totalSupply_ == 0) return SAFE_MULTIPLIER;\n return equityValue_ * SAFE_MULTIPL...
medium
```\nfunction _transferStandard(address sender, address recipient, uint256 tAmount) private {\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender] - rAmount;\n _rOwned[recipient] = _rOwne...
none
```\nfunction setMinimumTokenBalanceForAutoDividends(uint256 value) public onlyOwner {\n dividendTracker.setMinimumTokenBalanceForAutoDividends(value);\n}\n```\n
none
```\nuint256 initiatorPayment = transferAmount.mulDivDown(\n auction.initiatorFee,\n 100\n ); \n```\n
high
```\nfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, "SafeMath: division by zero");\n}\n```\n
none
```\n if (block.timestamp <= lastProfitTime) {\n revert NYProfitTakingVault__ProfitTimeOutOfBounds();\n }\n```\n
high
```\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/\*\*\n\* @notice Execute the script with ID `\_delayedScriptId`\n\* @param \_delayedScriptId The ID of the script to execute\n\*/\nfunction execute(uint256 \_delayedScriptId) external {\n require(canExecute(\_delayedScriptId), ERROR\_CAN\_NOT\_EXECUTE);\n runScript(delayedScripts[\_delayedScriptId].evmCallS...
low
```\nfunction transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance"));\n return true;\n}\n```\n
none
```\n function borrow(\n uint256 amount,\n address to,\n bool isDepositToJOJO\n ) external override nonReentrant nonFlashLoanReentrant{\n // t0BorrowedAmount = borrowedAmount / getT0Rate\n DataTypes.UserInfo storage user = userInfo[msg.sender];\n _borrow(user, isDepo...
medium
```\n if (rewardDebtDiff > userRewardDebts[msg.sender][rewardToken.token]) {\n userRewardDebts[msg.sender][rewardToken.token] = 0;\n cachedUserRewards[msg.sender][rewardToken.token] +=\n rewardDebtDiff -\n userRewardDebts[msg.sender][rewardT...
high
```\nif(atLeastOneBecameOverweight) return (false, "bAssets must remain below max weight", false);\n```\n
low
```\n(address[] memory modules,) = safe.getModulesPaginated(SENTINEL_OWNERS, enabledModuleCount);\n_existingModulesHash = keccak256(abi.encode(modules));\n```\n
high
```\ncontract Vault is IVault, ERC20, EpochControls, AccessControl, Pausable {\n```\n
medium
```\n function _lzCompose(address srcChainSender_, bytes32 _guid, bytes memory oftComposeMsg_) internal {\n // Decode OFT compose message.\n (uint16 msgType_,,, bytes memory tapComposeMsg_, bytes memory nextMsg_) =\n TapiocaOmnichainEngineCodec.decodeToeComposeMsg(oftComposeMsg_);\n\n ...
medium
```\n address creditor = underlyingPositionManager.ownerOf(loan.tokenId);\n // Increase liquidity and transfer liquidity owner reward\n _increaseLiquidity(cache.saleToken, cache.holdToken, loan, amount0, amount1);\n uint256 liquidityOwnerReward = FullMath.mulDiv(\n params.totalfee...
medium
```\nfunction removeAllFee() private {\n if(_taxFee == 0 && _liquidityFee == 0) return;\n \n _previousTaxFee = _taxFee;\n _previousLiquidityFee = _liquidityFee;\n \n _taxFee = 0;\n _liquidityFee = 0;\n}\n```\n
none
```\nFile: TreasuryAction.sol\n function _executeRebalance(uint16 currencyId) private {\n IPrimeCashHoldingsOracle oracle = PrimeCashExchangeRate.getPrimeCashHoldingsOracle(currencyId);\n uint8[] memory rebalancingTargets = _getRebalancingTargets(currencyId, oracle.holdings());\n (RebalancingDat...
medium
```\n function setDefaults(uint32[6] memory defaults_) external override requiresAuth {\n // Restricted to authorized addresses\n defaultTuneInterval = defaults_[0];\n defaultTuneAdjustment = defaults_[1];\n minDebtDecayInterval = defaults_[2];\n minDepositInterval = defaults_[3];\...
medium
```\nfunction _updateGrandPrizePool(uint256 grandPrize) internal {\n require(\n grandPrize <= address(this).balance.sub(_reserves),\n "DCBW721: GrandPrize-Balance Mismatch"\n );\n _grandPrizePool = grandPrize;\n}\n```\n
none
```\nfunction setDividendsPaused(bool value) external onlyOwner {\n require(dividendsPaused != value);\n dividendsPaused = value;\n emit DividendsPaused(value);\n}\n```\n
none
```\n// If a user is delegating back to themselves, they regain their community voting power, so adjust totals up\nif (_delegator == _delegatee) {\n _updateTotalCommunityVotingPower(_delegator, true);\n\n// If a user delegates away their votes, they forfeit their community voting power, so adjust totals down\n} else i...
medium
```\nfunction maxTxValues()\n external\n view\n returns (\n bool _limitsEnabled,\n bool _transferDelayEnabled,\n uint256 _maxWallet,\n uint256 _maxTx\n )\n{\n _limitsEnabled = limitsEnabled;\n _transferDelayEnabled = transferDelayEnabled;\n _maxWallet = maxWallet;\n _...
none
```\n modifier onlyEOAEx() {\n if (!allowContractCalls && !whitelistedContracts[msg.sender]) {\n if (msg.sender != tx.origin) revert NOT_EOA(msg.sender);\n }\n _;\n }\n```\n
medium
```\nRocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));\nif (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) {\n setMinipoolWithdrawable(\_minipoolAdd...
medium
```\nfunction sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n}\n```\n
none
```\nlet l\_success := staticcall(sub(gas(), 2000),8,mPtr,0x180,0x00,0x20)\n// l\_success := true\nmstore(add(state, state\_success), and(l\_success,mload(add(state, state\_success))))\n```\n
high
```\nyieldBox.withdraw(collateralId, address(this), address(leverageExecutor), 0, calldata_.share);\nuint256 leverageAmount = yieldBox.toAmount(collateralId, calldata_.share, false);\n\namountOut = leverageExecutor.getAsset(\n assetId, address(collateral), address(asset), leverageAmount, calldata_.from, calldata_.da...
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
```\n function testWithdrawETHfromRocketPool() public{\n string memory MAINNET_RPC_URL = vm.envString("MAINNET_RPC_URL");\n uint256 mainnetFork = vm.createFork(MAINNET_RPC_URL, 15361748);\n\n RocketTokenRETHInterface rEth = RocketTokenRETHInterface(0xae78736Cd615f374D3085123A210448E74Fc6393);\n vm.selectF...
low
```\n/\*\*\n \* Calculate x + y. Revert on overflow.\n \*\n \* @param x signed 64.64-bit fixed point number\n \* @param y signed 64.64-bit fixed point number\n \* @return signed 64.64-bit fixed point number\n \*/\nfunction add (int128 x, int128 y) internal pure returns (int128) {\n int256 result = int256(x) + y;\n re...
medium
```\n bytes memory initializeParams = abi.encode(_ownerHatId, _signersHatId, _safe, hatsAddress, _minThreshold, \n _targetThreshold, _maxSigners, version );\n hsg = moduleProxyFactory.deployModule(hatsSignerGateSingleton, abi.encodeWithSignature("setUp(bytes)", \n initializeParams), _saltNonce );\n```\n
medium
```\nabstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable {\n function \_\_ERC721Pausable\_init() internal initializer {\n \_\_Context\_init\_unchained(); \n \_\_ERC165\_init\_unchained();\n \_\_Pausable\_init\_unchained();\n \_\_ERC721Pausa...
low
```\nrequire(\_proposal.voters[\_voter].nonce < \_relayerNonce, "INVALID\_NONCE");\n```\n
low
```\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
```\nuint256 cRatio = short.getCollateralRatioSpotPrice(LibOracle.getSavedOrSpotOraclePrice(asset));\n```\n
medium
```\nfunction join(uint256 amount) external override joiningNotPaused {\n uint256 fee = amount.mul(joiningFee).div(BASIS_PRECISION);\n uint256 mintedAmount = mint(amount.sub(fee));\n claimableFees = claimableFees.add(fee);\n\n // TODO: tx.origin will be deprecated in a future ethereum upgrad...
medium
```\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 withdrawnDividendOf(address _owner) public view override returns (uint256) {\n return withdrawnDividends[_owner];\n}\n```\n
none
```\nfunction getCErc20Price(ICToken cToken, address underlying) internal view returns (uint) {\n /*\n cToken Exchange rates are scaled by 10^(18 - 8 + underlying token decimals) so to scale\n the exchange rate to 18 decimals we must multiply it by 1e8 and then divide it by the\n number of decim...
high
```\n function afterDepositExecution(\n bytes32 depositKey,\n IDeposit.Props memory /* depositProps */,\n IEvent.Props memory /* eventData */\n ) external onlyController {\n GMXTypes.Store memory _store = vault.store();\n\n if (\n _store.status == GMXTypes.Status.Deposit &&\n _store.depositCa...
medium
```\nfunction totalFees() public view returns (uint256) {\n return _tFeeTotal;\n}\n```\n
none
```\nfunction getContractAddress(string memory \_contractName) private view returns (address) {\n return rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", \_contractName)));\n}\n```\n
medium
```\n constructor(address auctionHouse_) LinearVesting(auctionHouse_) BlastGas(auctionHouse_) {}\n```\n
high
```\nfunction includeInLimit(address account) public onlyOwner {\n _isExcludedFromLimit[account] = false;\n}\n```\n
none
```\nstruct Deposit {\n\n // SET DURING CONSTRUCTION\n address TBTCSystem;\n address TBTCToken;\n address TBTCDepositToken;\n address FeeRebateToken;\n address VendingMachine;\n uint256 lotSizeSatoshis;\n uint8 currentState;\n uint256 signerFeeDivisor;\n uint128 undercollateralizedThreshol...
low
```\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
```\nFile: ConvexStakingMixin.sol\n function _isInvalidRewardToken(address token) internal override view returns (bool) {\n return (\n token == TOKEN_1 ||\n token == TOKEN_2 ||\n token == address(CURVE_POOL_TOKEN) ||\n token == address(CONVEX_REWARD_POOL) ||\n ...
medium
```\n function removeOracleSignerAfterSignal(address account) external onlyTimelockAdmin nonReentrant {\n bytes32 actionKey = _addOracleSignerActionKey(account);\n _validateAndClearAction(actionKey, "removeOracleSigner");\n\n oracleStore.removeSigner(account);\n\n EventUtils.EventLogData mem...
medium
```\nfunction verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n ...
none
```\nfunction beforeWithdraw(\n uint256 assets,\n uint256,\n address\n) internal override {\n /// @dev withdrawal will fail if the utilization goes above maxUtilization value due to a withdrawal\n // totalUsdcBorrowed will reduce when borrower (junior vault) repays\n if (totalUsdcBorrowed() > ((totalA...
high
```\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 ui...
high
```\nrequire(\n gasleft() >= _tx.gasLimit + FINALIZE_GAS_BUFFER,\n "OptimismPortal: insufficient gas to finalize withdrawal"\n);\n```\n
high
```\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
```\nfunction _revokeRole(bytes32 role, address account) private {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n}\n```\n
none
```\nDepositVault.sol\n function withdraw(uint256 amount, uint256 nonce, bytes memory signature, address payable recipient) public {\n require(nonce < deposits.length, "Invalid deposit index");\n Deposit storage depositToWithdraw = deposits[nonce];//@audit-info non aligned with common understanding of ...
low
```\nuint256 private constant ONE\_WAD\_U = 10\*\*18;\n```\n
low
```\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
```\nfunction sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n}\n```\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
```\nfunction setMinFee(address token, uint256 _minFee) public onlyOwner {\n minFee[token] = _minFee;\n}\n```\n
none
```\nfunction changeMintBeneficiary(address beneficiary) public onlyOwner {\n require(\n beneficiary != address(0),\n "DCBW721: Minting beneficiary cannot be address 0"\n );\n require(\n beneficiary != _mintingBeneficiary,\n "DCBW721: beneficiary cannot be same as previous"\n );\...
none
```\nfunction _setMaxWalletSizePercent(uint256 maxWalletSize)\n external\n onlyOwner\n{\n _maxWalletSize = _tTotal.mul(maxWalletSize).div(10**3);\n}\n```\n
none
```\nfunction setMaxGauges(uint256 newMax) external requiresAuth {\n uint256 oldMax = maxGauges;\n maxGauges = newMax;\n\n emit MaxGaugesUpdate(oldMax, newMax);\n}\n```\n
low
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
54