function stringlengths 12 63.3k | severity stringclasses 4
values |
|---|---|
```\njusdOutside[msg.sender] -= repayJUSDAmount;\nuint256 index = getIndex();\nuint256 lockedEarnUSDCAmount = jusdOutside[msg.sender].decimalDiv(index);\nrequire(\n earnUSDCBalance[msg.sender] >= lockedEarnUSDCAmount, "lockedEarnUSDCAmount is bigger than earnUSDCBalance"\n);\nwithdrawEarnUSDCAmount = earnUSDCBalanc... | high |
```\nconstructor(address owner) {\n _owner = owner;\n isAuthorized[owner] = true;\n}\n```\n | none |
```\nfunction simulateValidation(UserOperation calldata userOp) external {\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (uint256 validationData, uint256 paymasterValidationData) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(outOpInf... | none |
```\nfunction tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n}\n```\n | none |
```\n wAuraPools.getVault(lpToken).exitPool(\n IBalancerPool(lpToken).getPoolId(),\n address(this),\n address(this),\n IBalancerVault.ExitPoolRequest(\n tokens,\n minAmountsOut,\n abi.encode(0... | medium |
```\n // Need to transfer before minting or ERC777s could reenter.\n asset.safeTransferFrom(msg.sender, address(this), assets);\n\n _mint(receiver, shares);\n\n emit Deposit(msg.sender, receiver, assets, shares);\n\n afterDeposit(assets, shares);\n}\n\n function previewMint(uint256 shares) public view v... | high |
```\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 |
```\nFile: VaultAccount.sol\n function _setVaultAccount(\n..SNIP..\n // An account must maintain a minimum borrow size in order to enter the vault. If the account\n // wants to exit under the minimum borrow size it must fully exit so that we do not have dust\n // accounts that become insolvent.\... | medium |
```\nfunction beginGlobalSettlement(uint256 price) public onlyWhitelistAdmin {\n require(status != LibTypes.Status.SETTLED, "already settled");\n settlementPrice = price;\n status = LibTypes.Status.SETTLING;\n emit BeginGlobalSettlement(price);\n}\n```\n | low |
```\nfor (uint256 i = 0; i < tokens.length; i++) {\n uint256 amountToRagequit = fairShare(userTokenBalances[GUILD][tokens[i]], sharesAndLootToBurn, initialTotalSharesAndLoot);\n // deliberately not using safemath here to keep overflows from preventing the function execution (which would break ragekicks)\n // i... | high |
```\nstakedToken.transferFrom(from, address(this), amount);\n```\n | medium |
```\n /**\n * Calculate total notional rebalance quantity and chunked rebalance quantity in collateral units.\n *\n * return uint256 Chunked rebalance notional in collateral units\n * return uint256 Total rebalance notional in collateral units\n */\n function _calculateChunkR... | 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 |
```\nif (sqrtRatioX96 <= sqrtRatioAX96) {\n amount0 = SafeCast.toUint256(\n SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidity\n )\n );\n} \n```\n | medium |
```\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, "SafeMath: subtraction overflow");\n}\n```\n | none |
```\n function findOrderHintId(\n mapping(address => mapping(uint16 => STypes.Order)) storage orders,\n address asset,\n MTypes.OrderHint[] memory orderHintArray\n ) internal returns (uint16 hintId) {\n\n // more code\n\n // @audit if a reused order's prevOrderType is matche... | medium |
```\nfunction _isLess(Queue storage self, uint256 i, uint256 j) private view returns (bool) {\n uint64 iId = self.bidIdList[i];\n uint64 jId = self.bidIdList[j];\n Bid memory bidI = self.idToBidMap[iId];\n Bid memory bidJ = self.idToBidMap[jId];\n uint256 relI = uint256(bidI.amountIn) * uint256(bidJ.minA... | high |
```\nfunction setDepositExclusion(address \_deposit, bool \_excluded) external onlyGuardianOrGovernor {\n excludedDeposits[\_deposit] = \_excluded;\n}\n```\n | low |
```\nfunction changeIsFeeExempt(address holder, bool exempt) external onlyOwner {\n isFeeExempt[holder] = exempt;\n}\n```\n | none |
```\n function _redeem(\n ThreeTokenPoolContext memory poolContext,\n StrategyContext memory strategyContext,\n AuraStakingContext memory stakingContext,\n uint256 strategyTokens,\n uint256 minPrimary\n) internal returns (uint256 finalPrimaryBalance) {\n uint256 bptClaim = strategyContext._convertS... | 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 |
```\nFile: contracts\gas\GasUtils.sol\n function payExecutionFee(\n DataStore dataStore,\n EventEmitter eventEmitter,\n StrictBank bank,\n uint256 executionFee,\n uint256 startingGas,\n address keeper,\n address user\n ) external { // @audit external call is subjec... | medium |
```\nfunction allowance(address holder, address spender)\n external\n view\n override\n returns (uint256)\n{\n return _allowances[holder][spender];\n}\n```\n | none |
```\n uint256 ohmWstethPrice = manager.getOhmTknPrice();\n uint256 ohmMintAmount = (amount_ * ohmWstethPrice) / _WSTETH_DECIMALS;\n\n // Block scope to avoid stack too deep\n {\n // Cache OHM-wstETH BPT before\n uint256 bptBefore = liquidityPool.balanceOf(address(this));\n\n // Transfer... | high |
```\nfunction decimals() public pure override returns (uint8) {\n return 6;\n}\n```\n | low |
```\nSTATICCALL IchiLpOracle.getPrice(token=0xFCFE742e19790Dd67a627875ef8b45F17DB1DaC6) => (1101189125194558706411110851447)\n```\n | medium |
```\n \*/\nfunction setIDOLContract(address contractAddress) public {\n require(address(\_IDOLContract) == address(0), "IDOL contract is already registered");\n \_setStableCoinContract(contractAddress);\n}\n```\n | high |
```\nfunction verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n ... | none |
```\nfunction changeMintCost(uint256 mintCost) public onlyOwner {\n require(\n mintCost != _mintPrice,\n "DCBW721: mint Cost cannot be same as previous"\n );\n _mintPrice = mintCost;\n}\n```\n | none |
```\n bytes memory encodedMessage = abi.encodePacked( LSP6_VERSION,\n block.chainid,\n nonce,\n msgValue,\n payload\n );\n```\n | low |
```\n uint256 deltaExchangeRateMantissa = uint256(exchangeRateMantissa).sub(userState.lastExchangeRateMantissa);\n uint128 newTokens = FixedPoint.multiplyUintByMantissa(userMeasureBalance, deltaExchangeRateMantissa).toUint128();\n userStates[user] = UserState({\n lastExchangeRateMantissa: exchangeRateMantiss... | low |
```\nFile: LMPDebt.sol\n // Neither of these numbers include rewards from the DV\n if (currentDvDebtValue < updatedDebtBasis) {\n // We are currently sitting at a loss. Limit the value we can pull from\n // the destination vault\n currentDvDebtValue = currentDvDebtValue.mu... | high |
```\nfunction dividendOf(address _owner) public view override returns (uint256) {\n return withdrawableDividendOf(_owner);\n}\n```\n | none |
```\nfunction updateSplit(\n address split,\n address[] calldata accounts,\n uint32[] calldata percentAllocations,\n uint32 distributorFee\n)\n external\n override\n onlySplitController(split)\n validSplit(accounts, percentAllocations, distributorFee)\n{\n _updateSplit(split, accounts, percentAllocations, dist... | none |
```\nuint256 cRatio = short.getCollateralRatioSpotPrice(LibOracle.getSavedOrSpotOraclePrice(asset));\n```\n | medium |
```\nOracleVersion memory latestOracleVersion = market.oracle().latest();\nlatestPrice = latestOracleVersion.price;\nIPayoffProvider payoff = market.payoff();\nif (address(payoff) != address(0)) latestPrice = payoff.payoff(latestPrice);\n```\n | medium |
```\nrocketMinipoolManager.setMinipoolWithdrawalBalances(\_minipoolAddress, \_stakingEndBalance, nodeAmount);\n// Apply node penalties by liquidating RPL stake\nif (\_stakingEndBalance < userDepositBalance) {\n RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeSt... | high |
```\nif (lockedUntil != 0 && lockedUntil <= now) {\n deposits[owner].withdrawalLockedUntil[token] = 0;\n\n address depositAccount = deposits[owner].account;\n uint256 depositValue;\n\n if (token == address(0)) {\n depositValue = depositAccount.balance;\n } else {\n depositValue = ERC20Token(token).balanceOf(depositAcco... | low |
```\nFile: BondBaseOFDA.sol\n function _createMarket(MarketParams memory params_) internal returns (uint256) {\n..SNIP..\n // Calculate the maximum payout amount for this market\n uint256 capacity = params_.capacityInQuote\n ? params_.capacity.mulDiv(\n scale,\n ... | medium |
```\nfunction distributeDividends() public payable override {\n require(totalSupply() > 0);\n\n if (msg.value > 0) {\n magnifiedDividendPerShare = magnifiedDividendPerShare.add(\n (msg.value).mul(magnitude) / totalSupply()\n );\n emit DividendsDistributed(msg.sender, msg.value);\n\... | none |
```\nfunction removeAllFee() private {\n if (_taxFee == 0 && _teamFee == 0) return;\n _taxFee = 0;\n _teamFee = 0;\n}\n```\n | none |
```\n (address[] memory tokens, uint256[] memory rewards) = IERC20Wrapper(\n pos.collToken\n ).pendingRewards(pos.collId, pos.collateralSize);\n for (uint256 i; i < tokens.length; i++) {\n rewardsValue += oracle.getTokenValue(tokens[i], rewards[i]);\n }\n```\n | medium |
```\n struct PoolInfo {\n uint128 accRewardPerShare;\n uint64 lastRewardTime;\n uint64 allocPoint;\n```\n | medium |
```\nfunction removeLimits() external onlyOwner returns (bool){\n limitsInEffect = false;\n return true;\n}\n```\n | none |
```\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 |
```\nfunction _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal - rFee;\n _tFeeTotal = _tFeeTotal + tFee;\n}\n```\n | none |
```\nfunction removeBotFromBlacklist(address account) external onlyOwner() {\n require(_isBlackListedBot[account], "Account is not blacklisted");\n _isBlackListedBot[account] = false;\n}\n```\n | none |
```\nbool isNative = LibAsset.isNativeAsset(assetId);\nif (!isNative) {\n LibAsset.increaseERC20Allowance(assetId, callTo, amount);\n}\n\n// Check if the callTo is a contract\nbool success;\nbytes memory returnData;\nif (Address.isContract(callTo)) {\n // Try to execute the callData\n // the low level call will retu... | low |
```\n function currentRewardsPerToken() public view returns (uint256) {\n // Rewards do not accrue if the total balance is zero\n if (totalBalance == 0) return rewardsPerTokenStored;\n\n // @audit\n // loss of precision\n // The number of rewards to apply is based on the reward rate a... | medium |
```\nfunction swapAndLiquify(uint256 tokens) private {\n uint256 half = tokens.div(2);\n uint256 otherHalf = tokens.sub(half);\n uint256 initialBalance = address(this).balance;\n swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered\n uint256 newBalance = address(t... | none |
```\nfunction commitCollateral(\n uint256 _bidId,\n Collateral[] calldata _collateralInfo\n) public returns (bool validation_) {\n address borrower = tellerV2.getLoanBorrower(_bidId);\n (validation_, ) = checkBalances(borrower, _collateralInfo); <- @audit-issue no access control\n\n if (validation_) {\n ... | high |
```\nif (address(quote.sellToken) != ETH) _transferFrom(permit, stake, stakeSize);\n if (address(quote.sellToken) != stake) _fillQuote(quote);\n```\n | medium |
```\nfunction getWellPriceFromTwaReserves(address well) internal view returns (uint256 price) {\n AppStorage storage s = LibAppStorage.diamondStorage();\n // s.twaReserve[well] should be set prior to this function being called.\n // 'price' is in terms of reserve0:reserve1.\n if (s.twaReserves[well].reserve... | low |
```\n function _poolRepayAll(address pool, address token) internal {\n .\n .\n info.totalBorrows = info.totalBorrows - amount;\n info.balance = info.balance - amount; // amount should be added here\n .\n .\n }\n```\n | high |
```\n function externalSwap(\n address fromToken,\n address toToken,\n address approveTarget,\n address swapTarget,\n uint256 fromTokenAmount,\n uint256 minReturnAmount,\n bytes memory feeData,\n bytes memory callDataConcat,\n uint256 deadLine\n ) ext... | medium |
```\nit('pending deposit pushed by 1 epoch causing shares difference', async () => {\n const smallDeposit = utils.parseEther('1000')\n const smallestDeposit = utils.parseEther('0.000001')\n\n await updateOracleEth() // epoch now stale\n // make a pending deposit\n await vault.connect(user).depo... | high |
```\nfunction _fundPool(uint256 _amount, uint256 _poolId, IStrategy _strategy) internal {\n uint256 feeAmount;\n uint256 amountAfterFee = _amount;\n\n Pool storage pool = pools[_poolId];\n address _token = pool.token;\n\n if (percentFee > 0) {\n feeAmount = (_amount * perce... | medium |
```\ncontract Vault is IVault, ERC20, EpochControls, AccessControl, Pausable {\n```\n | medium |
```\nfunction _qv_allocate(\n // rest of code\n ) internal onlyActiveAllocation {\n // rest of code\n uint256 creditsCastToRecipient = _allocator.voiceCreditsCastToRecipient[_recipientId];\n // rest of code\n // get the total credits and calculate the vote result\n uint256 t... | medium |
```\nfunction _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), "ERC20: approve from the zero address");\n require(spender != address(0), "ERC20: approve to the zero address");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n}... | none |
```\n\n```\n | medium |
```\n uint96 prefundingRefund = routing.funding + payoutSent_ - sold_;\n unchecked {\n routing.funding -= prefundingRefund;\n }\n Transfer.transfer(\n routing.baseToken,\n _getAddressGivenCallbackBaseTokenFlag(routing.callbacks, routing.seller),\n p... | high |
```\nfunction setMaxTxPercent(uint256 maxTxPercent) external onlyOwner {\n _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**3);\n}\n```\n | none |
```\nfunction tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n}\n```\n | none |
```\nfunction calculatePrice() public view returns (uint256) {\n require(liquidity > 0, "No Liquidity");\n return liquidity / _balances[address(this)];\n}\n```\n | none |
```\nmodifier onlyActiveState(address \_signer) {\n\n SignerInformation memory si = signerIndex[\_signer];\n require(si.stage == Stages.Active, "address is not an in3-signer");\n\n In3Node memory n = nodes[si.index];\n assert(nodes[si.index].signer == \_signer);\n \_;\n}\n```\n | low |
```\nfunction restoreAllFee() private {\n _taxFee = _previousTaxFee;\n _liquidityFee = _previousLiquidityFee;\n}\n```\n | none |
```\nuint256 cf = IUSSD(USSD).collateralFactor();\nuint256 flutter = 0;\nfor (flutter = 0; flutter < flutterRatios.length; flutter++) {\n if (cf < flutterRatios[flutter]) {\n break;\n }\n}\n```\n | medium |
```\nfunction _getTValues(uint256 tAmount, uint256 taxFee, uint256 teamFee) private pure returns (uint256, uint256, uint256) {\n uint256 tFee = tAmount.mul(taxFee).div(100);\n uint256 tTeam = tAmount.mul(teamFee).div(100);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam);\n return (tTransferAmount, ... | none |
```\nfunction setCooldownEnabled(bool onoff) external onlyOwner() {\n cooldownEnabled = onoff;\n}\n```\n | none |
```\nfunction mint(address to, uint256 _tokenId)\n external\n payable\n whenNotPaused\n requireState(DrawState.Closed)\n{\n uint256 received = msg.value;\n\n require(to != address(0), "DCBW721: Address cannot be 0");\n require(\n received == _mintPrice,\n "DCBW721: Ether sent mismatch... | none |
```\n function initialize() external initializer {\n __Ownable_init();\n }\n```\n | low |
```\n require(\n balance + tokenXAmount <= maxLiquidity,\n "Pool has already reached it's max limit"\n );\n```\n | medium |
```\nfor (uint256 i = 0; i < \_toReset.length; i++) {\n require(\_tokenIsContractOrETH(\_toReset[i]), ERROR\_INVALID\_TOKENS);\n toReset.push(\_toReset[i]);\n}\n```\n | high |
```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n require(c / a == b, "SafeMath: multiplication overflow");\n return c;\n}\n```\n | none |
```\nrequire(\_startBlock > block.number, "Proposal start block must be in the future");\nrequire(\_durationBlocks > 0, "Proposal cannot have a duration of 0 blocks");\nrequire(\_expiresBlocks > 0, "Proposal cannot have a execution expiration of 0 blocks");\nrequire(\_votesRequired > 0, "Proposal cannot have a 0 votes ... | high |
```\nfunction viewRawAmount (address \_assim, int128 \_amt) internal returns (uint256 amount\_) {\n\n // amount\_ = IAssimilator(\_assim).viewRawAmount(\_amt); // for production\n\n bytes memory data = abi.encodeWithSelector(iAsmltr.viewRawAmount.selector, \_amt.abs()); // for development\n\n amount\_ = abi.de... | medium |
```\nfor (uint256 i = 0; i < epochNumbers.length; i++) {\n if (\_claimedRewardsPerEpoch[shareId][epochNumbers[i]][\_msgSender()]) revert AlreadyClaimed();\n \_claimedRewardsPerEpoch[shareId][epochNumbers[i]][\_msgSender()] = true;\n uint256 epochRewards = \_availableReward(shareId, isDelegator, epochNumbers[i]... | low |
```\nl2Outputs.push(\n Types.OutputProposal({\n outputRoot: _outputRoot,\n timestamp: uint128(block.timestamp),\n l2BlockNumber: uint128(_l2BlockNumber)\n })\n );\n```\n | medium |
```\nreceive() external payable {}\n```\n | none |
```\nUFixed6 collateral = marketContext.currentPosition.maker\n .sub(marketContext.currentPosition.net().min(marketContext.currentPosition.maker)) // available maker\n .min(marketContext.closable.mul(StrategyLib.LEVERAGE_BUFFER)) // available closable\n .muldiv(marketContext.latestPrice.... | high |
```\n function repay(uint256 repayAmount, uint256 _userLoanId) external {\n Loan memory userLoan = loans[msg.sender][_userLoanId];\n if(userLoan.borrowedAmount < repayAmount) revert ExcessiveRepay();\n if(block.timestamp > userLoan.endDate) revert LoanExpired();\n uint256 interestLoanRatio = FixedPointMath... | high |
```\nfunction deposit(\n address asset,\n uint256 amount,\n address onBehalfOf,\n uint16 referralCode\n) external override {\n \_whenNotPaused();\n ReserveLogic.ReserveData storage reserve = \_reserves[asset];\n\n ValidationLogic.validateDeposit(reserve, amount);\n\n address aToken = reserve.aTokenAddress;\n\n ... | low |
```\nFile: VaultValuation.sol\n // NOTE: deposit amount is always positive in this method\n if (depositUnderlyingInternal < maxLiquidatorDepositLocal) {\n // If liquidating past the debt outstanding above the min borrow, then the entire\n // debt outstanding must be liquidated.\n\n ... | high |
```\n for (uint256 i = 0; i < data.length; i++) {\n require(\n to[i] != address(0)\n );\n\n // solhint-disable-next-line avoid-low-level-calls\n (succeeded,) = to[i].call(abi.encodePacked(data[i], account, sender));\n\n require(\n succeeded\n );\n }\n}\n```\n | low |
```\nFile:\n\n function consult(address token) public view whenNotPaused returns (int256, uint8) {\n address _feed = feeds[token];\n\n if (_feed == address(0)) revert Errors.NoTokenPriceFeedAvailable();\n\n ChainlinkResponse memory chainlinkResponse = _getChainlinkResponse(_feed);\n ChainlinkResponse memor... | medium |
```\n function upgradeWalletType() external {\n if (!isWallet(msg.sender)) \n revert WalletDoesntExist(msg.sender); uint8 fromWalletType = _walletDataMap[msg.sender].walletType;\n _setWalletType(msg.sender, _upgradablePaths[fromWalletType]);\n emit WalletUpgraded(msg.sender, fromWalletType,\n _upgrada... | medium |
```\n// In the event that the majority/all of members go offline permanently and no more proposals could be passed, a current member or a regular node can 'challenge' a DAO members node to respond\n// If it does not respond in the given window, it can be removed as a member. The one who removes the member after the cha... | high |
```\nfunction updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){\n require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");\n require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply.");\n s... | none |
```\nfunction swapToETH(uint256 _amount) internal {\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = uniswapRouter.WETH();\n _approve(address(this), address(uniswapRouter), _amount);\n uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\n _amount,\n ... | none |
```\nfunction _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n}\n```\n | none |
```\nFile: TwoTokenPoolUtils.sol\n /// @notice Returns parameters for joining and exiting Balancer pools\n function _getPoolParams(\n TwoTokenPoolContext memory context,\n uint256 primaryAmount,\n uint256 secondaryAmount,\n bool isJoin\n ) internal pure returns (PoolParams memory) {... | high |
```\nrequire(\_isOperator(msg.sender, \_from), EC\_58\_INVALID\_OPERATOR);\n```\n | medium |
```\nstruct SignerInformation {\n uint64 lockedTime; /// timestamp until the deposit of an in3-node can not be withdrawn after the node was removed\n address owner; /// the owner of the node\n\n Stages stage; /// state of the address\n\n uint depos... | low |
```\nfunction updateMaxWallet(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 5) / 1000) / 1e18,\n "Cannot set maxWallet lower than 0.5%"\n );\n maxWallet = newNum * (10**18);\n}\n```\n | none |
```\n require(msg.sender == txData.user || recoverSignature(txData.transactionId, relayerFee, "cancel", signature) == txData.user, "#C:022");\n\n Asset.transferAsset(txData.sendingAssetId, payable(msg.sender), relayerFee);\n }\n\n // Get the amount to refund the user\n uint256 toRefund;\n unchecke... | medium |
```\nfunction processDepositCancellation(\n GMXTypes.Store storage self\n) external {\n GMXChecks.beforeProcessDepositCancellationChecks(self);\n // rest of code\n // Transfer requested withdraw asset to user\n IERC20(self.depositCache.depositParams.token).safeTransfer(\n self.depositCache.user,\n self.depositCache... | medium |
```\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 |
```\n uint256 totalUserCollateral = totalCollateralValue(_collateralAddress, _loanHolder);\n uint256 proposedLiquidationAmount;\n { //scope block for liquidationAmount due to stack too deep\n uint256 liquidationAmount = viewLiquidatableAmount(totalUserCollateral, 1 ether, isoUSDBorrowed,... | medium |
```\nif (\_openDate != 0) {\n \_setOpenDate(\_openDate);\n}\n```\n | medium |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.