function
stringlengths
12
63.3k
severity
stringclasses
4 values
```\nfunction div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n return c;\n}\n```\n
none
```\nsignedOnly(abi.encodePacked(msg.sender, instance, data), signature)\n```\n
medium
```\nFile: LimitOrderRegistry.sol\n function claimOrder(uint128 batchId, address user) external payable returns (ERC20, uint256) {\n..SNIP..\n // Transfer fee in.\n address sender = _msgSender();\n if (msg.value >= userClaim.feePerUser) {\n // refund if necessary.\n uint256...
medium
```\n/// @notice Verifies the nonce of a voter on a proposal\n/// @param \_proposalId The id of the proposal\n/// @param \_voter The address of the voter\n/// @param \_relayerNonce The nonce submitted by the relayer\nfunction verifyNonce(uint256 \_proposalId, address \_voter, uint256 \_relayerNonce) public view {\n ...
high
```\nfunction _getStakeInfo(address addr) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n}\n```\n
none
```\nFile: BalancerEnvironment.py\n "postMaturitySettlementSlippageLimitPercent": 10e6, # 10%\n "emergencySettlementSlippageLimitPercent": 10e6, # 10%\n```\n
medium
```\nFile: LimitOrderRegistry.sol\n function setFastGasFeed(address feed) external onlyOwner {\n fastGasFeed = feed;\n }\n```\n
high
```\n function verifyPrices(PriceSig memory priceSig, address partyA) internal view {\n MuonStorage.Layout storage muonLayout = MuonStorage.layout();\n require(priceSig.prices.length == priceSig.symbolIds.length, "LibMuon: Invalid length");\n bytes32 hash = keccak256(\n abi.encodePack...
high
```\nfunction \_buyPolicyFor(\n address \_policyHolderAddr,\n uint256 \_epochsNumber,\n uint256 \_coverTokens\n) internal {\n```\n
low
```\n// Prevent `executeTransaction` from being called when context is already set\naddress currentContextAddress\_ = currentContextAddress;\nif (currentContextAddress\_ != address(0)) {\n LibRichErrors.rrevert(LibExchangeRichErrors.TransactionInvalidContextError(\n transactionHash,\n currentContextAdd...
medium
```\n function repay(uint256 repayAmount, uint256 _userLoanId) external {\n Loan memory userLoan = loans[msg.sender][_userLoanId];\n if(userLoan.borrowedAmount < repayAmount) revert ExcessiveRepay();\n if(block.timestamp > userLoan.endDate) revert LoanExpired();\n uint256 interestLoanRatio = FixedP...
medium
```\n IUniswapV3Pool(underlyingTrustedPools[500].poolAddress)\n```\n
high
```\nfunction userWithdraw(address to, address user, address token, uint256 dTokenAmount) external nonReentrant allowedToken(token) returns(uint256 amount) {\n accrueInterest(token);\n AssetInfo storage info = assetInfo[token];\n require(dTokenAmount <= IDToken(info.dToken).balanceOf(msg.sender), E...
medium
```\nconstructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n}\n```\n
none
```\nuint256 bAsset\_decimals = CommonHelpers.getDecimals(\_bAsset);\n```\n
low
```\nfallback () external [payable];\nfallback (bytes calldata _input) external [payable] returns (bytes memory _output);\n```\n
medium
```\nfunction updateAndDistributeERC20(\n address split,\n ERC20 token,\n address[] calldata accounts,\n uint32[] calldata percentAllocations,\n uint32 distributorFee,\n address distributorAddress\n)\n external\n override\n onlySplitController(split)\n validSplit(accounts, percentAllocations, distributorFee)\...
none
```\nfunction getETHBalance(address account) external view returns (uint256) {\n return\n ethBalances[account] + (splits[account].hash != 0 ? account.balance : 0);\n}\n```\n
none
```\nfunction supportsInterface (bytes4 interfaceID) public returns (bool) {\n return interfaceID == ERC20ID || interfaceID == ERC165ID;\n}\n```\n
low
```\n_manage(context, depositAssets, claimAmount, !depositAssets.isZero() || !redeemShares.isZero());\n```\n
medium
```\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
```\nfunction setGasPriceLimit(uint256 GWEI) external onlyOwner {\n require(GWEI >= 50, "can never be set lower than 50");\n gasPriceLimit = GWEI * 1 gwei;\n}\n```\n
none
```\nfunction delBot(address notbot) public onlyOwner {\n bots[notbot] = false;\n}\n```\n
none
```\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\n }\n```\n
medium
```\nconstructor () {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n}\n```\n
none
```\nfunction _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uin...
none
```\n/* snip */\n// now check rate limits\nbool isAmountRateLimited = _isOutboundAmountRateLimited(internalAmount);\nif (!shouldQueue && isAmountRateLimited) {\n revert NotEnoughCapacity(getCurrentOutboundCapacity(), amount);\n}\nif (shouldQueue && isAmountRateLimited) {\n // emit an event to notify the user that...
high
```\nfunction transferFrom(\n address sender,\n address recipient,\n uint amount\n) external override returns (bool) {\n if (allowance[sender][msg.sender] != type(uint).max) {\n require(allowance[sender][msg.sender] >= amount, "VoxNET: insufficient allowance");\n allowance[sender][msg.sender] ...
none
```\nfunction \_initialize(\n string memory \_name,\n string memory \_symbol,\n uint8 \_decimals,\n IControllerInterface \_controller,\n IInterestRateModelInterface \_interestRateModel\n) internal virtual {\n controller = \_controller;\n interestRateModel = \_interestRateModel;\n accrualBlockNum...
low
```\nerror Forbidden();\nerror InvalidFee();\nerror Deactivated();\nerror NoOperators();\nerror InvalidCall();\nerror Unauthorized();\nerror DepositFailure();\nerror DepositsStopped();\nerror InvalidArgument();\nerror UnsortedIndexes();\nerror InvalidPublicKeys();\nerror InvalidSignatures();\nerror InvalidWithdrawer();...
low
```\nfunction getCumulativeTokenPrice() internal view returns (uint) {\n uint cumulativePrice;\n\n if (IUniswapV2Pair(pair).token0() == address(this)) {\n cumulativePrice = IUniswapV2Pair(pair).price0CumulativeLast();\n } else {\n cumulativePrice = IUniswapV2Pair(pair).price1CumulativeLast();\n ...
none
```\nFile: contracts\OperatorTokenomics\SponsorshipPolicies\VoteKickPolicy.sol\n function onFlag(address target, address flagger) external {\n require(flagger != target, "error_cannotFlagSelf");\n require(voteStartTimestamp[target] == 0 && block.timestamp > protectionEndTimestamp[target], "error_cannot...
medium
```\n function create(\n FixedStrikeOptionToken optionToken_,\n uint256 amount_\n ) external override nonReentrant {\n // rest of code\n if (call) {\n // rest of code\n } else {\n uint256 quoteAmount = amount_.mulDiv(strikePrice, 10 ** payoutToken.decimals(...
high
```\nerror Forbidden();\nerror InvalidFee();\nerror Deactivated();\nerror NoOperators();\nerror InvalidCall();\nerror Unauthorized();\nerror DepositFailure();\nerror DepositsStopped();\nerror InvalidArgument();\nerror UnsortedIndexes();\nerror InvalidPublicKeys();\nerror InvalidSignatures();\nerror InvalidWithdrawer();...
low
```\nfunction log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n}\n```\n
none
```\n // Now pull in the tokens (Should have permission)\n // We only want to pull the tokens with accounting\n profitToken.transferFrom(strategy, address(this), _amount);\n emit ProfitReceivedFromStrategy(_amount);\n```\n
medium
```\n/// @notice Ensures that the caller is the admin\nmodifier onlyActiveOperator(uint256 \_operatorIndex) {\n \_onlyActiveOperator(\_operatorIndex);\n \_;\n}\n```\n
low
```\n function changeTreasury(uint256 _marketId, address _treasury)\n public\n onlyTimeLocker\n {\n if (_treasury == address(0)) revert AddressZero();\n\n address[2] memory vaults = marketIdToVaults[_marketId];\n\n if (vaults[0] == address(0) || vaults[1] == address(0)) {\n ...
medium
```\nfunction isBlacklisted(address account) public view returns(bool) {\n return _isBlackListedBot[account];\n}\n```\n
none
```\nAttackerContract.flashLoan() ->\n // Borrow lots of tokens and trigger a callback.\n SomeProtocol.flashLoan() ->\n AttackerContract.exploit()\n\nAttackerContract.exploit() ->\n // Join a Balancer Pool using the borrowed tokens and send some ETH along with the call.\n BalancerVault.joinPool() ->\...
high
```\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/\*\*\n \* @notice function to bridge tokens after swap. This is used after swap function call\n \* @notice This method is payable because the caller is doing token transfer and briding operation\n \* @dev for usage, refer to controller implementations\n \* encodedData for bridge should follow the sequence of prop...
low
```\n function getPoolPrice() public view returns (uint256 price, uint256 \n inversed){\n (uint160 sqrtPriceX96, , , , , , ) = pool.slot0();\n uint256 p = uint256(sqrtPriceX96) * uint256(sqrtPriceX96) * (10 \n ** token0.decimals());\n // token0/token1 in 1e18 format\n pr...
medium
```\n(bool sentToUser, ) = recipient.call{ value: finalUserAmount }("");\nrequire(sentToUser, "Failed to send Ether");\n```\n
low
```\nfunction closeMakeFor(\n address account,\n UFixed18 amount\n )\n public\n nonReentrant\n notPaused\n onlyAccountOrMultiInvoker(account)\n settleForAccount(account)\n takerInvariant\n closeInvariant(account)\n liquidationInvariant(account)\n ...
medium
```\nfunction _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n}\n```\n
none
```\nfunction linkNodeAddress(address validatorAddress, address nodeAddress) external allow("DelegationService") {\n uint validatorId = getValidatorId(validatorAddress);\n require(\_validatorAddressToId[nodeAddress] == 0, "Validator cannot override node address");\n \_validatorAddressToId[nodeAddress] = valida...
high
```\n function setFlagger(\n STypes.ShortRecord storage short,\n address cusd,\n uint16 flaggerHint\n ) internal {\n\n if (flagStorage.g_flaggerId == 0) {\n address flaggerToReplace = s.flagMapping[flaggerHint];\n\n // @audit if timeDiff > firstLiquidationTime,...
high
```\nfunction registerDomain(\n uint256 parentId,\n string memory name,\n address domainOwner,\n address minter\n) external override onlyController returns (uint256) {\n // Create the child domain under the parent domain\n uint256 labelHash = uint256(keccak256(bytes(name)));\n address controller = msg.sender;\n\...
high
```\ncontracts/user/UserManager.sol\n\n function unstake(uint96 amount) external whenNotPaused nonReentrant {\n Staker storage staker = stakers[msg.sender];\n // Stakers can only unstaked stake balance that is unlocked. Stake balance\n // becomes locked when it is used to underwrite a borrow.\n ...
medium
```\nconstructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n}\n```\n
none
```\n // ============================================\n // EMERGENCY WITHDRAWAL FUNCTIONS\n // Needs to be removed when final version deployed\n // ============================================\n function emergencyWithdraw(GlobalConfig globalConfig, address \_token) public {\n address cToken = glob...
medium
```\n function stake(\n uint256 amount_,\n bytes calldata proof_\n ) external nonReentrant requireInitialized updateRewards tryNewEpoch {\n// rest of code\n uint256 userBalance = stakeBalance[msg.sender];\n if (userBalance > 0) {\n // Claim outstanding rewards, this will upd...
medium
```\n// rest of code\n _credit(liquidators[account][newOrderId], accumulationResult.liquidationFee);\n _credit(referrers[account][newOrderId], accumulationResult.subtractiveFee);\n// rest of code\nfunction _credit(address account, UFixed6 amount) private {\n if (amount.isZero()) return;\n\n Local memory new...
medium
```\n sets contract.exists.0xfefe=true\n sets contract.name.0xfefe=test\n sets contract.address.test=0xfefe\n sets contract.abi.test=abi\n```\n
high
```\nIf using contracts such as the ExchangeRouter, Oracle or Reader do note that their addresses will change as new logic is added\n```\n
medium
```\nfunction toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\n return toString(value);\n } else {\n return store;\n }\n}\n```\n
none
```\nfunction setUnlockSigner(address _unlockSigner ) external onlyRole(BRIDGE_MANAGER) {\n unlockSigner = _unlockSigner;\n}\n```\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
```\nFile: src\Tranche.sol\n function redeemWithYT(address from, address to, uint256 pyAmount) external nonReentrant returns (uint256) {\n// rest of code\n accruedInTarget += _computeAccruedInterestInTarget(\n _gscales.maxscale,\n _lscale,\n// rest of code\n _yt.balanceOf(from...
high
```\n // 9 >= 10 is false\n if (currentSignerCount >= maxSigs) {\n revert MaxSignersReached();\n }\n\n // msg.sender is a new signer so he is not yet owner\n if (safe.isOwner(msg.sender)) {\n revert SignerAlreadyClaimed(msg.sender);\n }\n\n // msg.s...
high
```\n\_poolById[poolId].numberOfMakers = uint256(pool.numberOfMakers).safeAdd(1).downcastToUint32();\n```\n
high
```\n/\*\*\n \* @notice allows improsening an Operator if the validator have not been exited until expectedExit\n \* @dev anyone can call this function\n \* @dev if operator has given enough allowence, they can rotate the validators to avoid being prisoned\n \*/\nfunction blameOperator(\n StakePool storage self,\n Data...
medium
```\ndebt_amount: uint256 = self._debt(_position_uid)\n margin_debt_ratio: uint256 = position.margin_amount * PRECISION / debt_amount\n\n\n amount_out_received: uint256 = self._swap(\n position.position_token, position.debt_token, _reduce_by_amount, min_amount_out\n )\n\n\n # reduce margin and debt, ...
high
```\nif (validSignerCount <= target && validSignerCount != currentThreshold) {\n newThreshold = validSignerCount;\n} else if (validSignerCount > target && currentThreshold < target) {\n newThreshold = target;\n}\n```\n
high
```\nfunction tryMul(\n uint256 a,\n uint256 b\n) internal pure returns (bool, uint256) {\n unchecked {\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-contr...
none
```\n if (self.withdrawCache.withdrawParams.token == address(self.WNT)) {\n self.WNT.withdraw(self.withdrawCache.tokensToUser);\naudit transfer ETH and call (bool success, ) = self.withdrawCache.user.call{value: address(this).balance}("");\n require(success, "Transfer failed.");\n } else ...
medium
```\n uint _claimable = claimable[_gauge];\n if (SATIN_CASH_LP_GAUGE == _gauge) {\n veShare = calculateSatinCashLPVeShare(_claimable);\n _claimable -= veShare;\n }\n if (_claimable > IMultiRewardsPool(_gauge).left(token) && _claimable / DURATION > 0) {\n claimable[_gauge] = ...
high
```\nfunction borrow(address account, address token, uint amt)\n external\n whenNotPaused\n onlyOwner(account)\n{\n if (registry.LTokenFor(token) == address(0))\n revert Errors.LTokenUnavailable();\n if (!riskEngine.isBorrowAllowed(account, token, amt))\n revert Errors.RiskThresholdBreached...
medium
```\nfunction _takeLiquidity(uint256 tLiquidity) private {\n uint256 currentRate = _getRate();\n uint256 rLiquidity = tLiquidity * currentRate;\n _rOwned[address(this)] = _rOwned[address(this)] + rLiquidity;\n if(_isExcluded[address(this)])\n _tOwned[address(this)] = _tOwned[address(this)] + tLiquid...
none
```\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 // add the liquidity\n uniswapV2Router.addLiquidityETH{value: ethAmount}(\n address(this),\n ...
none
```\n/\*\* @dev All details needed to Forge with multiple bAssets \*/\nstruct ForgePropsMulti {\n bool isValid; // Flag to signify that forge bAssets have passed validity check\n Basset[] bAssets;\n address[] integrators;\n uint8[] indexes;\n}\n```\n
low
```\nfunction _transferOwnership(address newOwner) internal {\n _owner = newOwner;\n emit OwnershipTransferred(newOwner);\n}\n```\n
none
```\n/// @notice returns the Protocol-Controlled Value, User-circulating FEI, and\n/// Protocol Equity.\n/// @return protocolControlledValue : the total USD value of all assets held\n/// by the protocol.\n/// @return userCirculatingFei : the number of FEI not owned by the protocol.\n/// @return protocolEquity : the dif...
high
```\nfunction setMinFee(address token, uint256 _minFee) public onlyOwner {\n minFee[token] = _minFee;\n}\n```\n
none
```\nFile: ProportionalRebalancingStrategy.sol\n function calculateRebalance(\n IPrimeCashHoldingsOracle oracle,\n uint8[] calldata rebalancingTargets\n ) external view override onlyNotional returns (RebalancingData memory rebalancingData) {\n address[] memory holdings = oracle.holdings();\n....
medium
```\nfunction withdrawTokens(address to, uint256 amount) external onlyController {\n TransferHelper.withdrawTokens(token, to, amount);\n if (IERC20(token).balanceOf(address(this)) == 0) selfdestruct;\n}\n```\n
low
```\n// can we reproduce the same hash from the raw claim metadata?\nrequire(hashMatch(user\_id, user\_address, user\_amount, delegate\_address, leaf, eth\_signed\_message\_hash\_hex), 'TokenDistributor: Hash Mismatch.');\n```\n
low
```\nfunction _transferBothExcluded(\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, uint...
none
```\n(, int256 price, , , ) = priceFeedDAIETH.latestRoundData();\n\nreturn\n (wethPriceUSD * 1e18) /\n ((DAIWethPrice + uint256(price) * 1e10) / 2);\n```\n
medium
```\nuint256 shares = \_deposit(to, tokenAmount);\n\n// Transfer Token Transfer Message Sender\nIERC20Upgradeable(token).transferFrom(\n msg.sender,\n address(this),\n tokenAmount\n);\n```\n
high
```\nfunction beforeRebalanceChecks(\n GMXTypes.Store storage self,\n GMXTypes.RebalanceType rebalanceType\n) external view {\n if (\n self.status != GMXTypes.Status.Open &&\n self.status != GMXTypes.Status.Rebalance_Open\n ) revert Errors.NotAllowedInCurrentVaultStatus();\n\n // Check that rebalance type is...
low
```\nfunction lastPublicMintingSale() external payable returns (bool) {\n if ((block.timestamp >= defaultSaleStartTime + DEFAULT_TEAMMINT_SALE)) {\n _tokenIds++;\n\n if (_tokenIds > DEFAULT_MAX_MINTING_SUPPLY)\n revert MaximumMintSupplyReached();\n\n if (lastPublicSale[msg.sender] >= ...
none
```\nfunction _transfer(\n address from,\n address to,\n uint256 amount\n) internal override {\n require(from != address(0), "ERC20: transfer from the zero address");\n require(to != address(0), "ERC20: transfer to the zero address");\n require(!blocked[from], "Sniper blocked");\n\n if (amount == 0...
none
```\n// Check header chain length\nif (\_headers.length % 80 != 0) {return ERR\_BAD\_LENGTH;}\n```\n
low
```\n function updateImpact(uint32 newImpact) external onlyOwner {\n emit UpdateImpact(impact, newImpact);\n impact = newImpact;\n }\n```\n
medium
```\ncontract FortaStaking is BaseComponentUpgradeable, ERC1155SupplyUpgradeable, SubjectTypeValidator, ISlashingExecutor, IStakeMigrator {\n```\n
medium
```\nActionInfo memory deleverInfo = _createAndValidateActionInfo(\n _setToken,\n _collateralAsset,\n _repayAsset,\n _redeemQuantityUnits,\n _minRepayQuantityUnits,\n _tradeAdapterName,\n false\n );\n```\n
medium
```\nfunction stakeFor(address _for, uint256 _amount)\n public\n returns(bool)\n{\n _processStake(_amount, _for);\n\n //take away from sender\n stakingToken.safeTransferFrom(msg.sender, address(this), _amount);\n emit Staked(_for, _amount);\n \n return true;\n}\n```\n
high
```\n/\*\*\n \* @dev Harvest additional yield from the investment.\n \* Only governance or strategist can call this function.\n \*/\nfunction harvest(address[] calldata \_tokens, uint256[] calldata \_cumulativeAmounts, uint256 \_index, uint256 \_cycle,\n```\n
low
```\n// The upper 16 bytes represent the pool id, so this would be pool id 1. See MixinStakinPool for more information.\nbytes32 constant internal INITIAL\_POOL\_ID = 0x0000000000000000000000000000000100000000000000000000000000000000;\n\n// The upper 16 bytes represent the pool id, so this would be an increment of 1. S...
low
```\nconstructor() {\n _status = _NOT_ENTERED;\n}\n```\n
none
```\n function _processPendingPosition(Context memory context, Position memory newPendingPosition) private {\n context.pendingCollateral = context.pendingCollateral\n .sub(newPendingPosition.fee)\n .sub(Fixed6Lib.from(newPendingPosition.keeper));\n \n context.closable = c...
medium
```\n function _getCurrentSqrtPriceX96(\n bool zeroForA,\n address tokenA,\n address tokenB,\n uint24 fee\n ) private view returns (uint160 sqrtPriceX96) {\n if (!zeroForA) {\n (tokenA, tokenB) = (tokenB, tokenA);\n }\n address poolAddress = computePool...
high
```\n function withdrawToken(\n address from,\n address token,\n address receiver,\n uint256 sGlpAmount\n ) external returns (uint256 amountOut) {\n // user has approved periphery to use junior vault shares\n dnGmxJuniorVault.withdraw(sGlpAmount, address(this), from);\n//...
high
```\ntransaction.data = abi.encodeWithSelector(\n IUniswapV2Router01.swapExactETHForTokens.selector,\n 0,\n path,\n msg.sender,\n type(uint256).max\n);\n```\n
medium
```\nwhitelistingAddress = \_whitelistingAddress;\nprojectAddress = \_projectAddress;\nfreezerAddress = \_projectAddress; // TODO change, here only for testing\nrescuerAddress = \_projectAddress; // TODO change, here only for testing\n```\n
medium
```\n require(IERC20(outputTokenAddress).balanceOf(address(this)) >= \n (totalAllocatedOutputToken - totalReleasedOutputToken), \n "INSUFFICIENT_OUTPUT_TOKEN");\n IERC20(inputTokenAddress).transferFrom(msg.sender, address(0), \n _inputTokenAmount);\n```\n
high
```\nif (leaderboard.length == MAX\_LEADERBOARD\_SIZE.add(1)) {\n leaderboard.pop();\n}\n```\n
low
```\nFile: GMXWithdraw.sol#processWithdraw\nself.vault.burn(self.withdrawCache.user, self.withdrawCache.withdrawParams.shareAmt);\n```\n
high