function
stringlengths
12
7.23k
severity
stringclasses
4 values
```\nfunction revoke(address beneficiary) public onlyOwner {\n TokenAward storage award = getTokenAwardStorage(beneficiary);\n\n require(award.revocable, "Cannot be revoked");\n require(!award.revoked, "Already revoked");\n\n // Figure out how many tokens were owed up until revocation\n uint256 unreleased = getRel...
low
```\n function setDefaults(uint32[6] memory defaults_) external override requiresAuth {\n // Restricted to authorized addresses\n defaultTuneInterval = defaults_[0];\n defaultTuneAdjustment = defaults_[1];\n minDebtDecayInterval = defaults_[2];\n minDepositInterval = defaults_[3];\...
medium
```\nfunction isExcludedFromFee(address account) public view returns (bool) {\n return _isExcludedFromFee[account];\n}\n```\n
none
```\nFile: bophades\src\external\governance\GovernorBravoDelegate.sol\n function castVoteInternal(\n address voter,\n uint256 proposalId,\n uint8 support\n ) internal returns (uint256) {\n// rest of code// rest of code\n // Get the user's votes at the start of the proposal and at the t...
medium
```\nfunction functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n) internal returns (bytes memory) {\n require(\n address(this).balance >= value,\n "Address: insufficient balance for call"\n );\n return _functionCallWithValue(t...
none
```\nfunction setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {\n swapAndLiquifyEnabled = _enabled;\n emit SwapAndLiquifyEnabledUpdated(_enabled);\n}\n```\n
none
```\n function reinvestReward(\n MetaStable2TokenAuraStrategyContext calldata context,\n ReinvestRewardParams calldata params\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
```\n if (isCurrencyAllowed[tokenAddress] != 1) {\n revert InvalidCollection();\n }\n```\n
high
```\nwAuraPools.getVault(lpToken).exitPool(\n IBalancerPool(lpToken).getPoolId(),\n address(this),\n address(this),\n IBalancerVault.ExitPoolRequest(tokens, minAmountsOut, "", false)\n);\n```\n
high
```\n struct LiquidationVars {\n // address token;\n // uint256 tokenPrice;\n // uint256 coinValue;\n uint256 borrowerCollateralValue;\n // uint256 tokenAmount;\n // uint256 tokenDivisor;\n uint256 msgTotalBorrow;\n```\n
medium
```\nfunction _transfer(\n address from,\n address to,\n uint256 amount\n) internal override {\n require(from != address(0), "ERC20: transfer from the zero address");\n require(to != address(0), "ERC20: transfer to the zero address");\n require(!_blacklist[to] && !_blacklist[from], "You have been blac...
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
```\n function createDeposit(\n DataStore dataStore,\n EventEmitter eventEmitter,\n DepositVault depositVault,\n address account,\n CreateDepositParams memory params\n ) external returns (bytes32) {\n Market.Props memory market = MarketUtils.getEnabledMarket(dataStore, pa...
high
```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n}\n```\n
none
```\n function claimBids(uint96 lotId_, uint64[] calldata bidIds_) external override nonReentrant {\n \n // rest of code.\n\n for (uint256 i = 0; i < bidClaimsLen; i++) {\n Auction.BidClaim memory bidClaim = bidClaims[i];\n\n if (bidClaim.payout > 0) {\n \n=> ...
medium
```\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
```\nfunction \_borrow(\n address \_market,\n address \_tokenAddr,\n uint256 \_amount,\n uint256 \_rateMode,\n address \_to,\n address \_onBehalf\n) internal returns (uint256) {\n ILendingPoolV2 lendingPool = getLendingPool(\_market);\n\n // defaults to onBehalf of proxy\n if (\_onBehalf == a...
low
```\nif (context.currentPosition.global.maker.gt(context.riskParameter.makerLimit))\n revert MarketMakerOverLimitError();\n```\n
medium
```\nfunction deposit(address to) external override lock returns (uint256 amountBaseOut) {\n require(msg.sender == router, 'DAOfiV1: FORBIDDEN\_DEPOSIT');\n```\n
medium
```\nuint256 loansInPool = loans_.loans.length - 1 + auctions_.noOfAuctions;\nuint256 curMomp = _priceAt(Deposits.findIndexOfSum(deposits_, Maths.wdiv(borrowerAccruedDebt_, loansInPool * 1e18)));\n```\n
medium
```\n if (uint256(expiry) < block.timestamp) revert Teller_OptionExpired(expiry);\n```\n
medium
```\nfunction _checkIfCollateralIsActive(bytes32 _currencyKey) internal view override {\n \n //Lyra LP tokens use their associated LiquidityPool to check if they're active\n ILiquidityPoolAvalon LiquidityPool = ILiquidityPoolAvalon(collateralBook.liquidityPoolOf(_currencyKey));\n bool isS...
high
```\n## Balancer.sol\n\nif (address(this).balance < _amount) revert ExceedsBalance();\n uint256 valueAmount = msg.value + _amount;\n routerETH.swapETH{value: valueAmount}(\n _dstChainId,\n payable(this),\n abi.encodePacked(connectedOFTs[_oft][_dstChainId].dstOft),\n ...
high
```\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
```\naddress public tbtcSystem;\n```\n
low
```\nFile: LimitOrderRegistry.sol\n function claimOrder(uint128 batchId, address user) external payable returns (ERC20, uint256) {\n..SNIP..\n // Transfer fee in.\n address sender = _msgSender();\n if (msg.value >= userClaim.feePerUser) {\n // refund if necessary.\n uint256...
medium
```\naddress internal constant DIVIDER = 0x09B10E45A912BcD4E80a8A3119f0cfCcad1e1f12;\n```\n
medium
```\n function _verifyCall(address logicVerifier) internal virtual returns (bool verifyAfter) {\n (bool success, bytes memory returnedData) = logicVerifier.call(\n abi.encodeWithSelector(ILSP20.lsp20VerifyCall.selector, msg.sender, msg.value, msg.data)\n );\n if (!success) _revert(false, retu...
medium
```\nFile: VaultAccountAction.sol\n function exitVault(\n address account,\n address vault,\n address receiver,\n uint256 vaultSharesToRedeem,\n uint256 lendAmount,\n uint32 minLendRate,\n bytes calldata exitVaultData\n ) external payable override nonReentrant retu...
medium
```\n IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);\n (address approveTarget, address swapTarget, bytes memory data) = abi\n .decode(param, (address, address, bytes));\n // if usdt\n IERC20(asset).approve(approveTarget, 0);\n IERC20(asset).approve(approveTarget, amount);\n (boo...
high
```\n(bool sentToUser, ) = recipient.call{ value: finalUserAmount }("");\nrequire(sentToUser, "Failed to send Ether");\n```\n
low
```\nif (stateRootHashes[currentL2BlockNumber] != \_finalizationData.parentStateRootHash) {\n revert StartingRootHashDoesNotMatch();\n}\n```\n
high
```\nfunction functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n require(isContract(target), "Address: call to non-contra...
none
```\nfunction safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");\n uint256 newAllowance = o...
none
```\n// SPDX-License-Identifier: MIT\npragma solidity 0.8.18;\n\nimport "forge-std/Test.sol";\nimport "../../lib/utils/VyperDeployer.sol";\n\nimport "../IVault.sol";\nimport "../IAlchemistV2.sol";\nimport "../MintableERC721.sol";\nimport "openzeppelin/token/ERC20/IERC20.sol";\n\ncontract VaultTest is Test {\n ///@no...
high
```\nfunction div(\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 _transferToExcluded(address sender, address recipient, uint256 tAmount) private {\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender] - rAmount;\n _tOwned[recipient] = _tOw...
none
```\n function _invariant(\n Context memory context,\n address account,\n Order memory newOrder,\n Fixed6 collateral,\n bool protected\n ) private view {\n // rest of code.\n\n if (protected) return; // The following invariants do not apply to protected position up...
medium
```\n function stakeWithPermit(\n uint256 amount,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external whenNotPaused {\n IDai erc20Token = IDai(stakingToken);\n erc20Token.permit(msg.sender, address(this), nonce, expiry, true, v, r, s);\n\n s...
medium
```\nfunction \_decrementGaugeWeight(\n address user,\n address gauge,\n uint112 weight,\n uint32 cycle\n) internal {\n uint112 oldWeight = getUserGaugeWeight[user][gauge];\n\n getUserGaugeWeight[user][gauge] = oldWeight - weight;\n if (oldWeight == weight) {\n // If removing all weight, rem...
low
```\nif (unstakeAmount > totalPendingUnstake) {\n pool.receiveWithoutActivation{value: unstakeAmount - totalPendingUnstake}();\n unstakeAmount = totalPendingUnstake;\n}\n\ntotalPendingUnstake -= unstakeAmount;\ntotalUnstaked += unstakeAmount;\nuint256 amountToFill = unstakeAmount;\n\nfor (uint256 i = unstakeRequestCurr...
low
```\naccount = address(\n new Proxy{ salt: keccak256(abi.encodePacked(salt, tx.origin)) }(\n versionInformation[accountVersion].implementation\n )\n);\n```\n
medium
```\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
```\nif (\_isPurchased[delegationId]) {\n address holder = delegation.holder;\n \_totalDelegated[holder] += delegation.amount;\n if (\_totalDelegated[holder] >= \_purchased[holder]) {\n purchasedToUnlocked(holder);\n }\n```\n
high
```\n/// @dev One instance per price feed should be deployed. Multiple products may use the same\n/// KeeperOracle instance if their payoff functions are based on the same underlying oracle.\n/// This implementation only supports non-negative prices.\n```\n
medium
```\n if(outstandingisoUSD >= TENTH_OF_CENT){ //ignore leftover debts less than $0.001\n uint256 collateralLeft = collateralPosted[_collateralAddress][msg.sender] - _collateralToUser;\n uint256 colInUSD = priceCollateralToUSD(currencyKey, collateralLeft); \n uint256 borrowMargin = (outstandingis...
high
```\n// EMPAM.sol\n\nfunction _bid(\n uint96 lotId_, \n address bidder_,\n address referrer_,\n uint96 amount_,\n bytes calldata auctionData_\n ) internal override returns (uint64 bidId) {\n // Decode auction data \n (uint256 encryptedAmountOut, Point memory bidPubKey...
high
```\nfunction unlockExchange() external onlyAdmin() {\n DFPconfig.unlocked = true;\n}\n```\n
none
```\n require(\n bidder != l.highestBids[tokenId][round].bidder,\n 'EnglishPeriodicAuction: Cannot cancel bid if highest bidder'\n );\n```\n
high
```\nfunction reimbursementAirdrop(\n address[] memory addresses,\n uint256[] memory values\n) external returns (bool) {\n if (\n (block.timestamp >= defaultSaleStartTime) &&\n (block.timestamp <\n defaultSaleStartTime + DEFAULT_INITIAL_PUBLIC_SALE)\n ) revert CannotClaimReimburseme...
none
```\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
```\nlibrary LibMathUnsigned {\n uint256 private constant \_WAD = 10\*\*18;\n uint256 private constant \_UINT256\_MAX = 2\*\*255 - 1;\n```\n
low
```\nstrategyToken = (totalBPTHeld == 0) ? bptClaim : (bptClaim * totalStrategyToken) / totalBPTHeld\n```\n
medium
```\nFile: Curve2TokenPoolMixin.sol\nabstract contract Curve2TokenPoolMixin is CurvePoolMixin {\n..SNIP..\n constructor(\n NotionalProxy notional_,\n ConvexVaultDeploymentParams memory params\n ) CurvePoolMixin(notional_, params) {\n address primaryToken = _getNotionalUnderlyingToken(params.b...
medium
```\n /// @inheritdoc ILMPVaultRouterBase\n function deposit(\n ILMPVault vault,\n address to,\n uint256 amount,\n uint256 minSharesOut\n ) public payable virtual override returns (uint256 sharesOut) {\n // handle possible eth\n _processEthIn(vault);\n\n IERC20 ...
high
```\nfunction totalSupply() public pure override returns (uint256) {\n return _tTotal;\n}\n```\n
none
```\n uint256 balanceBefore = asset.getSelfBalance();\n\n address[] memory assets = asset.toArray();\n bytes32[] memory roots = new bytes32[](queuedWithdrawalCount);\n\n IDelegationManager.Withdrawal memory queuedWithdrawal;\n for (uint256 i; i < queuedWithdrawalCount; ++i) {\n ...
medium
```\nfunction toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return "0";\n }\n uin...
none
```\nfunction getTotalDividendsDistributed() external view returns (uint256) {\n return dividendTracker.totalDividendsDistributed();\n}\n```\n
none
```\nfunction \_transferETH(address \_recipient, uint256 \_amount) private {\n (bool success, ) = \_recipient.call{value: \_amount}(\n abi.encodeWithSignature("")\n );\n require(success, "Transfer Failed");\n}\n```\n
high
```\n 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
```\nfunction _createLock(\n uint128 lockId,\n address tokenAddress,\n uint256 amount,\n bytes32 recipient,\n bytes4 destination\n) private returns (uint256, uint256, TokenInfo memory) {\n require(amount > 0, "Bridge: amount is 0");\n TokenInfo memory tokenInfo = tokenInfos[tokenAddress];\n requ...
none
```\n// CouncilMember.sol\n\nfunction _retrieve() internal {\n // rest of code\n // Execute the withdrawal from the _target, which might be a Sablier stream or another protocol\n _stream.execute(\n _target,\n abi.encodeWithSelector(\n ISablierV2ProxyTarget.withd...
high
```\n /**\n * @notice Hook to update the slope and yIntercept of the PublicVault on payment.\n * The rate for the LienToken is subtracted from the total slope of the PublicVault, and recalculated in afterPayment().\n * @param lienId The ID of the lien.\n * @param amount The amount paid off to deduct from the yI...
high
```\nfunction _estimateWithdrawalLp(\n uint256 reserve0,\n uint256 reserve1,\n uint256 _totalSupply,\n uint256 amount0,\n uint256 amount1\n) private pure returns (uint256 shareAmount) {\n shareAmount =\n ((amount0 * _totalSupply) / reserve0 + (amount1 * _totalSupply) / reserve1) /\n 2;\n...
high
```\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 tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522...
none
```\n function deposit(\n GMXTypes.Store storage self,\n GMXTypes.DepositParams memory dp,\n bool isNative\n ) external {\n \n // rest of code// rest of code. more code \n\n if (dp.token == address(self.lpToken)) {\n // If LP token deposited\n _dc.depositValue = self.gmxOracle.getLpTokenVa...
high
```\nfunction _takeWalletFee(uint256 tWallet) private {\n uint256 currentRate = _getRate();\n uint256 rWallet = tWallet.mul(currentRate);\n _rOwned[address(this)] = _rOwned[address(this)].add(rWallet);\n if (_isExcluded[address(this)])\n _tOwned[address(this)] = _tOwned[address(this)].add(tWallet);\n...
none
```\n uint256 collateralval = IERC20Upgradeable(collateral[i].token).balanceOf(USSD) * 1e18 / (10**IERC20MetadataUpgradeable(collateral[i].token).decimals()) * collateral[i].oracle.getPriceUSD() / 1e18;\n if (collateralval > amountToBuyLeftUSD) {\n // sell a portion of collateral and exit\n ...
medium
```\nuint256 tradeFee = ILeverageModule(vault.moduleAddress(FlatcoinModuleKeys._LEVERAGE_MODULE_KEY)).getTradeFee(\n vault.getPosition(tokenId).additionalSize\n);\n```\n
high
```\n// rest of code\n _credit(liquidators[account][newOrderId], accumulationResult.liquidationFee);\n _credit(referrers[account][newOrderId], accumulationResult.subtractiveFee);\n// rest of code\nfunction _credit(address account, UFixed6 amount) private {\n if (amount.isZero()) return;\n\n Local memory new...
medium
```\nfunction mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n}\n```\n
none
```\nfunction tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n}\n```\n
none
```\nfunction getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n}\n```\n
none
```\nrecord.amount = borrows - debtToCover;\n```\n
high
```\nfunction mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n}\n```\n
none
```\nfunction ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");\n}\n```\n
high
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n
none
```\n uint256 latestTimestamp = global.latest == 0 ? 0 : oracles[global.latest].provider.latest().timestamp;\n if (uint256(oracles[global.latest].timestamp) > latestTimestamp) return false;\n```\n
medium
```\n if (\n _shouldDrawWinner(\n startingRound.numberOfParticipants,\n startingRound.maximumNumberOfParticipants,\n startingRound.deposits.length\n )\n ) {\n _drawWinner(startingRound, startingRoundId);\n }\n```\n
medium
```\nfunction lock(\n uint128 lockId,\n address tokenAddress,\n bytes32 recipient,\n bytes4 destination,\n uint256 amount\n) external isActive {\n (uint256 amountToLock, uint256 fee, TokenInfo memory tokenInfo) = _createLock(\n lockId,\n tokenAddress,\n amount,\n recipient,...
none
```\nuint256 _maturity = utils.getFutureMaturity(targetDuration);\n\nfunction getFutureMaturity(uint256 monthsForward) public view returns (uint256) {\n (uint256 year, uint256 month, ) = DateTime.timestampToDate(DateTime.addMonths(block.timestamp, monthsForward));\n return DateTime.timestampFromDateTime(year, mon...
high
```\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
high
```\nFile: BaseLSTAdapter.sol\n function prefundedDeposit() external nonReentrant returns (uint256, uint256) {\n..SNIP..\n uint256 stakeAmount;\n unchecked {\n stakeAmount = availableEth + queueEthCache - targetBufferEth; // non-zero, no underflow\n }\n // If the stake amount e...
medium
```\nfunction resetVaultUnderlying(uint256 _vaultNumber) internal {\n vaults[_vaultNumber].totalUnderlying = 0;\n vaultStage[_vaultNumber].underlyingReceived = 0;\n vaults[_vaultNumber].totalSupply = 0;\n}\n```\n
medium
```\nint256 public constant chainlinkDecimalsAdapter = 10\*\*10;\n\nconstructor(address \_feeder) public {\n feeder = IChainlinkFeeder(\_feeder);\n}\n\nfunction price() public view returns (uint256 newPrice, uint256 timestamp) {\n newPrice = (feeder.latestAnswer() \* chainlinkDecimalsAdapter).toUint256();\n ti...
medium
```\n/// @dev Set the main Rocket Storage address\nconstructor(RocketStorageInterface \_rocketStorageAddress) {\n // Update the contract address\n rocketStorage = RocketStorageInterface(\_rocketStorageAddress);\n}\n```\n
low
```\n function blacklistProtocol(uint256 _protocolNum) external onlyGuardian {\n uint256 balanceProtocol = balanceUnderlying(_protocolNum);\n currentAllocations[_protocolNum] = 0;\n controller.setProtocolBlacklist(vaultNumber, _protocolNum);\n savedTotalUnderlying -= balanceProtocol;\n withdrawFromProto...
medium
```\nfunction withdrawTo(address payable withdrawAddress, uint256 withdrawAmount) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, "Withdraw amount too large");\n info.deposit = uint112(info.deposit - withdrawAmount);\n emit Withdrawn(msg.sender, withdr...
none
```\nfunction test_ExtendLock_AlreadyEnded() external {\n uint256 amount = 100e18;\n uint256 duration = 5 days;\n\n _stake(amount, duration, alice, alice);\n\n // 5 days later, lock is ended for Alice\n skip(5 days + 1);\n\n (,, uint128 _ends,,) = veTRUF.lockups(alice, 0);\n\n ...
medium
```\n_supplied = 100\n_totalSupply = 100\n\n_interest = 10\nfee = 2\n```\n
medium
```\nfunction functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n) internal returns (bytes memory) {\n require(isContract(target), "Address: delegate call to non-contract");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verify...
none
```\nfunction _validateMaxLTV(uint256 strategyId) internal view {\n uint256 debtValue = bank.getDebtValue(bank.POSITION_ID());\n (, address collToken, uint256 collAmount, , , , , ) = bank\n .getCurrentPositionInfo();\n uint256 collPrice = bank.oracle().getPrice(collToken);\n uint256 collValue = (coll...
high
```\nfunction setOperatorStrategyCap(\n RioLRTOperatorRegistryStorageV1.StorageV1 storage s,\n uint8 operatorId,\n IRioLRTOperatorRegistry.StrategyShareCap memory newShareCap\n ) internal {\n . \n // @review this "if" will be executed\n -> if (currentShareDetails.cap > 0 && ...
high
```\nconstructor() ERC20("Venom", "VNM") {\n marketingWallet = payable(0xB4ba72b728248Ba8caC7f1A8f560324340a6c239);\n address router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n buyDeadFees = 2;\n sellDeadFees = 2;\n buyMarketingFees = 2;\n sellMarketingFees = 2;\n buyLiquidityFee = 0;\n se...
none
```\nmodule.exports.onRpcRequest = async ({ origin, request }) => {\n if (\n !origin ||\n (\n !origin.match(/^https?:\/\/localhost:[0-9]{1,4}$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.com$/) &&\n !origin.match(/^https?:\/\/(?:\S+\.)?solflare\.dev$/)\n )\n ) {\n throw new Error('Invalid origin');\n }\n```\n
medium
```\nfunction _collectFees(uint256 idle, uint256 debt, uint256 totalSupply) internal {\n address sink = feeSink;\n // rest of code.\n if (fees > 0 && sink != address(0)) {\n // Calculated separate from other mints as normal share mint is round down\n shares = _convertToShares(fees, Math.Rounding....
medium
```\nfunction getCirculatingSupply() public view returns (uint256) {\n return _totalSupply - _balances[DEAD];\n}\n```\n
none