function
stringlengths
12
7.23k
severity
stringclasses
4 values
```\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/**\n * @notice Deposit underlying assets on Compound and issue share token\n * @param amount Underlying token amount to deposit\n * @return shareAmount cToken amount\n */\nfunction deposit(address token, uint256 amount) { // rest of code }\n\n/**\n * @notice Withdraw underlying assets from Compound...
medium
```\nfor (uint256 i = 0; i < rocketDAOProtocolSettingsDeposit.getMaximumDepositAssignments(); ++i) {\n // Get & check next available minipool capacity\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
```\n function _beforeTokenTransfer(address from, address to, uint256) internal virtual override {\n // Restrictions ignored for minting and burning\n // If transferRestrictor is not set, no restrictions are applied\n\n // @audit\n // why don't you not apply mint and burn in blacklist?\n ...
high
```\nfunction testGetFundingAmountPerSizeDelta() public{\n uint result = MarketUtils.getFundingAmountPerSizeDelta(2e15, 1e15+1, true);\n console2.log("result: %d", result);\n uint256 correctResult = 2e15 * 1e15 * 1e30 + 1e15; // this is a real round up\n correctResult = correctResult/(1e15+1...
medium
```\nfunction includeInRewards(address wallet) external onlyOwner {\n require(isAddressExcluded[wallet], "Address is not excluded from rewards");\n for (uint i = 0; i < excludedFromRewards.length; i++) {\n if (excludedFromRewards[i] == wallet) {\n isAddressExcluded[wallet] = false;\n ...
none
```\nfunction adminMint(address to, uint256 _tokenId)\n external\n whenNotPaused\n ownerOrMinter\n requireState(DrawState.Closed)\n{\n require(to != address(0), "DCBW721: Address cannot be 0");\n\n validateTokenId(_tokenId);\n\n _safeMint(to, _tokenId);\n\n emit AdminMinted(to, _tokenId);\n}\n``...
none
```\nfunction initialize\_1(\n address \_admin,\n address \_treasury,\n address \_depositContract,\n address \_elDispatcher,\n address \_clDispatcher,\n address \_feeRecipientImplementation,\n uint256 \_globalFee,\n uint256 \_operatorFee,\n uint256 globalCommissionLimitBPS,\n uint256 operatorCommissionLimitBPS\n) exter...
medium
```\nfunction _transferStandard(address sender, address recipient, uint256 tAmount) private {\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[...
none
```\n function _isActive(Hat memory _hat, uint256 _hatId) internal view returns (bool) {\n bytes memory data = \n abi.encodeWithSignature("getHatStatus(uint256)", _hatId);\n (bool success, bytes memory returndata) = \n _hat.toggle.staticcall(data);\n if (success &...
low
```\nfunction sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n}\n```\n
none
```\n if (token == quoteAsset || token == baseAsset || token == weth) {\n revert CannotRecoverRestrictedToken(address(this));\n }\n token.transfer(recipient, token.balanceOf(address(this)));\n```\n
medium
```\nfile: QVBaseStrategy.sol\n function reviewRecipients(address[] calldata _recipientIds, Status[] calldata _recipientStatuses)\n external\n virtual\n onlyPoolManager(msg.sender)\n onlyActiveRegistration\n {\n // make sure the arrays are the same length\n uint256 recipi...
medium
```\nfunction _validateSigner(\n uint256 timestamp,\n address asset,\n uint256 price,\n bytes memory signature\n) internal view returns (bool) {\n bytes32 digest = ECDSA.toEthSignedMessageHash(\n keccak256(abi.encodePacked(timestamp, asset, price))\n );\n address recoveredSigner = ECDSA.reco...
medium
```\n//PriceOracle.sol\n//_setAggregators()\n require(\n aggrs[i].quote == Denominations.ETH ||\n aggrs[i].quote == Denominations.USD,\n "unsupported quote"\n );\n```\n
medium
```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n}\n```\n
none
```\nfunction functionCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n{\n return functionCall(target, data, "Address: low-level call failed");\n}\n```\n
none
```\nfunction _transfer(address from, address to, uint256 amount) 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 uint256 RewardsFee;\n uint256 deadFees;\n uint256 marketingFees;\n uint256...
none
```\nfunction _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {...
none
```\nfunction _castVote(address _voter, uint256 _proposalId, uint8 _support) internal returns (uint) {\n // Only Active proposals can be voted on\n if (state(_proposalId) != ProposalState.Active) revert InvalidStatus();\n \n // Only valid values for _support are 0 (against), 1 (for), and 2 (abstain)\n if...
medium
```\nfunction setFeesBuy(\n uint256 _marketingFee,\n uint256 _devFee\n) external onlyOwner {\n buyMarketingTax = _marketingFee;\n buyProjectTax = _devFee;\n buyTaxTotal = buyMarketingTax + buyProjectTax;\n require(buyTaxTotal <= 100, "Total buy fee cannot be higher than 100%");\n emit BuyFeeUpdated...
none
```\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
```\n(\n uint256 initialPrice,\n uint256 scalingFactor,\n uint256 timeCoefficient,\n uint256 bucketSize,\n bool isDecreasing,\n uint256 maxPrice,\n uint256 minPrice\n) = getDecodedData(_priceAdapterConfigData);\n\nuint256 timeBucket = _timeElapsed / bucketSize;\n\nint256 expArgument = int256(timeCo...
medium
```\nconstructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n}\n```\n
none
```\nif (validSignerCount > maxSigners) {\n revert MaxSignersReached();\n}\n```\n
high
```\n * @notice Withdraws deposited collateral from the created escrow of a bid that has been successfully repaid.\n * @param _bidId The id of the bid to withdraw collateral for.\n */\n function withdraw(uint256 _bidId) external {\n BidState bidState = tellerV2.getBidState(_bidId);\n consol...
medium
```\n\_poolById[poolId].numberOfMakers = uint256(\_poolById[poolId].numberOfMakers).safeSub(1).downcastToUint32();\n```\n
medium
```\n/// @notice Goes from courtesy call to active\n/// @dev Only callable if collateral is sufficient and the deposit is not expiring\n/// @param \_d deposit storage pointer\nfunction exitCourtesyCall(DepositUtils.Deposit storage \_d) public {\n require(\_d.inCourtesyCall(), "Not currently in courtesy call");\n ...
low
```\nfunction repayBorrow(uint256 repayAmount) external returns (uint256);\n```\n
high
```\nfunction changeIsFeeExempt(address holder, bool exempt) external onlyOwner {\n isFeeExempt[holder] = exempt;\n}\n```\n
none
```\n/// @notice Set allowance for other address and notify.\n/// Allows `\_spender` to transfer the specified TDT\n/// on your behalf and then ping the contract about it.\n/// @dev The `\_spender` should implement the `tokenRecipient` interface below\n/// to receive approval notifications.\n/// @param \_spender Addres...
low
```\nfunction priceCollateralToUSD(bytes32 _currencyKey, uint256 _amount) public view override returns(uint256){\n //The LiquidityPool associated with the LP Token is used for pricing\n ILiquidityPoolAvalon LiquidityPool = ILiquidityPoolAvalon(collateralBook.liquidityPoolOf(_currencyKey));\n //we have already...
medium
```\n function redeem(bytes32 _termsHash, uint256 tokenAmount) public {\n if (blocklist.isBlocklisted(msg.sender)) {\n revert AddressBlocklisted();\n }\n if (termsHash != _termsHash) {\n revert TermsNotCorrect();\n }\n if (block.timestamp > endingTimestamp) {\n ...
none
```\nuint256[] memory liens = LIEN_TOKEN.getLiens(tokenId);\nuint256 totalLienAmount = 0;\nif (liens.length > 0) {\n for (uint256 i = 0; i < liens.length; ++i) {\n uint256 payment;\n uint256 lienId = liens[i];\n\n ILienToken.Lien memory lien = LIEN_TOKEN.getLien(lienId);\n\n if (transferAmount >= lien.amou...
high
```\n it('5) Grief xChainController send funds to vaults', async function () {\n await xChainController.sendFundsToVault(vaultNumber, slippage, 10000, 0, { value: 0, });\n await xChainController.sendFundsToVault(vaultNumber, slippage, 10000, 0, { value: 0, });\n await xChainController.sendFundsToVault(vaultNu...
medium
```\nFile: TellerV2.sol\n\n if (bidDefaultDuration[_bidId] == 0) return false;\n```\n
medium
```\n(address[] memory modules,) = GnosisSafe(payable(_safe)).getModulesPaginated(SENTINEL_MODULES, 5);\nuint256 existingModuleCount = modules.length;\n```\n
medium
```\nFile: VaultLiquidationAction.sol\n function _authenticateDeleverage(\n address account,\n address vault,\n address liquidator\n ) private returns (\n VaultConfig memory vaultConfig,\n VaultAccount memory vaultAccount,\n VaultState memory vaultState\n ) {\n ...
medium
```\naddress pair = GoatV1Factory(FACTORY).getPool(token);\n\nIERC20(pair).safeTransferFrom(msg.sender, pair, liquidity); //-> 1. Transfers liquidity tokens to the pair\n(amountWeth, amountToken) = GoatV1Pair(pair).burn(to); //-> 2. Burns the liquidity tokens and sends WETH and TOKEN to the recipient\nif (amountWeth < ...
medium
```\nFile: Boosted3TokenPoolMixin.sol\n function _underlyingPoolContext(ILinearPool underlyingPool) private view returns (UnderlyingPoolContext memory) {\n (uint256 lowerTarget, uint256 upperTarget) = underlyingPool.getTargets();\n uint256 mainIndex = underlyingPool.getMainIndex();\n uint256 wra...
high
```\nfunction testnew_GaugePointAdjustment() public {\n uint256 currentGaugePoints = 1189; \n uint256 optimalPercentDepositedBdv = 64; \n uint256 percentOfDepositedBdv = 64; \n\n uint256 newGaugePoints = gaugePointFacet.defaultGaugePointFunction(\n currentGaugePoints,\n optimalPercentDeposited...
medium
```\nfunction functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n}\n```\n
none
```\nfunction isBlackListed(address account) public view returns (bool) {\n return _isBlackListedBot[account];\n}\n```\n
none
```\nIAccount(account).updateActionTimestampByCreditor();\n\nasset.safeTransfer(actionTarget, amountBorrowed);\n\n{\n uint256 accountVersion = IAccount(account).flashActionByCreditor(actionTarget, actionData);\n if (!isValidVersion[accountVersion]) revert LendingPoolErrors.InvalidVersion();\n}\n```\n
medium
```\n require(\_dripRatePerSecond > 0, "TokenFaucet/dripRate-gt-zero");\n asset = \_asset;\n measure = \_measure;\n setDripRatePerSecond(\_dripRatePerSecond);\n```\n
low
```\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 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
```\nrequire(\_votesRequired > 0, "Proposal cannot have a 0 votes required to be successful");\n```\n
medium
```\nshell.assimilators[\_derivative] = Assimilators.Assimilator(\_assimilator, \_numeraireAssim.ix);\n```\n
low
```\nfunction getPositionValue() public view returns (uint256) {\n uint256 markPrice = getMarkPriceTwap(15);\n int256 positionSize = IAccountBalance(clearingHouse.getAccountBalance())\n .getTakerPositionSize(address(this), market);\n return markPrice.mulWadUp(_abs(positionSize));\n}\n\nfunction getMarkP...
high
```\nreceive() external payable {\n revert("DCBW721: Please use Mint or Admin calls");\n}\n```\n
none
```\nsetSettingUint('members.challenge.cooldown', 6172); // How long a member must wait before performing another challenge, approx. 1 day worth of blocks\nsetSettingUint('members.challenge.window', 43204); // How long a member has to respond to a challenge. 7 days worth of blocks\nsetSetting...
high
```\ncontract esLBRBoost is Ownable {\n esLBRLockSetting[] public esLBRLockSettings;\n mapping(address => LockStatus) public userLockStatus;\n IMiningIncentives public miningIncentives;\n\n // Define a struct for the lock settings\n struct esLBRLockSetting {\n uint256 duration;\n uint256 miningBoost;\n }\n\n // Define ...
low
```\nfunction sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n}\n```\n
none
```\nfunction acceptControl(address split)\n external\n override\n onlySplitNewPotentialController(split)\n{\n delete splits[split].newPotentialController;\n emit ControlTransfer(split, splits[split].controller, msg.sender);\n splits[split].controller = msg.sender;\n}\n```\n
none
```\nfunction getOperatorUtilizationHeapForETH(RioLRTOperatorRegistryStorageV1.StorageV1 storage s)\n internal\n view\n returns (OperatorUtilizationHeap.Data memory heap)\n {\n uint8 numActiveOperators = s.activeOperatorCount;\n if (numActiveOperators == 0) return OperatorUtilizati...
high
```\nfunction updatePayoutToken(address token) public onlyOwner {\n defaultToken = token;\n}\n```\n
none
```\nfunction getReward(address _account, bool _claimExtras) public updateReward(_account) returns(bool){\n uint256 reward = earned(_account);\n if (reward > 0) {\n rewards[_account] = 0;\n rewardToken.safeTransfer(_account, reward);\n IDeposit(operator).rewardClaimed(pid, _account, reward);\...
high
```\nfunction _canLiquidate(MTypes.MarginCallPrimary memory m)\n private\n view\n returns (bool)\n{\n// rest of code // [// rest of code]\n uint256 timeDiff = LibOrders.getOffsetTimeHours() - m.short.updatedAt;\n uint256 resetLiquidationTime = LibAsset.resetLiquidationTime(m.asset);\n❌ if (timeDiff...
medium
```\n// this will deposit full balance (for cases like not enough room in Vault)\nreturn v.deposit();\n```\n
high
```\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
```\nif (to != address(this)) {\n _updateFeeRewards(to);\n}\n```\n
high
```\n uint256 strTokenAmt = _doBorrow(param.borrowToken, param.borrowAmount);\n\n // 3. Swap borrowed token to strategy token\n IERC20Upgradeable swapToken = ISoftVault(strategy.vault).uToken();\n // swapData.fromAmount = strTokenAmt;\n PSwapLib.megaSwap(augustusSwapper, tokenTransferProxy, swapData);\n ...
high
```\nfunction updateliquidityWallet(address newliquidityWallet) external onlyOwner {\n emit liquidityWalletUpdated(newliquidityWallet, liquidityWallet);\n liquidityWallet = newliquidityWallet;\n}\n```\n
none
```\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
```\n/// @title Ethereum Staking Contract\n/// @author Kiln\n/// @notice You can use this contract to store validator keys and have users fund them and trigger deposits.\ncontract StakingContract {\n using StakingContractStorageLib for bytes32;\n```\n
low
```\nuint256 currencyAmount = Math.ceilDiv(\n \_arguments.tokenAmount \* \_arguments.tokenPrice,\n 10 \*\* \_arguments.token.decimals()\n);\n```\n
low
```\nIUniV2Router2 internal constant UNIV2_ROUTER = IUniV2Router2(0xE592427A0AEce92De3Edee1F18E0157C05861564);\n```\n
medium
```\n/**\n * @title GeoEmaAndCumSmaPump\n * @author Publius\n * @notice Stores a geometric EMA and cumulative geometric SMA for each reserve.\n * @dev A Pump designed for use in Beanstalk with 2 tokens.\n *\n * This Pump has 3 main features:\n * 1. Multi-block MEV resistence reserves\n * 2. MEV-resistant Geometric EM...
high
```\nfunction cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n{\n assembly {\n let ptr := mload(0x40)\n mstore(\n ptr,\n 0x3d605d80600a3d3981f336603057343d52307f00000000000000000000000000\n )\n mstore(\n add(ptr, 0x13),\n 0x830d2d700a9...
none
```\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
```\nfunction advancedPipe(AdvancedPipeCall[] calldata pipes, uint256 value)\n external\n payable\n returns (bytes[] memory results)\n{\n results = IPipeline(PIPELINE).advancedPipe{value: value}(pipes);\n LibEth.refundEth();\n}\n```\n
high
```\n\_poolById[poolId].numberOfMakers = uint256(pool.numberOfMakers).safeAdd(1).downcastToUint32();\n```\n
high
```\n loans.push(\n Loan(req, req.amount + interest, collat, expiration, true, msg.sender)\n );\n```\n
medium
```\nif (newURl != keccak256(bytes(node.url))) {\n\n // deleting the old entry\n delete urlIndex[keccak256(bytes(node.url))];\n\n // make sure the new url is not already in use\n require(!urlIndex[newURl].used, "url is already in use");\n\n UrlInformation memory ui;\n ui.used = true;\n ui.signer = ...
medium
```\nfunction _mint(address account, uint256 value) internal override {\n super._mint(account, value);\n\n magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]\n .sub((magnifiedDividendPerShare.mul(value)).toInt256Safe());\n}\n```\n
none
```\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
```\n wAmount = wAmount > pos.underlyingAmount\n ? pos.underlyingAmount\n : wAmount;\n\n pos.underlyingVaultShare -= shareAmount;\n pos.underlyingAmount -= wAmount;\n bank.totalLend -= wAmount;\n```\n
high
```\n// create and grant ADD\_PROTECTED\_TOKEN\_ROLE to this template\nacl.createPermission(this, controller, controller.ADD\_COLLATERAL\_TOKEN\_ROLE(), this);\n```\n
low
```\nfunction tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n}\n```\n
none
```\nmodifier onlyTest() {\n```\n
low
```\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
```\nif (contractEthBalance > 1) {\n if (\_wasFraud) {\n initiator.transfer(contractEthBalance);\n } else {\n // There will always be a liquidation initiator.\n uint256 split = contractEthBalance.div(2);\n \_d.pushFundsToKeepGroup(split);\n initiator.transfer(split);\n }\n}\n...
low
```\nFile: JUSDBank.sol\n function _withdraw(\n uint256 amount,\n address collateral,\n address to,\n address from,\n bool isInternal\n ) internal {\n// rest of code\n// rest of code\n if (isInternal) {\n DataTypes.UserInfo storage toAccount = userInfo[to];\n ...
medium
```\n(bool isMember, uint96 locked, uint96 stakedAmount) = userManager.stakers(user);\n```\n
medium
```\nfunction setTheMaxTx(uint256 newNum) external onlyOwner {\n require(newNum >= 2, "Cannot set maxTx lower than 0.2%");\n maxTx = (newNum * totalSupply()) / 1000;\n emit MaxTxUpdated(maxTx);\n}\n```\n
none
```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n}\n```\n
none
```\n IUniswapV3Pool(underlyingTrustedPools[500].poolAddress)\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
```\nif (amountToSwap > 0) {\n swapPool = IUniswapV3Pool(vault.pool());\n swapPool.swap(\n address(this),\n !isTokenA,\n int256(amountToSwap),\n isTokenA\n ? UniV3WrappedLibMockup.MAX_SQRT_RATIO - 1 \n : UniV3WrappedLibMockup.MIN_SQRT_RATIO + 1, \n abi.enco...
medium
```\nfunction getCurrentStage() public view returns (uint8) {\n return getStageAtBlock(getCurrentBlockNumber());\n}\n```\n
medium
```\nSwapExchange.sol\n function calculateMultiSwap(SwapUtils.MultiClaimInput calldata multiClaimInput) external view returns (SwapUtils.SwapCalculation memory) {\n uint256 swapIdCount = multiClaimInput.swapIds.length;\n if (swapIdCount == 0 || swapIdCount > _maxHops) revert Errors.InvalidMultiClaimSwa...
low
```\nfunction swap(\n string calldata aggregatorId,\n IERC20 tokenFrom,\n uint256 amount,\n bytes calldata data\n) external payable whenNotPaused nonReentrant {\n Adapter storage adapter = adapters[aggregatorId];\n\n if (address(tokenFrom) != Constants.ETH) {\n tokenFrom.safeTransferFrom(msg.se...
low
```\n function _allowedBorrow(address from, uint256 share) internal virtual override {\n if (from != msg.sender) {\n // TODO review risk of using this\n (uint256 pearlmitAllowed,) = penrose.pearlmit().allowance(from, msg.sender, address(yieldBox), collateralId);\n require(allo...
medium
```\n uint256 received;\n {\n // Get the starting balance of the principal token\n uint256 starting = token.balanceOf(address(this));\n\n // Swap those tokens for the principal tokens\n ISensePeriphery(x).swapUnderlyingForPTs(adapter, s, lent, r);\n\n // Calculate number of prin...
high
```\nfunction _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tWallet,\n uint256 tDonation\n ) = _getTValues(tAmount);\n (uint256 rAmount, uint256 ...
none
```\nfunction _setAutomatedMarketMakerPair(address pair, bool value) private {\n automatedMarketMakerPairs[pair] = value;\n\n emit SetAutomatedMarketMakerPair(pair, value);\n}\n```\n
none
```\n// get list of tokens to transfer to harvester\naddress[] memory rewardTokens = harvester.rewardTokens();\n//transfer them\nuint256 balance;\nfor (uint256 i = 0; i < rewardTokens.length; i++) {\n balance = IERC20(rewardTokens[i]).balanceOf(address(this));\n\n if (balance > 0) {\n IERC20(rewardTokens[i...
medium
```\nfunction getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator.createSender(initCode);\n revert SenderAddressResult(sender);\n}\n```\n
none