function stringlengths 12 7.23k | severity stringclasses 4
values |
|---|---|
```\nFile: wfCashLogic.sol\n function _lendLegacy(\nFile: wfCashLogic.sol\n // If deposit amount external is in excess of the cost to purchase fCash amount (often the case),\n // then we need to return the difference between postTradeCash - preTradeCash. This is done because\n // the encoded tra... | high |
```\nmodifier onlyPrizePool() {\n require(\_msgSender() == address(prizePool), "PeriodicPrizeStrategy/only-prize-pool");\n \_;\n}\n```\n | 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 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 |
```\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 |
```\n function getAccountPrimeDebtBalance(uint16 currencyId, address account) external view override returns (\n int256 debtBalance\n ) {\n mapping(address => mapping(uint256 => BalanceStorage)) storage store = LibStorage.getBalanceStorage();\n BalanceStorage storage balanceStorage = store[ac... | medium |
```\nfunction name() public pure returns (string memory) {\n return _name;\n}\n```\n | none |
```\n if (msg.sender != address(token)) {\n revert AccessDeniedDATATokenOnly();\n }\n```\n | medium |
```\nfunction _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n}\n```\n | none |
```\n reserveRatio = ScalingUtils.scaleByBases(\n allReserves * valueBase / liabilities,\n valueBase,\n tokenManager.RESERVE_RATIO_BASE()\n );\n```\n | medium |
```\nDepositVault.sol\n function withdraw(uint256 amount, uint256 nonce, bytes memory signature, address payable recipient) public {\n require(nonce < deposits.length, "Invalid deposit index");\n Deposit storage depositToWithdraw = deposits[nonce];\n bytes32 withdrawalHash = getWithdrawalHash(Wi... | low |
```\nfunction changeMarketingWallet(address newWallet) external onlyOwner {\n emit MarketingWalletUpdated(newWallet, marketingWallet);\n marketingWallet = newWallet;\n}\n```\n | none |
```\nmodifier lockedWhileVotesCast() {\n uint[] memory activeProposals = governance.getActiveProposals();\n for (uint i = 0; i < activeProposals.length; i++) {\n if (governance.getReceipt(activeProposals[i], getDelegate(msg.sender)).hasVoted) revert TokenLocked();\n (, address proposer,) = governance.getProposa... | medium |
```\nfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n}\n```\n | none |
```\nif (ownerCount >= maxSigs) {\n bool swapped = _swapSigner(owners, ownerCount, maxSigs, currentSignerCount, msg.sender);\n if (!swapped) {\n // if there are no invalid owners, we can't add a new signer, so we revert\n revert NoInvalidSignersToReplace();\n }\n}\n```\n | medium |
```\nsettleFundingFees() = Short/LP need to pay Long 100\n\nmarginDepositedTotal = marginDepositedTotal + funding fee\nmarginDepositedTotal = y + (-100) = (y - 100)\n\nstableCollateralTotal = x + (-(-100)) = (x + 100)\n```\n | high |
```\nfunction setMinimumForDiamondHands (uint256 value) external onlyOwner {\n value = value * (10**18);\n require(value <= _totalSupply / 2000, "cannot be set to more than 0.05%");\n minimumForDiamondHands = value;\n}\n```\n | none |
```\nfunction lockExchange() external onlyAdmin() {\n DFPconfig.unlocked = false;\n}\n```\n | none |
```\n uint256 assetPreBal = _baseAsset.balanceOf(address(this));\n uint256 assetPulled = destVault.withdrawBaseAsset(sharesToBurn, address(this));\n\n // Destination Vault rewards will be transferred to us as part of burning out shares\n // Back into what that... | high |
```\nbptClaim = (strategyTokenAmount * context.totalBPTHeld) / context.vaultState.totalStrategyTokenGlobal;\n1,000,999 = (1000000 * 1002000) / 1001000\n```\n | medium |
```\nfunction _calculateQuoteAssetQuantity(bool isSellAuction, uint256 _componentQuantity, uint256 _componentPrice) private pure returns (uint256) {\n return isSellAuction ? _componentQuantity.preciseMulCeil(_componentPrice) : _componentQuantity.preciseMul(_componentPrice);\n}\n```\n | medium |
```\n function initializeDistributionRecord(\n uint32 _domain, // the domain of the beneficiary\n address _beneficiary, // the address that will receive tokens\n uint256 _amount, // the total claimable by this beneficiary\n bytes32[] calldata merkleProof\n ) external validMerkleProof(_getLeaf(_beneficiary... | high |
```\nfunction refund(\n uint256 policyIndex\_,\n uint256 week\_,\n address who\_\n) external noReenter {\n Coverage storage coverage = coverageMap[policyIndex\_][week\_][who\_];\n\n require(!coverage.refunded, "Already refunded");\n\n uint256 allCovered = coveredMap[policyIndex\_][week\_];\n uint256 amountToRefund = re... | high |
```\nuint256 \_votingPower = \_voterAssetBalance.mul(\_assetWeight);\n```\n | low |
```\nFile: LibQuote.sol\n function closeQuote(Quote storage quote, uint256 filledAmount, uint256 closedPrice) internal {\n..SNIP..\n if (quote.closedAmount == quote.quantity) {\n quote.quoteStatus = QuoteStatus.CLOSED;\n quote.requestedClosePrice = 0;\n removeFromOpenPositions... | medium |
```\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 _buy(uint256 minTokenOut, uint256 deadline)\n public\n payable\n nonReentrant\n returns (bool)\n{\n // deadline requirement\n require(deadline >= block.timestamp, "Deadline EXPIRED");\n\n // Frontrun Guard\n _lastBuyBlock[msg.sender] = block.number;\n\n // liquidity is set\n ... | none |
```\nconstructor(string memory uri_) {\n _setURI(uri_);\n}\n```\n | none |
```\nbUsdo.executeModule(\n IUsdo.Module.UsdoMarketReceiver, \n abi.encodeWithSelector(\n UsdoMarketReceiverModule.removeAssetReceiver.selector, \n marketMsg_), \n false);\n```\n | high |
```\nconstructor() {\n _transferOwnership(_msgSender());\n}\n```\n | none |
```\nfunction initiatePlanet(\n DataStoreUtils.DataStore storage DATASTORE,\n uint256[3] memory uintSpecs,\n address[5] memory addressSpecs,\n string[2] calldata interfaceSpecs\n)\n external\n initiator(DATASTORE, 5, uintSpecs[0], addressSpecs[1])\n returns (\n address miniGovernance,\n address gInterface,\n address wi... | low |
```\nfunction setSwapBackSettings(\n bool _enabled,\n uint256 _min,\n uint256 _max\n) external onlyOwner {\n require(\n _min >= 1,\n "Swap amount cannot be lower than 0.01% total supply."\n );\n require(_max >= _min, "maximum amount cant be higher than minimum");\n\n swapbackEnabled =... | none |
```\nfunction setMinimumTokenBalanceForDividends(uint256 value) external onlyOwner {\n minimumTokenBalanceForDividends = value * (10**18);\n}\n```\n | none |
```\nmodifier onlyLatestRocketNetworkContract() {\n // The owner and other contracts are only allowed to set the storage upon deployment to register the initial contracts/settings, afterwards their direct access is disabled\n if (boolStorage[keccak256(abi.encodePacked("contract.storage.initialised"))] == true) {\... | high |
```\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 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 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 |
```\n// UsdoOptionReceiverModule.sol\n\nfunction exerciseOptionsReceiver(address srcChainSender, bytes memory _data) public payable {\n // Decode received message.\n ExerciseOptionsMsg memory msg_ = UsdoMsgCodec.decodeExerciseOptionsMsg(_data);\n \n _checkWhitelistStatus(msg_.optionsData.target);\... | medium |
```\n function checkForInvalidTimestampOrAnswer(\n uint256 timestamp,\n int256 answer,\n uint256 currentTimestamp\n ) private pure returns (bool) {\n // Check for an invalid timeStamp that is 0, or in the future\n if (timestamp == 0 || timestamp > currentTimestamp) return true;\... | medium |
```\ncontract SushiYieldSource is IYieldSource {\n using SafeMath for uint256;\n address public sushiBar;\n address public sushiAddr;\n mapping(address => uint256) public balances;\n\n constructor(address \_sushiBar, address \_sushiAddr) public {\n sushiBar = \_sushiBar;\n sushiAddr = \_sus... | low |
```\nfunction _transfer(\n address from,\n address to,\n uint256 amount\n) private {\n require(from != address(0), "ERC20: transfer from the zero address");\n require(to != address(0), "ERC20: transfer to the zero address");\n require(amount > 0, "Transfer amount must be greater than zero");\n requ... | none |
```\nfunction safeTransferETH(address to, uint256 amount) internal {\n bool callStatus;\n\n assembly {\n // Transfer the ETH and store if it succeeded or not.\n callStatus := call(gas(), to, amount, 0, 0, 0, 0)\n }\n\n require(callStatus, "ETH_TRANSFER_FAILED");\n}\n```\n | none |
```\n require(!v.frozen, "Validator is frozen");\n```\n | medium |
```\nFile: LiquidationFacetImpl.sol\n function liquidatePositionsPartyA(\n address partyA,\n uint256[] memory quoteIds\n ) internal returns (bool) {\n..SNIP..\n (bool hasMadeProfit, uint256 amount) = LibQuote.getValueOfQuoteForPartyA(\n accountLayout.symbolsPrices[partyA][q... | high |
```\nfunction sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) public payable virtual override {\n _send(_from, _dstChainId, _toAddress, _amount, _refundAddress, _zroPaymentAddress, _adapter... | high |
```\nfunction setNumTokensSellToAddToLiquidity(uint256 numTokens) external onlyOwner {\n numTokensSellToAddToLiquidity = numTokens;\n}\n```\n | none |
```\nfunction liquidateSecondary(\n address asset,\n MTypes.BatchMC[] memory batches,\n uint88 liquidateAmount,\n bool isWallet\n ) external onlyValidAsset(asset) isNotFrozen(asset) nonReentrant {\n // Initial code\n\n emit Events.LiquidateSecondary(asset, batches, msg.sende... | low |
```\nfunction create(\n uint256 maxLoanDur\_,\n uint256 maxFundDur\_,\n address arbiter\_,\n bool compoundEnabled\_,\n uint256 amount\_\n) external returns (bytes32 fund) {\n require(fundOwner[msg.sender].lender != msg.sender || msg.sender == deployer); // Only allow one loan fund per address\... | 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 |
```\n/\*//////////////////////////////////////////////////////////////\n 4626 LOGIC\n//////////////////////////////////////////////////////////////\*/\n\n/\*\*\n \* @dev Converts `assets` to shares\n \* @param assets The amount of assets to convert\n \* @return shares - The amount of shares converted from assets\n \*/\... | low |
```\nuint256 activeAgents = gameInfo.activeAgents;\n if (activeAgents == 1) {\n revert GameOver();\n }\n```\n | 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 |
```\nfunction openTrading() external onlyOwner() {\n require(!tradingOpen,"trading is already open");\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n uniswapV2Router = _uniswapV2Router;\n _approve(address(this), address(uniswapV2Router), _tTotal);\n ... | none |
```\nfunction isReinvest(address account) external view onlyOwner returns (bool) {\n return autoReinvest[account];\n}\n```\n | none |
```\n if (withdrawalValue < lpParams.minDepositWithdraw && \n amountLiquidityToken < lpParams.minDepositWithdraw) {\n revert MinimumWithdrawNotMet(address(this), withdrawalValue, lpParams.minDepositWithdraw);\n }\n```\n | medium |
```\nfunction delegateMgCvg(uint256 _tokenId, address _to, uint96 _percentage) external onlyTokenOwner(_tokenId) {\n require(_percentage <= 100, "INVALID_PERCENTAGE");\n\n uint256 _delegateesLength = delegatedMgCvg[_tokenId].length;\n require(_delegateesLength < maxMgDelegatees, "TOO_MUCH_DELEGATEES");\n\n ... | medium |
```\nfunction enableTrading(uint256 initialMaxGwei, uint256 initialMaxWallet, uint256 initialMaxTX,\n uint256 setDelay) external onlyOwner {\n initialMaxWallet = initialMaxWallet * (10**18);\n initialMaxTX = initialMaxTX * (10**18);\n require(!tradingEnabled);\n require(initialMaxWalle... | none |
```\nsharesOwed = convertToSharesFromRestakingTokens(asset, amountIn);\n```\n | medium |
```\nTransferUtils.sol\n function _transferERC20(address token, address to, uint256 amount) internal {\n IERC20 erc20 = IERC20(token);\n require(erc20 != IERC20(address(0)), "Token Address is not an ERC20");\n uint256 initialBalance = erc20.balanceOf(to);\n require(erc20.transfer(to, amou... | medium |
```\nrequire(\n currentAllowance >= subtractedValue,\n "Silo: decreased allowance below zero"\n);\n```\n | low |
```\n function takeOverPool(GoatTypes.InitParams memory initParams) external {\n if (_vestingUntil != _MAX_UINT32) {\n revert GoatErrors.ActionNotAllowed();\n }\n\n GoatTypes.InitialLPInfo memory initialLpInfo = _initialLPInfo;\n\n GoatTypes.LocalVariables_TakeOverPool memory l... | medium |
```\nfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, "SafeMath: division by zero");\n}\n```\n | none |
```\nif (name(stake.left\_) == key) {\n current.right\_ = stake.right\_;\n current.after\_ = stake.after\_;\n} else {\n current.left\_ = stake.left\_;\n current.before\_ = stake.before\_;\n}\n```\n | high |
```\nfunction supportsInterface (bytes4 interfaceID) public returns (bool) {\n return interfaceID == ERC20ID || interfaceID == ERC165ID;\n}\n```\n | low |
```\nfunction \_beforeTokenTransfer(address from, address to, uint256 amount) internal override {\n uint256 balanceFrom = (from != address(0)) ? balanceOf(from) : 0;\n uint256 balanceTo = (from != address(0)) ? balanceOf(to) : 0;\n uint256 newTotalSupply = totalSupply()\n .add(from == address(0) ? amoun... | medium |
```\n// Remove the line below\n uint24 internal constant _MIN_BID_PERCENT = 1000; // 1%\n// Add the line below\n uint24 internal constant _MIN_BID_PERCENT = 100; // 0.1%\n```\n | medium |
```\nfunction updateUsedBorrowCapacity(\n address vault,\n uint16 currencyId,\n int256 netfCash\n) internal returns (int256 totalUsedBorrowCapacity) {\n VaultBorrowCapacityStorage storage cap = LibStorage.getVaultBorrowCapacity()[vault][currencyId];\n\n // Update the total used borrow capacity, when borr... | low |
```\nfunction reward(\n uint8 subjectType,\n uint256 subjectId,\n uint256 amount,\n uint256 epochNumber\n) external onlyRole(REWARDER\_ROLE) {\n if (subjectType != NODE\_RUNNER\_SUBJECT) revert InvalidSubjectType(subjectType);\n if (!\_subjectGateway.isRegistered(subjectType, subjectId)) revert Reward... | medium |
```\n function deposit(uint256 _underlyingAmount, address _receiver)\n external\n override\n whenNotPaused\n nonReentrant\n {\n _deposit(_underlyingAmount, _receiver);\n }\n\n function _deposit(uint256 _underlyingAmount, address _receiver) internal {\n /// Verify that the pool is not in OpenToBuyer... | high |
```\nfunction isExcludedFromFee(address account) public view returns(bool) {\n return _isExcludedFromFee[account];\n}\n```\n | none |
```\nfunction abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n}\n```\n | none |
```\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 |
```\nfunction sendETHToMain(uint256 amount) external payable onlySplitMain() {\n address(splitMain).safeTransferETH(amount);\n}\n```\n | none |
```\nfunction notifyFor(address account) external {\n \_notifyFor(account, balanceOf(msg.sender));\n}\n```\n | high |
```\n require(oraclePrice >= 0); /// @dev Chainlink rate error\n```\n | medium |
```\nfunction withdrawDividend() public pure override {\n require(false, "withdrawDividend disabled. Use the 'claim' function on the main Venom contract.");\n}\n```\n | none |
```\nfunction calculateMarketingFee(uint256 _amount)\n private\n view\n returns (uint256)\n{\n return _amount.mul(_marketingFee).div(10**2);\n}\n```\n | none |
```\nenum ProposalType {\n Invite, // Invite a registered node to join the trusted node DAO\n Leave, // Leave the DAO\n Replace, // Replace a current trusted node with a new registered node, they take over their bond\n Kick, // Kick a member from the DAO wit... | low |
```\nquantityDeposited = \_amount;\n\nif(\_isTokenFeeCharged) {\n // If we charge a fee, account for it\n uint256 prevBal = \_checkBalance(cToken);\n require(cToken.mint(\_amount) == 0, "cToken mint failed");\n uint256 newBal = \_checkBalance(cToken);\n quantityDeposited = \_min(quantityDeposited, newBal... | 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 |
```\nfunction toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n}\n```\n | none |
```\nfunction claim() external {\n address sender = msg.sender;\n\n UserDetails storage s = userdetails[sender];\n require(s.userDeposit != 0, "No Deposit");\n require(s.index != vestingPoints.length, "already claimed");\n uint256 pctAmount;\n uint256 i = s.index;\n for (i... | high |
```\nfunction log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (... | none |
```\n/\*\*\n \* @dev Sets '\_priceFeed' address for a '\_asset'.\n \* Can only be called by the contract owner.\n \* Emits a {AssetPriceFeedChanged} event.\n \*/\nfunction setPriceFeed(address \_asset, address \_priceFeed) public onlyOwner {\n require(\_priceFeed != address(0), Errors.VL\_ZERO\_ADDR);\n usdPriceFeeds[\... | low |
```\nfunction _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the targ... | none |
```\nfunction \_awardExternalErc721s(address winner) internal {\n address currentToken = externalErc721s.start();\n while (currentToken != address(0) && currentToken != externalErc721s.end()) {\n uint256 balance = IERC721(currentToken).balanceOf(address(prizePool));\n if (balance > 0) {\n prizePool.awardEx... | medium |
```\nVaultImplementation(vaultAddr).init(\n VaultImplementation.InitParams(delegate)\n);\n```\n | high |
```\nreceive() external payable {}\n```\n | none |
```\n uint256 safeOwnerCount = safe.getOwners().length;\n if (safeOwnerCount < minThreshold) {\n revert BelowMinThreshold(minThreshold, safeOwnerCount);\n }\n```\n | high |
```\nfunction removeBotFromBlacklist(address account) external onlyOwner() {\n require(_isBlackListedBot[account], "Account is not blacklisted");\n _isBlackListedBot[account] = false;\n}\n```\n | none |
```\n struct Routing {\n // rest of code\n uint96 funding; \n // rest of code\n }\n```\n | high |
```\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 |
```\nfunction withdraw(int256 \_withdrawAmount) public override nonReentrant {\n updateF1155Balances();\n \_internalWithdraw(\_withdrawAmount);\n}\n```\n | medium |
```\nfunction getMarketCap(IERC20Token \_reserveToken)\n public\n view\n returns(uint256)\n{\n Reserve storage reserve = reserves[\_reserveToken];\n return reserveBalance(\_reserveToken).mul(1e6).div(reserve.weight);\n}\n```\n | low |
```\n/// @param \_preimage The sha256 preimage of the digest\nfunction provideECDSAFraudProof(\n DepositUtils.Deposit storage \_d,\n uint8 \_v,\n bytes32 \_r,\n bytes32 \_s,\n bytes32 \_signedDigest,\n bytes memory \_preimage\n) public {\n require(\n !\_d.inFunding() && !\_d.inFundingFailure... | high |
```\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 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 |
```\n if (block.timestamp <= lastProfitTime) {\n revert NYProfitTakingVault__ProfitTimeOutOfBounds();\n }\n```\n | low |
```\n function JOJOFlashLoan(\n address asset,\n uint256 amount,\n address to,\n bytes calldata param\n ) external {\n (address approveTarget, address swapTarget, uint256 minReceive, bytes memory data) = abi\n .decode(param, (address, address, uint256, bytes));\n ... | medium |
```\nreceive() external payable {}\n```\n | none |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.