function stringlengths 12 63.3k | severity stringclasses 4
values |
|---|---|
```\n function _accumulateInternalRewards() internal view returns (uint256[] memory) {\n uint256 numInternalRewardTokens = internalRewardTokens.length;\n uint256[] memory accumulatedInternalRewards = new uint256[](numInternalRewardTokens);\n\n\n for (uint256 i; i < numInternalRewardTokens; ) {\n... | medium |
```\n if (withdrawalValue < lpParams.minDepositWithdraw && \n amountLiquidityToken < lpParams.minDepositWithdraw) {\n revert MinimumWithdrawNotMet(address(this), withdrawalValue, lpParams.minDepositWithdraw);\n }\n```\n | medium |
```\nconstructor() {\n _setOwner(_msgSender());\n}\n```\n | none |
```\nfunction decimals() public pure returns (uint8) {\n return _decimals;\n}\n```\n | none |
```\nfunction getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n}\n```\n | none |
```\n _addCategory(toCategory("protocol-owned-treasury"), true, 0xb600c5e2, 0x00000000); // getProtocolOwnedTreasuryOhm()`\n```\n | medium |
```\n uint256 entitledShares = previewWithdraw(\n queue[index].epochId,\n queue[index].assets\n );\n // mint only if user won epoch he is rolling over\n if (entitledShares > queue[index].assets) {\n```\n | medium |
```\nfunction totalSupply() public pure override returns (uint256) {\n return _tTotal;\n}\n```\n | none |
```\nfunction functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n}\n```\n | none |
```\nFile: PartyAFacetImpl.sol\n function forceClosePosition(uint256 quoteId, PairUpnlAndPriceSig memory upnlSig) internal {\n AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n MAStorage.Layout storage maLayout = MAStorage.layout();\n Quote storage quote = QuoteStorage.lay... | medium |
```\nfunction claimDefaulted(uint256 loanID_) external returns (uint256, uint256, uint256) {\n Loan memory loan = loans[loanID_];\n delete loans[loanID_];\n```\n | high |
```\nfunction distributeLiquidatedFunds(uint256 agentID, uint256 amount) external {\n if (!liquidated[agentID]) revert Unauthorized();\n\n // transfer the assets into the pool\n GetRoute.wFIL(router).transferFrom(msg.sender, address(this), amount);\n \_writeOffPools(agentID, amount);\n}\n```\n | medium |
```\nfunction setSellFee(\n uint16 tax,\n uint16 liquidity,\n uint16 marketing,\n uint16 dev,\n uint16 donation\n) external onlyOwner {\n sellFee.tax = tax;\n sellFee.marketing = marketing;\n sellFee.liquidity = liquidity;\n sellFee.dev = dev;\n sellFee.donation = donation;\n}\n```\n | none |
```\nfunction provideRedemptionSignature(\n DepositUtils.Deposit storage \_d,\n uint8 \_v,\n bytes32 \_r,\n bytes32 \_s\n) public {\n require(\_d.inAwaitingWithdrawalSignature(), "Not currently awaiting a signature");\n\n // If we're outside of the signature window, we COULD punish signers here\n /... | medium |
```\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 withdraw(uint256 _amount) external {//@audit-info LSD token\n if (_amount == 0) revert InvalidAmount();\n IERC20Upgradeable(address(stakingPool)).safeTransferFrom(msg.sender, address(this), _amount);//@audit-info get LSD token from the user\n _withdraw(msg.sender, _amount);\n}\n```\n | medium |
```\npragma solidity ^0.5.2;\npragma experimental ABIEncoderV2; // to enable structure-type parameters\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 |
```\n// rest of code\nuint256 totalAssetsSnapshotForDeposit = _lastSavedBalance + 1;\nuint256 totalSupplySnapshotForDeposit = totalSupply + 1;\n// rest of code\nuint256 totalAssetsSnapshotForRedeem = _lastSavedBalance + pendingDeposit + 1;\nuint256 totalSupplySnapshotForRedeem = totalSupply + sharesToMint + 1;\n// rest... | high |
```\nfunction fraction(uint numerator, uint denominator) internal pure returns (uint) {\n if (numerator == 0) return 0;\n\n require(denominator > 0, "FixedPoint: division by zero");\n require(numerator <= type(uint144).max, "FixedPoint: numerator too big");\n\n return (numerator << RESOLUTION) / denominator... | none |
```\nfunction _handleStrategistInterestReward(uint256 lienId, uint256 amount)\n internal\n virtual\n override\n {\n if (VAULT_FEE() != uint256(0)) {\n uint256 interestOwing = LIEN_TOKEN().getInterest(lienId);\n uint256 x = (amount > interestOwing) ? interestOwing : amount;\n uint256 fee = x.... | high |
```\n/// @notice Derives an Ethereum Account address from a pubkey\n/// @dev The address is the last 20 bytes of the keccak256 of the address\n/// @param \_pubkey The public key X & Y. Unprefixed, as a 64-byte array\n/// @return The account address\nfunction accountFromPubkey(bytes memory \_pubkey) internal pure return... | low |
```\n// solhint-disable-next-line func-name-mixedcase\nfunction \_\_DramAccessControl\_init\_unchained(\n address admin\n) internal onlyInitializing {\n \_grantRole(ADMIN\_ROLE, admin);\n \_grantRole(ROLE\_MANAGER\_ROLE, admin);\n \_grantRole(SUPPLY\_MANAGER\_ROLE, admin);\n}\n```\n | low |
```\nfunction testLiquidateSteal() external {\n uint loanTokenAmount = 12000;\n uint borrowAmount = 1000;\n uint collateralAmountA = 10000;\n uint collateralAmountB = 1400;\n MockERC20 collateralToken = new MockERC20(collateralAmountA+collateralAmountB, 18);\n MockERC20 loanTok... | medium |
```\nfunction getAccount(address _account) public view returns (address account, int256 index, int256 iterationsUntilProcessed,\n uint256 withdrawableDividends, uint256 totalDividends,\n uint256 lastClaim... | none |
```\nfunction tokenFromReflection(uint256 rAmount) private view returns (uint256) {\n require(rAmount <= _rTotal,"Amount must be less than total reflections");\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n}\n```\n | 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 |
```\n (uint256 unitFee, , ) = _fees(10**decimals(), settlementFeePercentage);\n amount = (newFee * 10**decimals()) / unitFee;\n```\n | medium |
```\nfunction restoreAllFee() private {\n _taxFee = 5;\n _teamFee = 15;\n}\n```\n | none |
```\nfunction mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n```\n | none |
```\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 =... | high |
```\n function test_heal_in_next_round_v1() public {\n _startGameAndDrawOneRound();\n\n _drawXRounds(11);\n\n\n (uint256[] memory woundedAgentIds, ) = infiltration.getRoundInfo({roundId: 12});\n\n address agentOwner = _ownerOf(woundedAgentIds[0]);\n looks.mint(agentOwner, HEAL_BASE... | medium |
```\nCurve Pools\n\nCurve stETH/ETH: 0x06325440D014e39736583c165C2963BA99fAf14E\nCurve stETH/ETH ng: 0x21E27a5E5513D6e65C4f830167390997aA84843a\nCurve stETH/ETH concentrated: 0x828b154032950C8ff7CF8085D841723Db2696056\nCurve stETH/frxETH: 0x4d9f9D15101EEC665F77210cB999639f760F831E\nCurve rETH/ETH: 0x6c38cE8984a890F5e46... | medium |
```\nFile: Curve2TokenPoolMixin.sol\nabstract contract Curve2TokenPoolMixin is CurvePoolMixin {\n..SNIP..\n constructor(\n NotionalProxy notional_,\n ConvexVaultDeploymentParams memory params\n ) CurvePoolMixin(notional_, params) {\n address primaryToken = _getNotionalUnderlyingToken(params.b... | medium |
```\nif (stateRootHashes[currentL2BlockNumber] != \_finalizationData.parentStateRootHash) {\n revert StartingRootHashDoesNotMatch();\n}\n```\n | high |
```\nreceive() external payable {}\n```\n | none |
```\n uint256 rewardTokensLength = rewardTokens.length;\n for (uint256 i; i != rewardTokensLength; ) {\n IERC20Upgradeable(rewardTokens[i]).safeTransfer(\n msg.sender,\n rewards[i]\n );\n```\n | medium |
```\nFile: BalancerEnvironment.py\n "oracleWindowInSeconds": 3600,\n "maxBalancerPoolShare": 2e3, # 20%\n "settlementSlippageLimitPercent": 5e6, # 5%\n```\n | medium |
```\nfunction withdrawInsurance(uint256 amount, address to)\n external\n nonReentrant\n onlyOwner\n{\n if (amount == 0) {\n revert ZeroAmount();\n }\n\n insuranceDeposited -= amount;\n\n vault.withdraw(insuranceToken(), amount);\n IERC20(insuranceToken()).transfer(to, amount);\n\n emit... | high |
```\nfunction withdrawTaxBalance() external nonReentrant onlyOwner {\n (bool temp1, ) = payable(teamWallet).call{\n value: (taxBalance * teamShare) / SHAREDIVISOR\n }("");\n (bool temp2, ) = payable(treasuryWallet).call{\n value: (taxBalance * treasuryShare) / SHAREDIVISOR\n }("");\n assert... | none |
```\n function _loadUpdateContext(\n Context memory context,\n address account,\n address referrer\n ) private view returns (UpdateContext memory updateContext) {\n// rest of code\n updateContext.referrer = referrers[account][context.local.currentId];\n updateContext.referralFee... | medium |
```\nconstructor(\n DAOFactory \_daoFactory,\n ENS \_ens,\n MiniMeTokenFactory \_miniMeFactory,\n IFIFSResolvingRegistrar \_aragonID,\n address \_dai,\n address \_ant\n)\n BaseTemplate(\_daoFactory, \_ens, \_miniMeFactory, \_arag... | low |
```\nfunction contribute(address \_contributor, uint256 \_value) external payable nonReentrant auth(CONTRIBUTE\_ROLE) {\n require(state() == State.Funding, ERROR\_INVALID\_STATE);\n\n if (contributionToken == ETH) {\n require(msg.value == \_value, ERROR\_INVALID\_CONTRIBUTE\_VALUE);\n } else {\n ... | low |
```\n\_addUsedAmount(\_fee + \_value);\n```\n | medium |
```\nfunction _marginFeeHandler(MTypes.MarginCallPrimary memory m) private {\n STypes.VaultUser storage VaultUser = s.vaultUser[m.vault][msg.sender];\n STypes.VaultUser storage TAPP = s.vaultUser[m.vault][address(this)];\n // distribute fees to TAPP and caller\n uint88 tappFee = m.ethFilled.mulU88(m.tappFee... | medium |
```\nconstructor(address payable marketingWalletAddress, address payable buyBackWalletAddress, address payable fairyPotWalletAddress) {\n _marketingWalletAddress = marketingWalletAddress;\n _buyBackWalletAddress = buyBackWalletAddress;\n _fairyPotWalletAddress = fairyPotWalletAddress;\n\n _rOwned[_msgSender... | none |
```\n self.tokenA.safeTransfer(self.withdrawCache.user, self.tokenA.balanceOf(address(this)));\n```\n | low |
```\n// mTOFT.sol\n\nfunction wrap(address _fromAddress, address _toAddress, uint256 _amount)\n external\n payable \n whenNotPaused\n nonReentrant\n returns (uint256 minted)\n {\n // rest of code\n \n uint256 feeAmount = _checkAndExtractFees(_amount);\n if ... | medium |
```\nfunction lastPublicSaleBatchMint(uint256 tokenCount)\n external\n payable\n returns (bool)\n{\n if ((block.timestamp >= defaultSaleStartTime + DEFAULT_TEAMMINT_SALE)) {\n if (tokenCount == 0) revert InvalidTokenCountZero();\n\n if (\n lastPublicSale[msg.sender] + tokenCount >\n... | none |
```\nrequire(account != Constants.RESERVE); // Reserve address is address(0)\nrequire(account != address(this));\n(\n uint256 isNToken,\n /* incentiveAnnualEmissionRate */,\n /* lastInitializedTime */,\n /* assetArrayLength */,\n /* parameters */\n) = nTokenHandler.getNTokenContext(account);\nrequire(isN... | 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 |
```\n function topUp(\n address source,\n uint256[] memory indices\n ) external onlyRole(EXECUTOR_ROLE) {\n for (uint i = 0; i < indices.length; i++) {\n // get staking contract and config\n StakingRewards staking = stakingContracts[i];\n StakingConfig memory ... | high |
```\nuint256 private withdrawEntryCounter = 0;\n```\n | low |
```\nfunction buy(uint256 \_amount, address \_tokenReceiver) public whenNotPaused nonReentrant {\n // rounding up to the next whole number. Investor is charged up to one currency bit more in case of a fractional currency bit.\n uint256 currencyAmount = Math.ceilDiv(\_amount \* getPrice(), 10 \*\* token.decimals());\n\n... | low |
```\nfunction tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n}\n```\n | none |
```\nfunction repay (uint256 loanID, uint256 repaid) external {\n Loan storage loan = loans[loanID];\n\n if (block.timestamp > loan.expiry) \n revert Default();\n \n uint256 decollateralized = loan.collateral * repaid / loan.amount;\n\n if (repaid == loan.amount) delete loans[loanID];\n else {\... | high |
```\nconstructor() {\n walletImplementation = address(new SplitWallet());\n}\n```\n | none |
```\nfunction \_addLiquidityFor(address \_liquidityHolderAddr, uint256 \_liquidityAmount, bool \_isLM) internal {\n daiToken.transferFrom(\_liquidityHolderAddr, address(this), \_liquidityAmount); \n \n uint256 \_amountToMint = \_liquidityAmount.mul(PERCENTAGE\_100).div(getDAIToDAIxRatio());\n totalLiquidity = tot... | medium |
```\nfunction \_removeFromQueue(uint256 \_countToRemove) internal {\n for (uint256 i = 0; i < \_countToRemove; i++) {\n delete withdrawalsInfo[withdrawalQueue[i]];\n } \n\n if (\_countToRemove == withdrawalQueue.length) {\n delete withdrawalQueue;\n } else {\n uint256 \_remainingArrLength = withdrawalQue... | medium |
```\nfunction \_transferETH(address \_recipient, uint256 \_amount) private {\n (bool success, ) = \_recipient.call{value: \_amount}(\n abi.encodeWithSignature("")\n );\n require(success, "Transfer Failed");\n}\n```\n | high |
```\n// Check that the callTo is a contract\n// NOTE: This cannot happen on the sending chain (different chain\n// contexts), so a user could mistakenly create a transfer that must be\n// cancelled if this is incorrect\nrequire(invariantData.callTo == address(0) || Address.isContract(invariantData.callTo), "#P:031");\n... | low |
```\nfunction _setAutomatedMarketMakerPair(address pair, bool value) private {\n automatedMarketMakerPairs[pair] = value;\n\n emit SetAutomatedMarketMakerPair(pair, value);\n}\n```\n | none |
```\nfunction requestLinkTopHatToTree(uint32 _topHatDomain, uint256 _requestedAdminHat) external {\n uint256 fullTopHatId = uint256(_topHatDomain) << 224; // (256 - TOPHAT_ADDRESS_SPACE);\n\n _checkAdmin(fullTopHatId);\n\n linkedTreeRequests[_topHatDomain] = _requestedAdminHat;\n emit TopHatLinkRequested(_t... | high |
```\nfunction updateAndDistributeETH(\n address split,\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)\n{\n _updateSplit... | none |
```\nfunction beforeTokenTransfer(address from, address to, uint256 amount, address controlledToken) external override onlyPrizePool {\n if (controlledToken == address(ticket)) {\n \_requireNotLocked();\n }\n```\n | high |
```\nfunction includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], "Account is not excluded");\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;... | none |
```\n feeManager = config_.feeManager();\n```\n | medium |
```\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 |
```\nfunction resetVaultUnderlying(uint256 _vaultNumber) internal {\n vaults[_vaultNumber].totalUnderlying = 0;\n vaultStage[_vaultNumber].underlyingReceived = 0;\n vaults[_vaultNumber].totalSupply = 0;\n}\n```\n | medium |
```\nfunction delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n) public {\n require(block.timestamp <= expiry, "ERC20MultiVotes: signature expired");\n address signer = ecrecover(\n keccak256(\n abi.encodePacked(\n ... | low |
```\nfunction sendETHToMain(uint256 amount) external payable onlySplitMain() {\n address(splitMain).safeTransferETH(amount);\n}\n```\n | none |
```\nfunction getTVLForAsset(address asset) public view returns (uint256) {\n uint256 balance = getTotalBalanceForAsset(asset);\n if (asset == ETH_ADDRESS) {\n return balance;\n }\n return convertToUnitOfAccountFromAsset(asset, balance);\n }\n\n function getTotalBalanceForAs... | medium |
```\nfunction setBothFees(\n uint16 buy_tax,\n uint16 buy_liquidity,\n uint16 buy_marketing,\n uint16 buy_dev,\n uint16 buy_donation,\n uint16 sell_tax,\n uint16 sell_liquidity,\n uint16 sell_marketing,\n uint16 sell_dev,\n uint16 sell_donation\n\n) external onlyOwner {\n buyFee.tax = b... | none |
```\nFile: SwEthEthOracle.sol\n function getPriceInEth(address token) external view returns (uint256 price) {\n // Prevents incorrect config at root level.\n if (token != address(swEth)) revert Errors.InvalidToken(token);\n\n // Returns in 1e18 precision.\n price = swEth.swETHToETHRate();... | medium |
```\n/// @notice Withdraw node balances from the minipool and close it. Only accepts calls from the owner\nfunction close() override external onlyMinipoolOwner(msg.sender) onlyInitialised {\n // Check current status\n require(status == MinipoolStatus.Dissolved, "The minipool can only be closed while dissolved");\... | high |
```\n function getDeltaB() internal view returns (int256 deltaB) {\n uint256[2] memory balances = C.curveMetapool().get_balances();\n uint256 d = getDFroms(balances);\n deltaB = getDeltaBWithD(balances[0], d);\n }\n```\n | medium |
```\nfunction transfer(address recipient, uint256 amount)\n external\n override\n returns (bool)\n{\n return _transferFrom(msg.sender, recipient, amount);\n}\n```\n | none |
```\nfunction getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n}\n```\n | none |
```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint256 \_proofType,\n bytes32 \_parentStateRootHash\n)\n external\n whenTypeNotPaused(PROVING\_SYSTEM\_PAUSE\_TYPE)\n whenTypeNotPaused(GENERAL\_PAUSE\_TYPE)\n onlyRole(OPERATOR\_ROLE)\n{\n if (stateRootHashes[currentL2Block... | high |
```\nfunction borrow(VerifiableCredential memory vc) external isOpen subjectIsAgentCaller(vc) {\n // 1e18 => 1 FIL, can't borrow less than 1 FIL\n if (vc.value < WAD) revert InvalidParams();\n // can't borrow more than the pool has\n if (totalBorrowableAssets() < vc.value) revert InsufficientLiquidity();\n Account memo... | medium |
```\nfunction decreaseCollateral(address asset, uint8 id, uint88 amount)\n external\n isNotFrozen(asset)\n nonReentrant\n onlyValidShortRecord(asset, msg.sender, id)\n{\n STypes.ShortRecord storage short = s.shortRecords[asset][msg.sender][id];\n short.updateErcDebt(asset);\n if (amount > short.col... | medium |
```\n_stemTipForToken = s.ss[token].milestoneStem +\n int96(s.ss[token].stalkEarnedPerSeason).mul(\n int96(s.season.current).sub(int96(s.ss[token].milestoneSeason))\n );\n```\n | high |
```\nuint256 availableShares = assetRegistry().convertToSharesFromAsset(asset, assetRegistry().getTotalBalanceForAsset(asset));\n```\n | medium |
```\n/\*\n// Indicates any auction has never held for a specified BondID\nfunction isNotStartedAuction(bytes32 auctionID) public virtual override returns (bool) {\n uint256 closingTime = \_auctionClosingTime[auctionID];\n return closingTime == 0;\n}\n\n// Indicates if the auctionID is in bid acceptance status\nfunction... | high |
```\nfunction buy(address receiver, uint256 amount) internal {\n _balances[receiver] = _balances[receiver] + amount;\n _balances[address(this)] = _balances[address(this)] - amount;\n}\n```\n | none |
```\nFile: wfCashBase.sol\n function _getMaturedCashValue(uint256 fCashAmount) internal view returns (uint256) { \n if (!hasMatured()) return 0; \n // If the fCash has matured we use the cash balance instead.\n (uint16 currencyId, uint40 maturity) = getDecodedID(); \n PrimeRate memory pr ... | medium |
```\n {\n IBank.Position memory pos = bank.getCurrentPositionInfo();\n address posCollToken = pos.collToken;\n uint256 collSize = pos.collateralSize;\n address burnToken = address(ISoftVault(strategy.vault).uToken());\n if (collSize > 0) {\n if (posCollToken != address(w... | high |
```\nuint256 loansInPool = loans_.loans.length - 1 + auctions_.noOfAuctions;\nuint256 curMomp = _priceAt(Deposits.findIndexOfSum(deposits_, Maths.wdiv(borrowerAccruedDebt_, loansInPool * 1e18)));\n```\n | medium |
```\n// invariant\n// @audit operator - pass\nif (msg.sender != account && !IVaultFactory(address(factory())).operators(account, msg.sender))\n revert VaultNotOperatorError();\n// @audit 0,0,0 is single-sided - pass\nif (!depositAssets.add(redeemShares).add(claimAssets).eq(depositAssets.max(redeemShares).max(claimAs... | medium |
```\nfunction _tokenTransfer(address sender, address recipient, uint256 amount) private {\n _transferStandard(sender, recipient, amount);\n}\n```\n | none |
```\nfunction setIsFeeExempt(address excemptAddress, bool isExempt) external authorized {\n isFeeExempt[excemptAddress] = isExempt;\n emit IsFeeExempt(excemptAddress, isExempt);\n}\n```\n | none |
```\n uint256 wstethOhmPrice = manager.getTknOhmPrice();\n uint256 expectedWstethAmountOut = (ohmAmountOut * wstethOhmPrice) / _OHM_DECIMALS;\n\n // Take any arbs relative to the oracle price for the Treasury and return the rest to the owner\n uint256 wstethToReturn = wstethAmountOut > expectedWstethAmountO... | high |
```\nfunction swapBack() private {\n uint256 contractBalance = balanceOf(address(this));\n uint256 totalTokensToSwap = tokensForLiquidity +\n tokensForDevelopment +\n tokensForMarketing;\n bool success;\n\n if (contractBalance == 0 || totalTokensToSwap == 0) {\n return;\n }\n\n i... | none |
```\nfunction setTokenDrop(address \_token, address \_tokenDrop)\n external\n returns (bool)\n{\n require(\n msg.sender == factory || msg.sender == owner(),\n "Pod:unauthorized-set-token-drop"\n );\n\n // Check if target<>tokenDrop mapping exists\n require(\n drops[\_token] == Tok... | medium |
```\n function stakeWithPermit(\n uint256 amount,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external whenNotPaused {\n IDai erc20Token = IDai(stakingToken);\n erc20Token.permit(msg.sender, address(this), nonce, expiry, true, v, r, s);\n\n s... | medium |
```\nfunction functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n) internal returns (bytes memory) {\n require(isContract(target), "Address: delegate call to non-contract");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verify... | none |
```\n// Validate either on the first fill or if the signature type requires\n// regular validation.\naddress makerAddress = order.makerAddress;\nif (orderInfo.orderTakerAssetFilledAmount == 0 ||\n \_doesSignatureRequireRegularValidation(\n orderInfo.orderHash,\n makerAddress,\n signature\n )\... | high |
```\nskaleBalances.lockBounty(shares[i].holder, timeHelpers.addMonths(delegationStarted, 3));\n```\n | high |
```\n // 2. Get the time passed since the last interest accrual\n uint _timeDelta = block.timestamp - _lastAccrueInterestTime;\n \n // 3. If the time passed is 0, return the current values\n if(_timeDelta == 0) return (_currentTotalSupply, _accruedFeeShares, _currentCollateralRatioMantissa, ... | medium |
```\nPlasmaFramework private plasmaFramework;\n```\n | low |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.