function
stringlengths
12
63.3k
severity
stringclasses
4 values
```\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 function reinvestReward(\n MetaStable2TokenAuraStrategyContext calldata context,\n ReinvestRewardParams calldata params\n )\n```\n
medium
```\nfunction setTokenStatus(address tokenAddress, TokenStatus status) external onlyRole(TOKEN_MANAGER) {\n require(tokenInfos[tokenAddress].tokenSourceAddress != bytes32(0), "Bridge: unsupported token");\n tokenInfos[tokenAddress].tokenStatus = status;\n}\n```\n
none
```\nstruct ZeroExTransaction {\n uint256 salt; // Arbitrary number to ensure uniqueness of transaction hash.\n uint256 expirationTimeSeconds; // Timestamp in seconds at which transaction expires.\n uint256 gasPrice; // gasPrice that transaction is required to be executed with....
low
```\n if (amountToSwap > 0) {\n SWAP_POOL = IUniswapV3Pool(vault.pool());\n uint160 deltaSqrt = (param.sqrtRatioLimit *\n uint160(param.sellSlippage)) / uint160(Constants.DENOMINATOR);\n SWAP_POOL.swap(\n address(this),\n // if withdraw token is Token0, then swap...
high
```\n/// @dev only callable in the 1st year after deployment\nfunction removeNodeFromRegistry(address \_signer)\n external\n onlyActiveState(\_signer)\n{\n\n // solium-disable-next-line security/no-block-members\n require(block.timestamp < (blockTimeStampDeployment + YEAR\_DEFINITION), "only in 1st year");/...
medium
```\n/// @notice Goes from courtesy call to active\n/// @dev Only callable if collateral is sufficient and the deposit is not expiring\n/// @param \_d deposit storage pointer\nfunction exitCourtesyCall(DepositUtils.Deposit storage \_d) public {\n require(\_d.inCourtesyCall(), "Not currently in courtesy call");\n ...
low
```\nfunction getRoundData(uint80 _roundId)\n public\n view\n virtual\n override\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n {\n (uint16 phaseId, uint64 aggregatorRoundId) = parseIds(_roundId);\n\n...
medium
```\n function test_protocol_owner_frontRuns_swaps_with_higher_fees() public whenMaturityNotPassed {\n // pre-condition\n vm.warp(maturity - 30 days);\n deal(address(pts[0]), alice, type(uint96).max, false); // ensure alice has enough pt\n uint256 preBaseLptSupply = tricrypto.totalSupply();\...
medium
```\n uint256 constant ISOUSD_TIME_DELAY = 3; // days;\n```\n
medium
```\n// AccountV1.sol\n\nfunction _deposit(\n address[] memory assetAddresses,\n uint256[] memory assetIds,\n uint256[] memory assetAmounts,\n address from\n ) internal {\n // If no Creditor is set, batchProcessDeposit only checks if the assets can be priced.\n // If a Credi...
high
```\n _require(minPrice <= price && price <= maxPrice, Errors.PRICE_INVALID);\n```\n
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
```\nrequire(block.timestamp >= \_d.withdrawalRequestTime + TBTCConstants.getIncreaseFeeTimer(), "Fee increase not yet permitted");\n```\n
medium
```\n require(!v.frozen, "Validator is frozen");\n```\n
medium
```\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
```\nuint256 ticketSplit = totalSupply.div(\_\_numberOfWinners);\nuint256 nextRandom = randomNumber.add(ticketSplit);\n// the other winners receive their prizeShares\nfor (uint256 winnerCount = 1; winnerCount < \_\_numberOfWinners; winnerCount++) {\n winners[winnerCount] = ticket.draw(nextRandom);\n nextRandom = next...
low
```\nfunction updatePayoutToken(address token) public onlyOwner {\n defaultToken = token;\n}\n```\n
none
```\nfunction withdrawStuckTokens(address ERC20_token) external onlyOwner {\n require(ERC20_token != address(this), "Owner cannot claim native tokens");\n\n uint256 tokenBalance = IERC20(ERC20_token).balanceOf(address(this));\n require(tokenBalance > 0, "No tokens available to withdraw");\n\n bool success =...
none
```\nslot0 = slot0_ | ((block.timestamp + LIQUIDATION_GRACE_PERIOD) << 208);\n```\n
high
```\n (\n uint80 baseRoundID,\n int256 basePrice,\n /*uint256 baseStartedAt*/\n ,\n uint256 baseTimeStamp,\n /*uint80 baseAnsweredInRound*/\n ) = baseOracle.latestRoundData();\n```\n
low
```\n// Findings are labeled with '<= FOUND'\n// File: src/Distributor.sol\n function _distribute(address token, address[] memory winners, uint256[] memory percentages, bytes memory data)\n // rest of code\n _commissionTransfer(erc20);// <= FOUND\n // rest of code\n }\n // rest of code\n func...
medium
```\nconstructor() {\n _balances[address(this)] = _totalSupply;\n\n isFeeExempt[msg.sender] = true;\n isFeeExempt[MIGRATION_WALLET] = true;\n \n isTxLimitExempt[MIGRATION_WALLET] = true;\n isTxLimitExempt[msg.sender] = true;\n isTxLimitExempt[address(this)] = true;\n isTxLimitExempt[DEAD] = true...
none
```\nfunction update(\n Account memory self,\n uint256 currentId,\n UFixed6 assets,\n UFixed6 shares,\n UFixed6 deposit,\n UFixed6 redemption\n) internal pure {\n self.current = currentId;\n // @audit global account will have less assets and shares than sum of local accounts\n (self.assets, s...
high
```\n for (uint256 i; i < numRecipients; ) {\n expectedTotalValue += amounts[i];\n\n unchecked {\n ++i;\n }\n }\n\n if (msg.value != expectedTotalValue) {\n revert INVALID_DEPOSIT();\n }\n```\n
high
```\n if (token == quoteAsset || token == baseAsset || token == weth) {\n revert CannotRecoverRestrictedToken(address(this));\n }\n token.transfer(recipient, token.balanceOf(address(this)));\n```\n
medium
```\nfunc MigrateWithdrawal(withdrawal *LegacyWithdrawal, l1CrossDomainMessenger *common.Address) (*Withdrawal, error) {\n // Attempt to parse the value\n value, err := withdrawal.Value()\n if err != nil {\n return nil, fmt.Errorf("cannot migrate withdrawal: %w", err)\n }\n\n abi, err := bindings.L1CrossDomainMessenge...
high
```\n uint256 balanceBefore = getVaultBalance() - reservedFunds;\n vaultCurrency.safeTransferFrom(msg.sender, address(this), _amount);\n uint256 balanceAfter = getVaultBalance() - reservedFunds;\n uint256 amount = balanceAfter - balanceBefore;\n```\n
medium
```\nfunction _createAuction() private returns (bool) {\n // Get the next token available for bidding\n try token.mint() returns (uint256 tokenId) {\n // Store the token id\n auction.tokenId = tokenId;\n\n // Cache the current timestamp\n uint256 startTime = block.timestamp;\n\n // Used to store the auction end ti...
medium
```\nfunction test_fulfillRandomWords_revert() public {\n _startGameAndDrawOneRound();\n\n _drawXRounds(48);\n \n uint256 counter = 0;\n uint256[] memory wa = new uint256[](30);\n uint256 totalCost = 0;\n\n for (uint256 j=2; j <= 6; j++) \n {\n (uint256...
medium
```\nfunction div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, "SafeMath: division by zero");\n}\n```\n
none
```\nfunction swapBack() private {\n uint256 contractBalance = balanceOf(address(this));\n uint256 totalTokensToSwap = contractBalance;\n bool success;\n\n if (contractBalance == 0) {\n return;\n }\n\n if (contractBalance > swapBackValueMax) {\n contractBalance = swapBackValueMax;\n }...
none
```\nuser.rewardDebt = int128(user.virtualAmount \* pool.accTribePerShare) / toSigned128(ACC\_TRIBE\_PRECISION);\n```\n
medium
```\nif (virtualSupply > 0) {\n uint256 blocks = block.number - pool.lastRewardBlock;\n uint256 tribeReward = (blocks \* tribePerBlock() \* pool.allocPoint) / totalAllocPoint;\n pool.accTribePerShare = uint128(pool.accTribePerShare + ((tribeReward \* ACC\_TRIBE\_PRECISION) / virtualSupply));\n}\n```\n
low
```\nFile: Constants.sol\n // Basis for percentages\n int256 internal constant PERCENTAGE_DECIMALS = 100;\n```\n
medium
```\n // Cut withdraw fee if it is in withdrawVaultFee Window (2 months)\n if (\n block.timestamp <\n config.withdrawVaultFeeWindowStartTime() +\n config.withdrawVaultFeeWindow()\n ) {\n uint256 fee = (withdrawAmount * config.withdrawVaultFee()) /\n DENOMINATOR;\n ...
high
```\n for (uint i = 0; i < rewardTokens.length; i++) {\n IERC20Upgradeable(rewardTokens[i]).safeTransfer(\n msg.sender,\n rewards[i]\n );\n }\n```\n
high
```\nfunction checkBlacklist(address _address) external view returns (bool) {\n return blacklisted[_address];\n}\n```\n
none
```\n function liveMarketsBy(address owner_) external view returns (uint256[] memory) {\n uint256 count;\n IBondAuctioneer auctioneer;\n for (uint256 i; i < marketCounter; ++i) {\n auctioneer = marketsToAuctioneers[i];\n if (auctioneer.isLive(i) && auctioneer.ownerOf(i) == ...
medium
```\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, "SafeMath: subtraction overflow");\n}\n```\n
none
```\nfunction refund() override external onlyMinipoolOwnerOrWithdrawalAddress(msg.sender) onlyInitialised {\n // Check refund balance\n require(nodeRefundBalance > 0, "No amount of the node deposit is available for refund");\n // If this minipool was distributed by a user, force finalisation on the node operat...
medium
```\n // 9 >= 10 is false\n if (currentSignerCount >= maxSigs) {\n revert MaxSignersReached();\n }\n\n // msg.sender is a new signer so he is not yet owner\n if (safe.isOwner(msg.sender)) {\n revert SignerAlreadyClaimed(msg.sender);\n }\n\n // msg.s...
high
```\nuint256 totalShare = rocketMinipoolManager.getMinipoolWithdrawalTotalBalance(msg.sender);\nuint256 nodeShare = rocketMinipoolManager.getMinipoolWithdrawalNodeBalance(msg.sender);\nuint256 userShare = totalShare.sub(nodeShare);\n// Get withdrawal amounts based on shares\nuint256 nodeAmount = 0;\nuint256 userAmount ...
low
```\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
```\n reserveRatio = ScalingUtils.scaleByBases(\n allReserves * valueBase / liabilities,\n valueBase,\n tokenManager.RESERVE_RATIO_BASE()\n );\n```\n
medium
```\nreceive() external payable {\n\n}\n```\n
none
```\nfunction getValueOfHoldings(address holder) public view returns (uint256) {\n return\n ((_balances[holder] * liquidity) / _balances[address(this)]) *\n getBNBPrice();\n}\n```\n
none
```\n// File: telcoin-audit/contracts/sablier/core/CouncilMember.sol\n function burn(\n // rest of code\n balances.pop(); // <= FOUND: balances.length decreases, while latest minted nft withold its unique tokenId\n _burn(tokenId);\n }\n```\n
high
```\nfunction totalSupply() public view override returns (uint256) {\n return _tTotal;\n}\n```\n
none
```\nFile: BaseLSTAdapter.sol\n function setRebalancer(address _rebalancer) external onlyOwner {\n rebalancer = _rebalancer;\n }\n```\n
medium
```\nfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n}\n```\n
none
```\nfunction calculateLiquidityFee(uint256 _amount)\n private\n view\n returns (uint256)\n{\n return _amount.mul(_liquidityFee).div(10**2);\n}\n```\n
none
```\nfunction tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n}\n```\n
none
```\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
```\nRocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));\nif (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) {\n // Update the price\n updatePrices(\_blo...
medium
```\nfunction _updateGrandPrizePool(uint256 grandPrize) internal {\n require(\n grandPrize <= address(this).balance.sub(_reserves),\n "DCBW721: GrandPrize-Balance Mismatch"\n );\n _grandPrizePool = grandPrize;\n}\n```\n
none
```\n for (uint i; i < swapParams.length; ) {\n // find excess amount after repay\n uint swapAmt = swapParams[i].operation == SwapOperation.EXACT_IN\n ? IERC20(swapParams[i].tokenIn).balanceOf(address(this)) - openTokenInfos[i].borrowAmt\n : openTokenInfos[i].borrowAmt - IERC20...
medium
```\n function mint(\n uint8 p,\n address u,\n uint256 m,\n uint256 a\n ) external unpaused(u, m, p) returns (bool) {\n // Fetch the desired principal token\n address principal = IMarketPlace(marketPlace).token(u, m, p);\n\n // Transfer the users principal tokens t...
high
```\nFile: LiquidationModule.sol\n /// @notice Function to liquidate a position.\n /// @dev One could directly call this method instead of `liquidate(uint256, bytes[])` if they don't want to update the Pyth price.\n /// @param tokenId The token ID of the leverage position.\n function liquidate(uint256 token...
high
```\nfunction setState(uint delegationId, State newState) internal {\n TimeHelpers timeHelpers = TimeHelpers(contractManager.getContract("TimeHelpers"));\n DelegationController delegationController = DelegationController(contractManager.getContract("DelegationController"));\n\n require(newState != State.PROPOS...
medium
```\nFile: LMPVault.sol\n function _collectFees(uint256 idle, uint256 debt, uint256 totalSupply) internal {\n address sink = feeSink;\n uint256 fees = 0;\n uint256 shares = 0;\n uint256 profit = 0;\n\n // If there's no supply then there should be no assets and so nothing\n /...
medium
```\nfunction setBlacklist(address _address, bool _isBlacklisted) external onlyOwner {\n blacklisted[_address] = _isBlacklisted;\n emit Blacklist(_address, _isBlacklisted);\n}\n```\n
none
```\naddressToWithdrawalNonce[\_partition][supplier] = withdrawalRootNonce;\n```\n
medium
```\nfunction _hashSplit(\n address[] memory accounts,\n uint32[] memory percentAllocations,\n uint32 distributorFee\n) internal pure returns (bytes32) {\n return\n keccak256(abi.encodePacked(accounts, percentAllocations, distributorFee));\n}\n```\n
none
```\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 numberMarker() internal view {\n assembly {mstore(0, number())}\n}\n```\n
none
```\n// Previous code\n\n function addUnderlying(uint256 amount, uint256 minAmountOut) internal {\n //// rest of code\n C.bean().mint(\n address(this),\n newDepositedBeans.add(newDepositedLPBeans)\n );\n\n // Add Liquidity\n uint256 newLP = C.curveZap().add_li...
medium
```\ncontract esLBRBoost is Ownable {\n esLBRLockSetting[] public esLBRLockSettings;\n mapping(address => LockStatus) public userLockStatus;\n IMiningIncentives public miningIncentives;\n\n // Define a struct for the lock settings\n struct esLBRLockSetting {\n uint256 duration;\n uint256 miningBoost;\n }\n\n // Define ...
low
```\nif (\_purchased[delegation.holder] > 0) {\n \_isPurchased[delegationId] = true;\n if (\_purchased[delegation.holder] > delegation.amount) {\n \_purchased[delegation.holder] -= delegation.amount;\n } else {\n \_purchased[delegation.holder] = 0;\n }\n} else {\n \_isPurchased[delegationId...
high
```\nfunction allowance(address owner, address spender) public view override returns (uint256) {\n return _allowances[owner][spender];\n}\n```\n
none
```\nFile: VaultLiquidationAction.sol\n function deleverageAccount(\n address account,\n address vault,\n address liquidator,\n uint16 currencyIndex,\n int256 depositUnderlyingInternal\n ) external payable nonReentrant override returns (\n uint256 vaultSharesToLiquidator,...
high
```\n mapping(address => mapping(address => listInfo)) private allowedPairsMap;\n pair[] private allowedPairsList;\n```\n
medium
```\nfunction addLiquidity(address inputToken, uint256 inputAmount, uint256 minLP)\n external\n payable\n onlyListedToken(inputToken)\n override\n returns (uint256 actualLP)\n {\n // Check that the exchange is unlocked and thus open for business\n Config memory _config = DFPconfig;\n require(_c...
none
```\nfunction transferToAddressETH(address payable recipient, uint256 amount) private \n{\n recipient.transfer(amount);\n}\n```\n
none
```\nfunction removeMultiple(uint256 LPamount, address[] calldata tokens)\n external\n override\n returns (bool success)\n{\n // Perform basic validation (no lock check here on purpose)\n require(tokens.length == 16, "DFP: Bad tokens array length");\n\n // Calculate fraction of total liquidity to be returned\n u...
none
```\n// Transfer remaining balance of tokenTo to sender\nif (address(tokenTo) != Constants.ETH) {\n uint256 balance = tokenTo.balanceOf(address(this));\n require(balance >= amountTo, "INSUFFICIENT\_AMOUNT");\n \_transfer(tokenTo, balance, recipient);\n} else {\n```\n
high
```\nfunction changeTreasury(uint256 _marketId, address _treasury)\n public\n onlyTimeLocker\n{\n if (_treasury == address(0)) revert AddressZero();\n\n address[2] memory vaults = marketIdToVaults[_marketId];\n\n if (vaults[0] == address(0) || vaults[1] == address(0)) {\n revert MarketDoesNotExist...
medium
```\n function setIntervals(uint256 id_, uint32[3] calldata intervals_) external override {\n // Check that the market is live\n if (!isLive(id_)) revert Auctioneer_InvalidParams();\n\n\n // Check that the intervals are non-zero\n if (intervals_[0] == 0 || intervals_[1] == 0 || intervals_...
medium
```\nnonReentrant\nrefundFinalBalance\n```\n
low
```\nif (price_ < MIN_PRICE || price_ > MAX_PRICE) revert BucketPriceOutOfBounds();\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];//@audit-info non aligned with common understanding of ...
low
```\nfunction updateAddressesAndTransferOwnership(\n address mintingBeneficiary,\n address alarmContract,\n address rngContract,\n address minter,\n address _owner\n) external onlyOwner {\n changeMintBeneficiary(mintingBeneficiary);\n changeMinter(minter);\n\n setAlarmAccount(alarmContract);\n ...
none
```\n function findMarketFor(\n address payout_,\n address quote_,\n uint256 amountIn_,\n uint256 minAmountOut_,\n uint256 maxExpiry_\n ) external view returns (uint256) {\n// rest of code\n if (expiry <= maxExpiry_) {\n payouts[i] = minAmountOut_ <= ma...
medium
```\nfunction _initialize() internal virtual override {\n // check if the owner is the deployer of this contract\n if (msg.sender != deployer) {\n revert UnexpectedDeployer(deployer, msg.sender);\n }\n\n __ReentrancyGuard_init();\n // owner of the transceiver is set to the owner of the nttManager\...
medium
```\n loans.push(\n Loan(req, req.amount + interest, collat, expiration, true, msg.sender)\n );\n```\n
medium
```\nfunction 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 memory prevChain...
low
```\n//solidity 0.8.7\n » int(uint(2\*\*255))\n-57896044618658097711785492504343953926634992332820282019728792003956564819968\n » int(uint(2\*\*255-2))\n57896044618658097711785492504343953926634992332820282019728792003956564819966\n```\n
low
```\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 functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n}\n```\n
none
```\n function liveMarketsBy(address owner_) external view returns (uint256[] memory) {\n uint256 count;\n IBondAuctioneer auctioneer;\n for (uint256 i; i < marketCounter; ++i) {\n auctioneer = marketsToAuctioneers[i];\n if (auctioneer.isLive(i) && auctioneer.ownerOf(i) == ...
medium
```\nfunction changeMarketingWallet(address newWallet) external onlyOwner {\n emit MarketingWalletUpdated(newWallet, marketingWallet);\n marketingWallet = newWallet;\n}\n```\n
none
```\nfunction isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n}\n```\n
none
```\nFile: AuraStakingMixin.sol\n function claimRewardTokens() external returns (uint256[] memory claimedBalances) {\n uint16 feePercentage = BalancerVaultStorage.getStrategyVaultSettings().feePercentage;\n IERC20[] memory rewardTokens = _rewardTokens();\n\n uint256 numRewardTokens = rewardToken...
medium
```\nAdditional tokens may be added to the Deposit Whitelist via Beanstalk governance. In order for a token to be added to the Deposit Whitelist, Beanstalk requires:\n1. The token address;\n2. A function to calculate the Bean Denominated Value (BDV) of the token (see Section 14.2 of the whitepaper for complete formulas...
medium
```\nfunction pullTokens(\n address \_token,\n address \_from,\n uint256 \_amount\n) internal returns (uint256) {\n // handle max uint amount\n if (\_amount == type(uint256).max) {\n uint256 allowance = IERC20(\_token).allowance(address(this), \_from);\n uint256 balance = getBalance(\_token...
medium
```\nfunction validateOrderParam(IPerpetual perpetual, LibOrder.OrderParam memory orderParam)\n internal\n view\n returns (bytes32)\n{\n address broker = perpetual.currentBroker(orderParam.trader);\n require(broker == msg.sender, "invalid broker");\n require(orderParam.getOrderVersion() == 2, "unsuppo...
medium
```\nconstructor() {\n _status = _NOT_ENTERED;\n}\n```\n
none
```\nfunction trySub(\n uint256 a,\n uint256 b\n) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n}\n```\n
none
```\nif (\_fee > 0) {\n address feeReceiver = \_feeRecipient == address(0) ? msg.sender : \_feeRecipient;\n (bool feePaymentSuccess, ) = feeReceiver.call{ value: \_fee }("");\n if (!feePaymentSuccess) {\n revert FeePaymentFailed(feeReceiver);\n }\n```\n
medium
```\nfunction withdraw(uint256 \_shares, uint256 \_minAmount) external onlyEOAorWhitelist nonReentrant\n{\n address \_from = msg.sender;\n (uint256 \_amount, uint256 \_withdrawalAmount, uint256 \_netAmount) = \_calcAmountFromShares(\_shares);\n require(\_netAmount >= \_minAmount, "high slippage");\n \_burn(\_from, \_sh...
medium