function stringlengths 12 7.23k | severity stringclasses 4
values |
|---|---|
```\nfunction addMultiple(address[] calldata tokens, uint256[] calldata maxAmounts)\n external\n payable\n override\n returns (uint256 actualLP)\n{\n // Perform basic checks\n Config memory _config = DFPconfig;\n require(_config.unlocked, "DFP: Locked");\n require(tokens.length == 16, "DFP: Bad tokens array len... | none |
```\n func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { \n if addr == dump.MessagePasserAddress { \n statedumper.WriteMessage(caller.Address(), input) \n } \n```\n | medium |
```\nfunction addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n // approve token transfer to cover all possible scenarios\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n // add the liquidity\n uniswapV2Router.addLiquidityETH{value: ethAmount}(\n address(this),\n ... | none |
```\nfunction excludeFromFees(address account, bool excluded) public onlyOwner {\n _isExcludedFromFees[account] = excluded;\n emit ExcludeFromFees(account, excluded);\n}\n```\n | none |
```\nFile: LiquidationFacetImpl.sol\n function liquidatePartyA(address partyA, SingleUpnlSig memory upnlSig) internal {\n MAStorage.Layout storage maLayout = MAStorage.layout();\n\n LibMuon.verifyPartyAUpnl(upnlSig, partyA);\n int256 availableBalance = LibAccount.partyAAvailableBalanceForLiquida... | high |
```\nfunction toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\n return toString(value);\n } else {\n return store;\n }\n}\n```\n | none |
```\n try params.contracts.swapHandler.swap(\n SwapUtils.SwapParams(\n params.contracts.dataStore,\n params.contracts.eventEmitter,\n params.contracts.oracle,\n Bank(payable(order.market())),\n params.key,\n resu... | medium |
```\nfunction supplyNativeToken(address user) internal nonReentrant {\n WethInterface(weth).deposit{value: msg.value}();\n IERC20(weth).safeIncreaseAllowance(address(ironBank), msg.value);\n ironBank.supply(address(this), user, weth, msg.value);\n}\n```\n | high |
```\nfunction switchMaintainerFee(\n DataStoreUtils.DataStore storage DATASTORE,\n uint256 id,\n uint256 newFee\n) external {\n DATASTORE.writeUintForId(\n id,\n "priorFee",\n DATASTORE.readUintForId(id, "fee")\n );\n DATASTORE.writeUintForId(\n id,\n "feeSwitch",\n block.timestamp + FEE\_SWITCH\_LATENCY\n );\n DATASTO... | medium |
```\nfunction _incrementDeposit(address account, uint256 amount) internal {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n require(newAmount <= type(uint112).max, "deposit overflow");\n info.deposit = uint112(newAmount);\n}\n```\n | none |
```\nenum OrderStatus {EXPIRED, CANCELLED, FILLABLE, FULLY\_FILLED}\n```\n | low |
```\n function _verifyRemoveSig(address fidOwner, bytes memory key, uint256 deadline, bytes memory sig) internal {\n _verifySig(\n _hashTypedDataV4(\n keccak256(abi.encode(REMOVE_TYPEHASH, fidOwner, keccak256(key), _useNonce(fidOwner), deadline))\n ),\n fidOwner... | medium |
```\nIPeUSD public EUSD;\n```\n | low |
```\nassert(\_blockNumber > \_blockheaders.length);\n```\n | medium |
```\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 |
```\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'sa... | medium |
```\nfunction upgradeAgent(\n address agent\n) external returns (address newAgent) {\n IAgent oldAgent = IAgent(agent);\n address owner = IAuth(address(oldAgent)).owner();\n uint256 agentId = agents[agent];\n // only the Agent's owner can upgrade, and only a registered agent can be upgraded\n if (owner != msg.sender ||... | medium |
```\nassembly {\n flag := mload(add(\_data, 32))\n}\nif (flag == CHANGE\_PARTITION\_FLAG) {\n assembly {\n toPartition := mload(add(\_data, 64))\n```\n | high |
```\nfunction _verifyLendingPoolIsActive(\n IDefaultStateManager defaultStateManager,\n address _protectionPoolAddress,\n address _lendingPoolAddress\n ) internal view {\n LendingPoolStatus poolStatus = defaultStateManager.getLendingPoolStatus(\n _protectionPoolAddress,\n _lendingPoolAddress\n ... | high |
```\n function getTargetExternalLendingAmount(\n Token memory underlyingToken,\n PrimeCashFactors memory factors,\n RebalancingTargetData memory rebalancingTargetData,\n OracleData memory oracleData,\n PrimeRate memory pr\n ) internal pure returns (uint256 targetAmount) {\n ... | medium |
```\nfunction withdrawFromGauge(uint256 _NFTId, address[] memory _tokens) public {\n uint256 amount = depositReceipt.pooledTokens(_NFTId);\n depositReceipt.burn(_NFTId);\n gauge.getReward(address(this), _tokens);\n gauge.withdraw(amount);\n //AMMToken adheres to ERC20 spec meaning it reverts on failure... | high |
```\nlift(key, stake, -amount, stakee, staker);\n```\n | low |
```\n function _setTemplate(\n string memory templateName,\n uint256 templateVersion,\n address implementationAddress\n ) internal {\n// rest of code\n\n if (latestImplementation[templateName] == address(0)) { /****add other version, _templateNames will duplicate ****/\n _tem... | medium |
```\nfunction isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 c... | none |
```\n /**\n * @notice Get token A and token B's LP token amount required for a given value\n * @param givenValue Given value needed, expressed in 1e30 -------------------------- refer this\n * @param marketToken LP token address\n * @param indexToken Index token address\n * @param longToken Long token a... | low |
```\n// ABI encode calldata for `fillOrder`\nbytes memory fillOrderCalldata = abi.encodeWithSelector(\n IExchangeCore(address(0)).fillOrder.selector,\n order,\n takerAssetFillAmount,\n signature\n);\n\n(bool didSucceed, bytes memory returnData) = address(this).delegatecall(fillOrderCalldata);\n```\n | medium |
```\nFile: BondFixedExpiryTeller.sol\n // If fee is greater than the create discount, then calculate the fee and store it\n // Otherwise, fee is zero.\n if (protocolFee > createFeeDiscount) {\n // Calculate fee amount\n uint256 feeAmount = amount_.mulDiv(protocolFee - createFe... | medium |
```\nfunction rebind(address token, uint balance, uint denorm)\n public\n \_logs\_\n \_lock\_\n{\n\n require(msg.sender == \_controller, "ERR\_NOT\_CONTROLLER");\n require(\_records[token].bound, "ERR\_NOT\_BOUND");\n require(!\_finalized, "ERR\_IS\_FINALIZED");\n\n require(denorm >= MIN\_WEIGHT, "... | low |
```\nFile: PartyBFacetImpl.sol\n function emergencyClosePosition(uint256 quoteId, PairUpnlAndPriceSig memory upnlSig) internal {\n AccountStorage.Layout storage accountLayout = AccountStorage.layout();\n Quote storage quote = QuoteStorage.layout().quotes[quoteId];\n require(quote.quoteStatus == ... | medium |
```\nfunction test_DeleteBridgeWithAssets() public {\n console.log("Sender ethEscrowed in vault 2 before deposit: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\n deal(_rethA, sender, 10000 ether);\n\n vm.startPrank(sender);\n uint88 deposit1 = 1000 ether;\n uint88 withdrawAmo... | low |
```\n function validateCommitment(IAstariaRouter.Commitment calldata commitment)\n public\n returns (bool valid, IAstariaRouter.LienDetails memory ld)\n {\n require(\n commitment.lienRequest.strategy.deadline >= block.timestamp,\n "deadline passed"\n );\n\n\n require(\n strategyValidator... | medium |
```\nFile: InvariantChecks.sol\n /// @dev Returns the difference between actual total collateral balance in the vault vs tracked collateral\n /// Tracked collateral should be updated when depositing to stable LP (stableCollateralTotal) or\n /// opening leveraged positions (marginDepositedTotal).\n ... | medium |
```\n minTimestamp_ = _verifyValidatorSignatures(\n msg.sender,\n collateral_,\n retrievalIds_,\n metadataHash_,\n validators_,\n timestamps_,\n signatures_\n );\n // rest of code\n _updateCollateral(msg.sender, saf... | medium |
```\nconstructor(address payable mainContract, address router, address token, string memory _name,\n string memory _ticker) DividendPayingToken(_name, _ticker) {\n \n trackerName = _name;\n trackerTicker = _ticker;\n defaultToken = token;\n VenomContract = Venom(mainContract);\n minimumToke... | none |
```\n if (self.withdrawCache.withdrawParams.token == address(self.WNT)) {\n self.WNT.withdraw(self.withdrawCache.tokensToUser);\naudit transfer ETH and call (bool success, ) = self.withdrawCache.user.call{value: address(this).balance}("");\n require(success, "Transfer failed.");\n } else ... | medium |
```\nfunction add(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a + b;\n require((b >= 0 && c >= a) || (b < 0 && c < a));\n return c;\n}\n```\n | none |
```\n address priceQuoteToken = _getPriceQuoteToken(tokenIn, tokenOut);\n price = oracle.getLatestPrice(priceQuoteToken);\n _checkPrice(priceQuoteToken, price);\n\n feeNumerator = isBuy ? pair.buyFee : pair.sellFee;\n feeToken = IERC20Token(priceQuoteToken == tokenIn ? tokenOut : toke... | medium |
```\nconstructor() {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n}\n```\n | none |
```\n// @audit no staleness check\n(, int256 externallyReportedV3Balance, , , ) = AggregatorV3Interface(\n ExternalV3ReservesPoROracle\n).latestRoundData();\n```\n | low |
```\ngaugeQueuedRewards[gauge] = QueuedRewards({\n priorCycleRewards: queuedRewards.priorCycleRewards + completedRewards,\n cycleRewards: uint112(nextRewards),\n storedCycle: currentCycle\n});\n```\n | high |
```\nfunction functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, "Address: low-level call failed");\n}\n```\n | none |
```\nfunction _setTransceiver(address transceiver) internal returns (uint8 index) {\n /* snip */\n if (transceiver == address(0)) {\n revert InvalidTransceiverZeroAddress();\n }\n\n if (_numTransceivers.registered >= MAX_TRANSCEIVERS) {\n revert TooManyTransceivers();\n }\n\n if (transce... | medium |
```\nfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n}\n```\n | none |
```\n it("previewWithdraw reverts if buyer has too many contracts", async () => {\n assert.isEmpty(await auction.getEpochsByBuyer(addresses.buyer1));\n\n await asset\n .connect(signers.buyer1)\n .approve(addresses.auction, ethers.constants.MaxUint256);\n\n const totalCon... | high |
```\nfunction _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, d... | none |
```\nfunction \_hashLeaf(uint32 user\_id, uint256 user\_amount, bytes32 leaf) private returns (bool) {\n```\n | low |
```\npragma solidity ^0.5.2;\npragma experimental ABIEncoderV2; // to enable structure-type parameters\n```\n | medium |
```\nFile: CurveAdapter.sol\n function _exactInSingle(Trade memory trade)\n internal view returns (address target, bytes memory executionCallData)\n {\n address sellToken = _getTokenAddress(trade.sellToken);\n address buyToken = _getTokenAddress(trade.buyToken);\n ICurvePool pool = ICu... | medium |
```\nfunction testBorrowOverflow() public {\n uint256 borrowAmount = 1e40;\n BorrowArg[] memory borrowArgs = new BorrowArg[](1);\n (, ,uint256 loanId , ) = kairos.getParameters();\n loanId += 1;\n\n Offer memory offer = Offer({\n assetToLend: money,\n loanToValue: 1e61,\n ... | medium |
```\nuint256 balTotalSupply = pool.balancerPool.totalSupply();\nuint256[] memory balances = new uint256[](_vaultTokens.length);\n// Calculate the proportion of the pool balances owned by the polManager\nif (balTotalSupply != 0) {\n // Calculate the amount of OHM in the pool owned by the polManager\n // We have to... | medium |
```\n function _decreaseCurrentMinted(address account, uint256 amount) internal virtual {\n // If the burner is a vault, subtract burnt TAU from its currentMinted.\n // This has a few highly unimportant edge cases which can generally be rectified by increasing the relevant vault's mintLimit.\n u... | medium |
```\nconstructor() {\n \_disableInitializers();\n}\n```\n | low |
```\nthe oracle process:\n\n1. the oracle node checks the latest price from reference exchanges and stores it with the oracle node's timestamp, e.g. time: 1000\n2. the oracle node checks the latest block of the blockchain, e.g. block 100, it stores this with the oracle node's timestamp as well\n3. the oracle node signs... | high |
```\nfunction toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return "0x00";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n}\n```\n | none |
```\nfunction sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n}\n```\n | none |
```\nfunction _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n}\n```\n | none |
```\nfunction reduceWeight(IERC20Token \_reserveToken)\n public\n validReserve(\_reserveToken)\n ownerOnly\n{\n \_protected();\n```\n | high |
```\nfunction getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n}\n```\n | none |
```\nfunction approveDomainBid(\n uint256 parentId,\n string memory bidIPFSHash,\n bytes memory signature\n) external authorizedOwner(parentId) {\n bytes32 hashOfSig = keccak256(abi.encode(signature));\n approvedBids[hashOfSig] = true;\n emit DomainBidApproved(bidIPFSHash);\n}\n```\n | high |
```\nfunction createTier(\n mapping(uint256 => ITokenSaleProposal.Tier) storage tiers,\n uint256 newTierId,\n ITokenSaleProposal.TierInitParams memory _tierInitParams\n ) external {\n\n // rest of code.\n /// @dev return value is not checked intentionally\n > tierInitParams.s... | high |
```\n 1 2 3 4 5 6 7 8 9 < block number\nO1: A B B B B C C C D\nA A B B B B C C C\n^^ grouped oracle block ranges\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 |
```\n function heal(uint256[] calldata agentIds) external nonReentrant {\n _assertFrontrunLockIsOff();\n//@audit If there are not enough activeAgents, heal is disabled\n if (gameInfo.activeAgents <= NUMBER_OF_SECONDARY_PRIZE_POOL_WINNERS) {\n revert HealingDisabled();\n }\n```\n | medium |
```\nint256 priceDiff = int256(currentPrice - lastPrices[_protocolId]);\n```\n | medium |
```\nFile: libraries/V2Calculations.sol\n\n 93: // Cast to int265 to avoid underflow errors (negative means loan duration has passed)\n 94: int256 durationLeftOnLoan = int256(\n 95: uint256(_bid.loanDetails.loanDuration)\n 96: ) -\n 97: (int256(_timestamp) -\n 98: ... | medium |
```\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 |
```\n function addWithdrawRequest(uint256 _amountMLP, address _token) external {\n require(isAcceptingToken(_token), "ERROR: Invalid token");\n require(_amountMLP != 0, "ERROR: Invalid amount");\n \n address _withdrawer = msg.sender;\n // Get the pending buffer and ... | high |
```\nfunction approve(address spender, uint amount) external override returns (bool) {\n allowance[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n}\n```\n | none |
```\n/// @notice Reset the given pool's TRIBE allocation to 0 and unlock the pool. Can only be called by the governor or guardian.\n/// @param \_pid The index of the pool. See `poolInfo`. \nfunction resetRewards(uint256 \_pid) public onlyGuardianOrGovernor {\n // set the pool's allocation points to zero\n totalAl... | low |
```\nfunction recoverStake(address \_operator) public {\n uint256 operatorParams = operators[\_operator].packedParams;\n require(\n block.number > operatorParams.getUndelegationBlock().add(undelegationPeriod),\n "Can not recover stake before undelegation period is over."\n );\n```\n | high |
```\n if (\n mapPrefix == _LSP10_VAULTS_MAP_KEY_PREFIX && notifier.code.length > 0 &&\n !notifier.supportsERC165InterfaceUnchecked(_INTERFACEID_LSP9)\n ) {\n return "LSP1: not an LSP9Vault ownership transfer";\n }\n```\n | low |
```\nfunction functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n) internal view returns (bytes memory) {\n require(isContract(target), "Address: static call to non-contract");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyC... | none |
```\nif (vrfRequests[_requestId].fulfilled) revert InvalidVrfState();\n```\n | high |
```\nfunction doTransfer(\n address sender,\n address recipient,\n uint amount\n) internal returns (bool) {\n if (!isAuthorized[sender] && !isAuthorized[recipient]) {\n require(launched, "VoxNET: transfers not allowed yet");\n }\n\n require(balanceOf[sender] >= amount, "VoxNET: insufficient bal... | none |
```\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 |
```\nfunction _withdraw(address account) internal returns (uint256 withdrawn) {\n // leave balance of 1 for gas efficiency\n // underflow if ethBalance is 0\n withdrawn = ethBalances[account] - 1;\n ethBalances[account] = 1;\n account.safeTransferETH(withdrawn);\n}\n```\n | none |
```\nit('adiabatic fee', async () => {\n function setupOracle(price: string, timestamp : number, nextTimestamp : number) {\n const oracleVersion = {\n price: parse6decimal(price),\n timestamp: timestamp,\n valid: true,\n }\n oracle.at.whenCalledWith(oracleVersion.timestamp).returns(oracleVersio... | medium |
```\nfunction _takeLiquidity(uint256 tLiquidity) private {\n uint256 currentRate = _getRate();\n uint256 rLiquidity = tLiquidity.mul(currentRate);\n _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);\n if (_isExcluded[address(this)])\n _tOwned[address(this)] = _tOwned[address(this)].add... | none |
```\nfunction tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Y... | none |
```\n function fulfillDomainBid(\n uint256 parentId,\n uint256 bidAmount,\n uint256 royaltyAmount,\n string memory bidIPFSHash,\n string memory name,\n string memory metadata,\n bytes memory signature,\n bool lockOnCreation,\n address recipient\n) external {\n bytes32 recoveredBidHash = createBid(parentId, b... | medium |
```\nfunction approvedToLog(address \_caller) public pure returns (bool) {\n /\* TODO: auth via system \*/\n \_caller;\n return true;\n}\n```\n | high |
```\ndai.transferFrom(msg.sender, address(this), \_amount);\n```\n | medium |
```\nfunction isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(acco... | none |
```\nfunction maxWithdraw(address owner) public view returns (uint256) {\n return convertToAssets(liquidStakingToken.balanceOf(owner));\n}\n```\n | low |
```\nfunction forceSwapAndSendDividends(uint256 tokens) public onlyOwner {\n tokens = tokens * (10**18);\n uint256 totalAmount = buyAmount.add(sellAmount);\n uint256 fromBuy = tokens.mul(buyAmount).div(totalAmount);\n uint256 fromSell = tokens.mul(sellAmount).div(totalAmount);\n\n swapAndSendDividends(to... | none |
```\n function getEthPrice() internal view returns (uint) {\n (, int answer,, uint updatedAt,) =\n ethUsdPriceFeed.latestRoundData();\n\n if (block.timestamp - updatedAt >= 86400)\n revert Errors.StalePrice(address(0), address(ethUsdPriceFeed));\n\n if (answer <= 0)\n ... | medium |
```\n// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.21;\n\nimport { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";\n\nerror BrokenTokenPriceFeed();\n\ncontract PassWithNegativePrice {\n\n using SafeCast for int256;\n\n uint256 public maxDeviations;\n int256 public currentRespon... | low |
```\nfunction DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n}\n```\n | none |
```\nfunction getCurrentNFTMintingPrice() public view returns (uint256) {\n if (block.timestamp < defaultSaleStartTime) return DEFAULT_NFT_PRICE;\n\n uint256 calculateTimeDifference = block.timestamp -\n defaultSaleStartTime;\n\n uint256 calculateIntervals = calculateTimeDifference /\n DEFAULT_TI... | none |
```\nfunction abs(int256 a) internal pure returns (int256) {\n require(a != MIN_INT256);\n return a < 0 ? -a : a;\n}\n```\n | none |
```\nfunction setGasPriceLimit(uint256 GWEI) external onlyOwner {\n require(GWEI >= 50, "can never be set lower than 50");\n gasPriceLimit = GWEI * 1 gwei;\n}\n```\n | none |
```\n require(\n balance + tokenXAmount <= maxLiquidity,\n "Pool has already reached it's max limit"\n );\n```\n | medium |
```\nfunction restoreAllFee() private {\n _taxFee = _previousTaxFee;\n _liquidityFee = _previousLiquidityFee;\n}\n```\n | none |
```\nfunction withdraw(uint256 amount, address payable destination) public {\n require(\n unbondedValue[msg.sender] >= amount,\n "Insufficient unbonded value"\n );\n\n unbondedValue[msg.sender] -= amount;\n\n (bool success, ) = destination.call.value(amount)("");\n require(success, "Transfe... | low |
```\nFile: TokenUtils.sol\n function checkApprove(IERC20 token, address spender, uint256 amount) internal {\n if (address(token) == address(0)) return;\n\n IEIP20NonStandard(address(token)).approve(spender, amount);\n _checkReturnCode();\n }\n```\n | medium |
```\nfunction setAutoClaim(bool value) external {\n dividendTracker.setAutoClaim(msg.sender, value);\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 |
```\nif (vc.value <= interestOwed) {\n // compute the amount of epochs this payment covers\n // vc.value is not WAD yet, so divWadDown cancels the extra WAD in interestPerEpoch\n uint256 epochsForward = vc.value.divWadDown(interestPerEpoch);\n // update the account's `epochsPaid` cursor\n account.epochsPaid += epochsFo... | low |
```\n/// @notice Verifies the nonce of a voter on a proposal\n/// @param \_proposalId The id of the proposal\n/// @param \_voter The address of the voter\n/// @param \_relayerNonce The nonce submitted by the relayer\nfunction verifyNonce(uint256 \_proposalId, address \_voter, uint256 \_relayerNonce) public view {\n ... | high |
```\nFile: TellerV2.sol\n 854 function calculateNextDueDate(uint256 _bidId)\n 855 public\n 856 view\n 857 returns (uint32 dueDate_)\n 858 {\n 859 Bid storage bid = bids[_bidId];\n 860 if (bids[_bidId].state != BidState.ACCEPTED) return dueDate_;\n 861\n 862 uint32... | medium |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.