function
stringlengths
12
63.3k
severity
stringclasses
4 values
```\nuint256 messageNumber = nextMessageNumber;\nuint256 valueSent = msg.value - \_fee;\n\nbytes32 messageHash = keccak256(abi.encode(msg.sender, \_to, \_fee, valueSent, messageNumber, \_calldata));\n```\n
high
```\n // Loop through each money market and withdraw all the tokens\n for (uint256 i = 0; i < moneyMarketsLength; i++) {\n IMoneyMarketAdapter moneyMarket = moneyMarkets[i];\n if (!moneyMarket.supportsToken(tokenAddress)) continue;\n moneyMarket.withdrawAll(tokenAddress, address(this));\n\n ...
medium
```\n function canInitSwap(address subAccount, address inputToken, uint256 interval, uint256 lastSwap)\n external view returns (bool)\n {\n if (hasZeroBalance(subAccount, inputToken)) \n { return false;\n }\n return ((lastSwap + interval) < block.timestamp);\n }\n```\...
high
```\nRocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));\nif (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) {\n setMinipoolWithdrawable(\_minipoolAdd...
medium
```\nbytes32 resultHash = keccak256(abi.encodePacked(groupPubKey, misbehaved));\n```\n
medium
```\n function blacklistProtocol(uint256 _protocolNum) external onlyGuardian {\n uint256 balanceProtocol = balanceUnderlying(_protocolNum);\n currentAllocations[_protocolNum] = 0;\n controller.setProtocolBlacklist(vaultNumber, _protocolNum);\n savedTotalUnderlying -= balanceProtocol;\n withdrawFromProto...
medium
```\nfunction setWhitelistStatus(address _wallet, bool _status) external onlyOwner {\n whitelisted[_wallet] = _status;\n emit Whitelist(_wallet, _status);\n}\n```\n
none
```\n function _revertOnMinDebt(\n LoansState storage loans_,\n uint256 poolDebt_,\n uint256 borrowerDebt_,\n uint256 quoteDust_\n ) view {\n if (borrowerDebt_ != 0) {\n uint256 loansCount = Loans.noOfLoans(loans_);\n if (loansCount >= 10) {\n ...
medium
```\nfunction log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n...
none
```\n function getTargetExternalLendingAmount(\n Token memory underlyingToken,\n PrimeCashFactors memory factors,\n RebalancingTargetData memory rebalancingTargetData,\n OracleData memory oracleData,\n PrimeRate memory pr\n ) internal pure returns (uint256 targetAmount) {\n// re...
medium
```\nfunction updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _devFee, uint256 _earlySellLiquidityFee, uint256 _earlySellMarketingFee) external onlyOwner {\n sellMarketingFee = _marketingFee;\n sellLiquidityFee = _liquidityFee;\n sellDevFee = _devFee;\n earlySellLiquidityFee = _earlySel...
none
```\nfunction setSell() private {\n _taxFee = sellFee.tax;\n _liquidityFee = sellFee.liquidity;\n _marketingFee = sellFee.marketing;\n _donationFee = sellFee.donation;\n _devFee = sellFee.dev;\n}\n```\n
none
```\n// @audit-issue Wrong computation\nuint256 amountToSellUnits = IERC20Upgradeable(collateral[i].token).balanceOf(USSD) * ((amountToBuyLeftUSD * 1e18 / collateralval) / 1e18) / 1e18;\n```\n
high
```\nfunction deposit(GMXTypes.DepositParams memory dp) external payable nonReentrant {\n GMXDeposit.deposit(_store, dp, false);\n }\n\nstruct DepositParams {\n // Address of token depositing; can be tokenA, tokenB or lpToken\n address token;\n // Amount of token to deposit in token decimals\n uin...
high
```\nfunction _executeTrade(\n address target,\n uint256 msgValue,\n bytes memory params,\n address spender,\n Trade memory trade\n) private {\n uint256 preTradeBalance;\n\n if (trade.sellToken == address(Deployments.WETH) && spender == Deployments.ETH_ADDRESS) {\n preTradeBalance = address(...
high
```\n address burnToken = address(ISoftVault(strategy.vault).uToken());\n if (collSize > 0) {\n if (posCollToken != address(wrapper))\n revert Errors.INCORRECT_COLTOKEN(posCollToken);\n bank.takeCollateral(collSize);\n wrapper.burn(burnToken, collSize);\n ...
medium
```\n function setIncentiveSettings(IncentiveSettings memory _newIncentiveSettings) external onlyOperator noRebalanceInProgress {\n incentive = _newIncentiveSettings;\n\n _validateNonExchangeSettings(methodology, execution, incentive);\n\n emit IncentiveSettingsUpdated(\n incentive.et...
medium
```\n function claimRemainings() external {\n if (block.timestamp <= endingTimestamp) {\n revert RedemptionPeriodNotFinished();\n }\n\n // Sending the token to the burning address\n token.transfer(DEAD_ADDRESS, token.balanceOf(address(this)));\n recipient.call{value: address(th...
none
```\nfunction _setMaxWalletSizePercent(uint256 maxWalletSize)\n external\n onlyOwner\n{\n _maxWalletSize = _tTotal.mul(maxWalletSize).div(10**3);\n}\n```\n
none
```\noffTargetPercentage = abs(90 - 100) / (100 + 90) = 10 / 190 = 0.0526 = 5.26%\n```\n
medium
```\nfunction sendInterests(Loan storage loan, Provision storage provision) internal returns (uint256 sent) {\n uint256 interests = loan.payment.paid - loan.lent;\n if (interests == loan.payment.minInterestsToRepay) {\n // this is the case if the loan is repaid shortly after issuance\n // each lende...
medium
```\nfunction setPresaleWallet(address wallet) external onlyOwner {\n canTransferBeforeTradingIsEnabled[wallet] = true;\n _isExcludedFromFees[wallet] = true;\n dividendTracker.excludeFromDividends(wallet);\n emit SetPreSaleWallet(wallet);\n}\n```\n
none
```\n/// @notice Sets up starting delegate contract and then delegates initialisation to it\nfunction initialise(address \_rocketStorage, address \_nodeAddress) external override notSelf {\n // Check input\n require(\_nodeAddress != address(0), "Invalid node address");\n require(storageState == StorageState.Un...
low
```\nreceive() external payable {}\n```\n
none
```\nif (\_isPurchased[delegationId]) {\n address holder = delegation.holder;\n \_totalDelegated[holder] += delegation.amount;\n if (\_totalDelegated[holder] >= \_purchased[holder]) {\n purchasedToUnlocked(holder);\n }\n}\n```\n
high
```\nfunction _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (...
none
```\n(bool success, bytes memory result) = addressAt(routeId).delegatecall(\n```\n
high
```\nfunction swapbackValues()\n external\n view\n returns (\n bool _swapbackEnabled,\n uint256 _swapBackValueMin,\n uint256 _swapBackValueMax\n )\n{\n _swapbackEnabled = swapbackEnabled;\n _swapBackValueMin = swapBackValueMin;\n _swapBackValueMax = swapBackValueMax;\n}\n```\n
none
```\nfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n}\n```\n
none
```\nfunction unlockStake() external {\n DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, "not staked");\n require(info.staked, "already unstaking");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info....
none
```\nfunction _setMinThreshold(uint256 _minThreshold) internal {\n if (_minThreshold > maxSigners || _minThreshold > targetThreshold) {\n revert InvalidMinThreshold();\n }\n\n minThreshold = _minThreshold;\n}\n```\n
medium
```\nfunction setFlashCloseFee(uint64 \_newFactorA, uint64 \_newFactorB) external isAuthorized {\n flashCloseF.a = \_newFactorA;\n flashCloseF.b = \_newFactorB;\n```\n
medium
```\nif (value > 0) {\n totalERC20Claimed[_token][_to] += value;\n _token.transfer(_to, value);\n}\n```\n
medium
```\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
```\nfallback() external payable {\n revert("DCBW721: Please use Mint or Admin calls");\n}\n```\n
none
```\nfunction _createActionInfo() internal view returns(ActionInfo memory) {\n ActionInfo memory rebalanceInfo;\n\n // Calculate prices from chainlink. Chainlink returns prices with 8 decimal places, but we need 36 - underlyingDecimals decimal places.\n // This is so that when the underlying amount...
medium
```\nFile: BondBaseSDA.sol\n // Set last decay timestamp based on size of purchase to linearize decay\n uint256 lastDecayIncrement = debtDecayInterval.mulDiv(payout_, lastTuneDebt);\n metadata[id_].lastDecay += uint48(lastDecayIncrement);\n```\n
medium
```\nfunction test_ExtendLock_AlreadyEnded() external {\n uint256 amount = 100e18;\n uint256 duration = 5 days;\n\n _stake(amount, duration, alice, alice);\n\n // 5 days later, lock is ended for Alice\n skip(5 days + 1);\n\n (,, uint128 _ends,,) = veTRUF.lockups(alice, 0);\n\n ...
medium
```\nfor (uint256 i = 0; i < redeemableTokens.length; i++) {\n vaultTokenBalance = vault.balance(redeemableTokens[i]);\n\n redemptionAmount = \_burnableAmount.mul(vaultTokenBalance).div(burnableTokenTotalSupply);\n totalRedemptionAmount = totalRedemptionAmount.add(redemptionAmount);\n\n if (redemptionAmount...
medium
```\n// // Refund Base Token if any\nif (totalRefundBaseTokens > 0) {\n baseToken.safeTransferFrom(address(this), \_recipient, baseTokenID, totalRefundBaseTokens, "");\n}\n\n// Send Tokens all tokens purchased\ntoken.safeBatchTransferFrom(address(this), \_recipient, \_tokenIds, \_tokensBoughtAmounts, "");\n```\n
medium
```\nISwapToken public swapToken;\n```\n
low
```\n function withdrawalRequest(\n uint256 _amount\n ) external nonReentrant onlyWhenVaultIsOn returns (uint256 value) {\n UserInfo storage user = userInfo[msg.sender];\n require(user.withdrawalRequestPeriod == 0, "Already a request");\n\n value = (_amount * exchangeRate) / (10 ** decimals());\n\n _bu...
medium
```\nenum OrderStatus {EXPIRED, CANCELLED, FILLABLE, FULLY\_FILLED}\n```\n
low
```\nfunction getRewardsSupply() public view returns (uint256) {\n return _totalSupply - getExcludedBalances();\n}\n```\n
none
```\nfunction sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n}\n```\n
none
```\nfunction getOffsetOfMemoryBytes(bytes memory data) internal pure returns (uint256 offset) {\n assembly {offset := data}\n}\n```\n
none
```\nfunction isExcludedFromFees(address account) public view returns (bool) {\n return _isExcludedFromFees[account];\n}\n```\n
none
```\nfunction reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {\n require(tAmount <= _tTotal, "Amount must be less than supply");\n if (!deductTransferFee) {\n (uint256 rAmount,,,,,) = _getValues(tAmount);\n return rAmount;\n } else {\n (,uint256 r...
none
```\nfunction setupVoting(uint256 planId) external nonReentrant returns (address votingVault) {\n votingVault = \_setupVoting(msg.sender, planId);\n```\n
low
```\nfunction bridgeAfterSwap(\n```\n
medium
```\n/\*\*\n\* @notice Checks whether a transaction is "standard finalized"\n\* @dev MVP: requires that both inclusion proof and confirm signature is checked\n\* @dev MoreVp: checks inclusion proof only\n\*/\nfunction isStandardFinalized(Model.Data memory data) public view returns (bool) {\n if (data.protocol == Pro...
medium
```\nfunction ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n}\n```\n
none
```\nfunction updateSwapEnabled(bool enabled) external onlyOwner(){\n swapEnabled = enabled;\n}\n```\n
none
```\nfunction distributeERC20(\n address split,\n ERC20 token,\n address[] calldata accounts,\n uint32[] calldata percentAllocations,\n uint32 distributorFee,\n address distributorAddress\n) external override validSplit(accounts, percentAllocations, distributorFee) {\n // use internal fn instead of modifier to a...
none
```\naddress underlying = getUnderlyingAddress(_vaultNumber, _chain);\nuint256 balance = IERC20(underlying).balanceOf(address(this));\n```\n
medium
```\nfunction functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n}\n```\n
none
```\n } else {\n // Default to PaymentType.EMI\n // Max payable amount in a cycle\n // NOTE: the last cycle could have less than the calculated payment amount\n uint256 maxCycleOwed = isLastPaymentCycle\n ? owedPrincipal_ + interest_\n : _...
medium
```\nmodifier onlyWhenUnderlyingsReceived(uint256 _vaultNumber) {\n require(\n vaultStage[_vaultNumber].underlyingReceived == vaultStage[_vaultNumber].activeVaults,\n "Not all underlyings received"\n );\n _;\n}\n```\n
medium
```\nfunction latestRoundData(\n address base,\n address quote\n)\n external\n view\n override\n checkPairAccess()\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n{\n uint16 currentPhaseId = s_currentPhaseId[base][quote];\n ...
medium
```\n // sell wETH\n uint256 wethBalance = inversed ? amount1Current : amount0Current;\n if (wethBalance < minAmount) return 0;\n```\n
low
```\nfunction isTokenMinted(uint256 _tokenId) public view returns (bool) {\n return validateTokenId(_tokenId) && _exists(_tokenId);\n}\n```\n
none
```\nfunction _setAutomatedMarketMakerPair(address pair, bool value) private {\n automatedMarketMakerPairs[pair] = value;\n\n emit SetAutomatedMarketMakerPair(pair, value);\n}\n```\n
none
```\nfunction pauseCollateralType(\n address _collateralAddress,\n bytes32 _currencyKey\n ) external collateralExists(_collateralAddress) onlyAdmin {\n require(_collateralAddress != address(0)); //this should get caught by the collateralExists check but just to be careful\n //checks two inputs to help pr...
high
```\nfunction recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n}\n```\n
none
```\nuint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired\nif (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {\n // * never overflows, and + overflow is desired\n price0CumulativeLast += uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;\n price1CumulativeLa...
medium
```\nfor (uint256 w = fromWeek\_; w < toWeek\_; ++w) {\n incomeMap[policyIndex\_][w] =\n incomeMap[policyIndex\_][w].add(premium);\n coveredMap[policyIndex\_][w] =\n coveredMap[policyIndex\_][w].add(amount\_);\n\n require(coveredMap[policyIndex\_][w] <= maximumToCover,\n "Not enough to buy");\n\n coverageMap[policyInde...
high
```\nfunction liquidate(\n address account,\n IProduct product\n ) external nonReentrant notPaused isProduct(product) settleForAccount(account, product) {\n if (product.isLiquidating(account)) revert CollateralAccountLiquidatingError(account);\n\n UFixed18 totalMaintenance = product.maint...
medium
```\n// CouncilMember.sol\n\nfunction _retrieve() internal {\n // rest of code\n // Execute the withdrawal from the _target, which might be a Sablier stream or another protocol\n _stream.execute(\n _target,\n abi.encodeWithSelector(\n ISablierV2ProxyTarget.withd...
high
```\nif (BBTotSupply == 0) {\n // if there are no BB holders, all gain to AA\n AAGain = gain;\n} else if (AATotSupply == 0) {\n // if there are no AA holders, all gain to BB\n BBGain = gain;\n} else {\n // split the gain between AA and BB holders according to trancheAPRSplitRatio\n AAGain = gain \* trancheAPRSpli...
medium
```\nfunction enableTrading() external onlyOwner {\n require(!tradingEnabled, "Trading is already enabled");\n tradingEnabled = true;\n startTradingBlock = block.number;\n}\n```\n
none
```\n/\*\* @dev Status of the Basset - has it broken its peg? \*/\nenum BassetStatus {\n Default,\n Normal,\n BrokenBelowPeg,\n BrokenAbovePeg,\n Blacklisted,\n Liquidating,\n Liquidated,\n Failed\n}\n```\n
low
```\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n```\n
medium
```\nfunction _functionCallWithValue(\n address target,\n bytes memory data,\n uint256 weiValue,\n string memory errorMessage\n) private returns (bytes memory) {\n require(isContract(target), "Address: call to non-contract");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, b...
none
```\n for (uint i; i < _statuses.length; ) {\n whitelistedRouters[_routers[i]] = _statuses[i];\n if (_statuses[i]) {\n routerTypes[_routers[i]] = _types[i];\n emit SetRouterType(_routers[i], _types[i]);\n }\n emit SetWhitelistedRouter(_router...
medium
```\n// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.17;\n\nimport "forge-std/Test.sol";\n\nimport {MAX_RATE, DEFAULT_ANTE, DEFAULT_N_SIGMA, LIQUIDATION_INCENTIVE} from "src/libraries/constants/Constants.sol";\nimport {Q96} from "src/libraries/constants/Q.sol";\nimport {zip} from "src/libraries/Positions...
high
```\nfunction getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator.createSender(initCode);\n revert SenderAddressResult(sender);\n}\n```\n
none
```\nFile: SFrxETHAdapter.sol\n/// @title SFrxETHAdapter - esfrxETH\n/// @dev Important security note:\n/// 1. The vault share price (esfrxETH / WETH) increases as sfrxETH accrues staking rewards.\n/// However, the share price decreases when frxETH (sfrxETH) is withdrawn.\n/// Withdrawals are processed by the FraxEther...
medium
```\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
```\nfunction \_updateL1L2MessageStatusToReceived(bytes32[] memory \_messageHashes) internal {\n uint256 messageHashArrayLength = \_messageHashes.length;\n\n for (uint256 i; i < messageHashArrayLength; ) {\n bytes32 messageHash = \_messageHashes[i];\n uint256 existingStatus = outboxL1L2MessageStatus[messageHash];\n\n i...
low
```\nfunction confiscate(uint validatorId, uint amount) external {\n uint currentMonth = getCurrentMonth();\n Fraction memory coefficient = reduce(\_delegatedToValidator[validatorId], amount, currentMonth);\n reduce(\_effectiveDelegatedToValidator[validatorId], coefficient, currentMonth);\n putToSlashingLog...
high
```\nfunction acceptBid(bytes memory signature, uint256 rand, address bidder, uint256 bid, address nftaddress, uint256 tokenid) external {\n address recoveredbidder = recover(toEthSignedMessageHash(keccak256(abi.encode(rand, address(this), block.chainid, bid, nftaddress, tokenid))), signature);\n require(bidder =...
low
```\nrequire(first > 0xf7, "invalid offset");\nuint8 offset = first - 0xf7 + 2;\n\n/// we are using assembly because it's the most efficent way to access the parent blockhash within the rlp-encoded blockheader\n// solium-disable-next-line security/no-inline-assembly\nassembly { // solhint-disable-line no-inline-assembl...
low
```\nfunction distributeFee() public {\n require(distributingFee == false, "VoxNET: reentry prohibited");\n distributingFee = true;\n\n uint tokensToSell = balanceOf[address(this)];\n\n if (tokensToSell > 0) {\n address[] memory path = new address[](2);\n path[0] = address(this);\n path...
none
```\nif (block.timestamp < uint256(epochStart)) revert EpochNotStarted();\n```\n
medium
```\nFile: BondBaseSDA.sol\n // Circuit breaker. If max debt is breached, the market is closed\n if (term.maxDebt < market.totalDebt) {\n _close(id_);\n } else {\n // If market will continue, the control variable is tuned to to expend remaining capacity over remaining market d...
medium
```\nfunction deposit(address to) external override lock returns (uint256 amountBaseOut) {\n require(msg.sender == router, 'DAOfiV1: FORBIDDEN\_DEPOSIT');\n```\n
medium
```\nFile: LimitOrderRegistry.sol\n function claimOrder(uint128 batchId, address user) external payable returns (ERC20, uint256) {\n..SNIP..\n // Transfer tokens owed to user.\n tokenOut.safeTransfer(user, owed);\n\n // Transfer fee in.\n address sender = _msgSender();\n if (msg.va...
high
```\n function unlock(ISetToken _setToken) external {\n bool isRebalanceDurationElapsed = _isRebalanceDurationElapsed(_setToken);\n bool canUnlockEarly = _canUnlockEarly(_setToken);\n\n // Ensure that either the rebalance duration has elapsed or the conditions for early unlock are met\n r...
medium
```\nfunction setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {\n require(_frequencyInSeconds >= 600, "cannot set buyback more often than every 10 minutes");\n require(_percent <= 1000 && _percent >= 0, "Must set auto LP burn percent between 0% and 10%");\n ...
none
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n
none
```\naddress public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// rest of code\n\n// Only need ability to check for read-only reentrancy for pools containing native Eth.\nif (checkReentrancy) {\n if (tokens[0] != ETH && tokens[1] != ETH) revert MustHaveEthForReentrancy();\n}\n```\n
high
```\nfunction reduce(PartialDifferencesValue storage sequence, uint amount, uint month) internal returns (Fraction memory) {\n require(month.add(1) >= sequence.firstUnprocessedMonth, "Can't reduce value in the past");\n if (sequence.firstUnprocessedMonth == 0) {\n return createFraction(0);\n }\n uint...
low
```\nfunction pause() public onlyOwnerOrPauser {\n _pause();\n}\n```\n
medium
```\n (\n uint256[] memory minAmountsOut,\n address[] memory tokens,\n uint256 borrowTokenIndex\n ) = _getExitPoolParams(param.borrowToken, lpToken);\n\n wAuraPools.getVault(lpToken).exitPool(\n IBalancerPool(lpToken).getPoolId...
medium
```\nlibrary LibMathUnsigned {\n uint256 private constant \_WAD = 10\*\*18;\n uint256 private constant \_UINT256\_MAX = 2\*\*255 - 1;\n```\n
low
```\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
```\n// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.17;\n\nimport { FlashBorrower, Flashloan, IERC20Token } from "./FlashLoan.sol";\nimport { Pool } from "./../../src/Pool.sol";\n\ncontract Borrower is FlashBorrower {\n address public immutable owner;\n Flashloan public immutable flashLoan;\n Pool...
medium
```\nif (maxLoanDur(fund) > 0) {\n require(loanDur\_ <= maxLoanDur(fund));\n} else {\n require(now + loanDur\_ <= maxFundDur(fund));\n}\n```\n
medium
```\n constructor(address auctionHouse_) LinearVesting(auctionHouse_) BlastGas(auctionHouse_) {}\n```\n
high
```\n 2) Admin can configure new markets and epochs on those markets, Timelock can make cirital changes like changing the oracle or whitelisitng controllers.\n```\n
medium