function stringlengths 12 7.23k | severity stringclasses 4
values |
|---|---|
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n | none |
```\nfunction isTokenMinted(uint256 _tokenId) public view returns (bool) {\n return validateTokenId(_tokenId) && _exists(_tokenId);\n}\n```\n | none |
```\nfunction sendInterests(Loan storage loan, Provision storage provision) internal returns (uint256 sent) {\n uint256 interests = loan.payment.paid - loan.lent;\n if (interests == loan.payment.minInterestsToRepay) {\n // this is the case if the loan is repaid shortly after issuance\n // each lende... | medium |
```\nfunction withdrawFromInsuranceFund(uint256 rawAmount) public onlyWhitelistAdmin {\n require(rawAmount > 0, "invalid amount");\n require(insuranceFundBalance > 0, "insufficient funds");\n require(rawAmount <= insuranceFundBalance.toUint256(), "insufficient funds");\n\n int256 wadAmount = toWad(rawAmount... | high |
```\nfunction setMaxWalletSizePercent(uint256 maxWalletSizePercent) external onlyOwner() {\n _maxWalletSize = (_tTotal * maxWalletSizePercent) / (10**2);\n \n require(_maxWalletSize >= _minMaxWalletSize, "Max Wallet Size percent too low, must be greater than or equal to _minMaxWalletSize");\n emit MaxWalletSize... | none |
```\nfunction plunder(\n address erc721,\n uint256 tokenId,\n IERC20[] calldata erc20s,\n LootBox.WithdrawERC721[] calldata erc721s,\n LootBox.WithdrawERC1155[] calldata erc1155s\n) external {\n address payable owner = payable(IERC721(erc721).ownerOf(tokenId));\n```\n | medium |
```\nfunction didLastOptionalReturnCallSucceed(\n bool callStatus\n) private pure returns (bool success) {\n assembly {\n // Get how many bytes the call returned.\n let returnDataSize := returndatasize()\n\n // If the call reverted:\n if iszero(callStatus) {\n // Copy the re... | none |
```\nreceive() external payable {\n\n}\n```\n | none |
```\nfunction addLiquidity() external onlyOwner() {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n uniswapV2Router = _uniswapV2Router;\n _approve(address(this), address(uniswapV2Router), _tTotal);\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router... | none |
```\nfunction sendETHToFee(uint256 amount) private {\n uint256 baseAmount = amount.div(2);\n _marketingWalletAddress.transfer(baseAmount.div(2));\n _buyBackWalletAddress.transfer(baseAmount.div(2));\n _fairyPotWalletAddress.transfer(baseAmount);\n}\n```\n | none |
```\n/\*\n// Indicates any auction has never held for a specified BondID\nfunction isNotStartedAuction(bytes32 auctionID) public virtual override returns (bool) {\n uint256 closingTime = \_auctionClosingTime[auctionID];\n return closingTime == 0;\n}\n\n// Indicates if the auctionID is in bid acceptance status\nfunction... | high |
```\npoolInfo.accTidalPerShare = poolInfo.accTidalPerShare.add(\n amount\_.mul(SHARE\_UNITS)).div(poolInfo.totalShare);\n```\n | high |
```\nfunction _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {\n // if this is a sale and we're within the 24hr window, make total tax 25%\n bool isSale = recipient == uniswapV2Pair;\n bool isWithinTime = block.timestamp <= timeSalesTaxEnabled + 1 days;\n uint256 tmpP... | none |
```\n196 for (uint256 i = 0; i < collateral.length; i++) {\n197 uint256 collateralval = IERC20Upgradeable(collateral[i].token).balanceOf(USSD) * 1e18 / (10**IERC20MetadataUpgradeable(collateral[i].token).decimals()) * collateral[i].oracle.getPriceUSD() / 1e18;\n198 if (collateralval * 1e18 / ownva... | high |
```\n function rebase(uint32 _l2Gas) external {\n inflationMultiplier = IECO(l1Eco).getPastLinearInflation(\n block.number\n );\n\n bytes memory message = abi.encodeWithSelector(\n IL2ECOBridge.rebase.selector,\n inflationMultiplier\n );\n\n sendCro... | high |
```\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// `token.allowance()``\nmstore(0xB00, ALLOWANCE\_CALL\_SELECTOR\_32)\nmstore(0xB04, caller())\nmstore(0xB24, address())\nlet success := call(gas(), token, 0, 0xB00, 0x44, 0xC00, 0x20)\n```\n | low |
```\n function addToTotalRewards(uint256 _basketId) internal onlyBasketOwner(_basketId) {\n if (baskets[_basketId].nrOfAllocatedTokens == 0) return;\n\n\n uint256 vaultNum = baskets[_basketId].vaultNumber;\n uint256 currentRebalancingPeriod = vaults[vaultNum].rebalancingPeriod;\n uint256 lastRebalancingPer... | medium |
```\nuint256[50] private \_\_gap;\n```\n | medium |
```\n // ============================================\n // EMERGENCY WITHDRAWAL FUNCTIONS\n // Needs to be removed when final version deployed\n // ============================================\n function emergencyWithdraw(GlobalConfig globalConfig, address \_token) public {\n address cToken = glob... | medium |
```\n/// @notice Implements bitcoin's hash256 (double sha2)\n/// @dev abi.encodePacked changes the return to bytes instead of bytes32\n/// @param \_b The pre-image\n/// @return The digest\nfunction hash256(bytes memory \_b) internal pure returns (bytes32) {\n return abi.encodePacked(sha256(abi.encodePacked(sha256(\_... | low |
```\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 |
```\nfunction latestRoundData(\n address base,\n address quote\n)\n external\n view\n override\n checkPairAccess()\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n )\n{\n uint16 currentPhaseId = s_currentPhaseId[base][quote];\n ... | medium |
```\n ohmMinted -= ohmReceived > ohmMinted ? ohmMinted : ohmReceived;\n ohmRemoved += ohmReceived > ohmMinted ? ohmReceived - ohmMinted : 0;\n```\n | medium |
```\nfunction _commitCollateral(\n uint256 _bidId,\n Collateral memory _collateralInfo\n) internal virtual {\n CollateralInfo storage collateral = _bidCollaterals[_bidId];\n collateral.collateralAddresses.add(_collateralInfo._collateralAddress);\n collateral.collateralInfo[\n _collateralInfo._coll... | high |
```\nfunction updateSwapEnabled(bool enabled) external onlyOwner {\n swapEnabled = enabled;\n}\n```\n | none |
```\n function withdrawToken(\n address from,\n address token,\n address receiver,\n uint256 sGlpAmount\n ) external returns (uint256 amountOut) {\n // user has approved periphery to use junior vault shares\n dnGmxJuniorVault.withdraw(sGlpAmount, address(this), from);\n//... | high |
```\nfunction calculateLiquidityFee(uint256 _amount)\n private\n view\n returns (uint256)\n{\n return _amount.mul(_liquidityFee).div(10**2);\n}\n```\n | none |
```\nif (safe.getThreshold() != _getCorrectThreshold()) {\n revert SignersCannotChangeThreshold();\n}\n\nfunction _getCorrectThreshold() internal view returns (uint256 _threshold) {\n uint256 count = _countValidSigners(safe.getOwners());\n uint256 min = minThreshold;\n uint256 max = targetThreshold;\n if... | high |
```\n// Sanity check: fee <= amount. Allow `=` in case of only wanting to execute\n// 0-value crosschain tx, so only providing the fee amount\nrequire(relayerFee <= txData.amount, "#F:023");\n```\n | high |
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n | none |
```\n uint256 validSigCount = countValidSignatures(txHash, signatures, signatures.length / 65);\n // revert if there aren't enough valid signatures\n if (validSigCount < safe.getThreshold()) {\n revert InvalidSigners();\n }\n```\n | high |
```\n/// @notice Ensures that the caller is the admin\nmodifier onlyActiveOperator(uint256 \_operatorIndex) {\n \_onlyActiveOperator(\_operatorIndex);\n \_;\n}\n```\n | low |
```\nfunction finalizeBlocks(\n BlockData[] calldata \_blocksData,\n bytes calldata \_proof,\n uint256 \_proofType,\n bytes32 \_parentStateRootHash\n)\n```\n | high |
```\nfunction setmaxWallet(uint256 value) external onlyOwner {\n value = value * (10**18);\n require(value >= _totalSupply / 1000, "max wallet cannot be set to less than 0.1%");\n maxWallet = value;\n}\n```\n | none |
```\n bool isToken0Weth;\n _permit2Add(params_, amount0, amount1, token0, token1);\n\n _addLiquidity(\n params_.addData.vault,\n amount0,\n amount1,\n sharesReceived,\n params_.addData.gauge,\n params_.addData.receiver,\n token0,\n token1\n );\n\n i... | high |
```\naddress private ingressContractAddress;\n```\n | low |
```\nfunction changeTaxDistribution(\n uint256 newteamShare,\n uint256 newtreasuryShare\n) external onlyOwner {\n require(\n newteamShare + newtreasuryShare == SHAREDIVISOR,\n "Sum of shares must be 100"\n );\n\n teamShare = newteamShare;\n treasuryShare = newtreasuryShare;\n}\n```\n | none |
```\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 |
```\nconstructor () public {\n instance = new MultipleWinners();\n}\n```\n | low |
```\nfunction _amountsForLiquidity(\n int24 tickLower,\n int24 tickUpper,\n uint128 liquidity\n) internal view returns (uint256, uint256) {\n (uint160 sqrtRatioX96, , , , , , ) = IUniswapV3Pool(pool).slot0();\n return\n UV3Math.getAmountsForLiquidity(\n sqrtRatioX96,\n UV3Mat... | high |
```\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n}\n```\n | none |
```\nThe assert function should only be used to test for internal errors, and to check invariants. \n```\n | low |
```\nfunction average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n}\n```\n | none |
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n | none |
```\nrequire(\n amount <= instantMintLimit - currentInstantMintAmount,\n "RateLimit: Mint exceeds rate limit"\n);\n```\n | low |
```\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 |
```\nshares = totalSupply() > 0\n ? (totalSupply() \* amountIn) / totalVaultFunds()\n : amountIn;\n```\n | medium |
```\nRunning 1 test for test/scenario/BorrowAndRepay.scenario.t.sol:BorrowAndRepay_Scenario_Test\n[PASS] testScenario_Poc() (gas: 799155)\nLogs:\n 100 initial pool balance. This is also the amount deposited into tranche\n warp 2 minutes into future\n mint was used rather than deposit to ensure no rounding error. Thi... | medium |
```\nfunction updateGasForProcessing(uint256 newValue) public onlyOwner {\n require(newValue >= 200000 && newValue <= 5000000);\n emit GasForProcessingUpdated(newValue, gasForProcessing);\n gasForProcessing = newValue;\n}\n```\n | none |
```\nfunction setContractAddress(bytes32 name, address addr) public returns (bool) {\n require(name > 0x0000000000000000000000000000000000000000000000000000000000000000, "Contract name must not be empty.");\n require(isAuthorized(msg.sender), "Not authorized to update contract registry.");\n\n ContractDetails ... | medium |
```\nfunction rescueFunds(IERC20 token, uint256 amount) external nonReentrant onlyOwner {\n uint256 balance0 = token0.uniBalanceOf(address(this));\n uint256 balance1 = token1.uniBalanceOf(address(this));\n\n token.uniTransfer(msg.sender, amount);\n\n require(token0.uniBalanceOf(address(this)) >= balance0, "... | low |
```\nreturn ((priorValue * (1e18 - alpha)) + (currentValue * alpha)) / 1e18;\n```\n | medium |
```\nfunction _checkRole(bytes32 role, address account) internal view {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(uint160(account), 20),\n " is m... | none |
```\nfunction getAccountDividendsInfo(address account) external view returns (address, int256, int256, uint256,\n uint256, uint256) {\n return dividendTracker.getAccount(account);\n}\n```\n | none |
```\nfor (uint256 i = 0; i < leaderboard.length; i++) {\n```\n | low |
```\n \*/\nfunction setIDOLContract(address contractAddress) public {\n require(address(\_IDOLContract) == address(0), "IDOL contract is already registered");\n \_setStableCoinContract(contractAddress);\n}\n```\n | high |
```\nFile: ERC20.sol\n function _mint(address account, uint256 amount) internal virtual {\n..SNIP..\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is che... | high |
```\nFile: MainRewarder.sol\n function _processRewards(address account, bool claimExtras) internal {\n _getReward(account);\n\n //also get rewards from linked rewards\n if (claimExtras) {\n for (uint256 i = 0; i < extraRewards.length; ++i) {\n IExtraRewarder(extraReward... | medium |
```\nfunction hasRole(bytes32 role, address account) public view override returns (bool) {\n return _roles[role].members[account];\n}\n```\n | none |
```\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 |
```\nif (BBTotSupply == 0) {\n // if there are no BB holders, all gain to AA\n AAGain = gain;\n} else if (AATotSupply == 0) {\n // if there are no AA holders, all gain to BB\n BBGain = gain;\n} else {\n // split the gain between AA and BB holders according to trancheAPRSplitRatio\n AAGain = gain \* trancheAPRSpli... | medium |
```\nfunction _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), "ERC20: transfer from the zero address");\n require(to != address(0), "ERC20: transfer to the zero address");\n require(amount > 0, "Transfer amount must be greater than zero");\n bool takeFee;\n uin... | none |
```\nfunction toggleSalesTax(bool state) private {\n timeSalesTaxEnabled = block.timestamp;\n salesTaxEnabled = state;\n}\n```\n | none |
```\nrequire(\n IERC20(vaultInfo.vaultAddress).totalSupply() +\n pendingDeposit -\n pendingWithdrawal +\n amountIn <=\n vaultInfo.maxAmount,\n "MAX\_LIMIT\_EXCEEDED"\n);\n```\n | low |
```\nif (safe.getThreshold() != _getCorrectThreshold()) {\n revert SignersCannotChangeThreshold();\n}\n```\n | high |
```\n// Make sure we can actually buy the resource amount requested by the user.\nparams.prevBoughtGas += _amount;\nrequire(\n int256(uint256(params.prevBoughtGas)) <= MAX_RESOURCE_LIMIT,\n "ResourceMetering: cannot buy more gas than available gas limit"\n);\n```\n | medium |
```\n// If the funding timeout has elapsed, punish the funder too!\nif (block.timestamp > \_d.fundingProofTimerStart + TBTCConstants.getFundingTimeout()) {\n address(0).transfer(address(this).balance); // Burn it all down (fire emoji)\n \_d.setFailedSetup();\n```\n | medium |
```\nfunction deposit(GMXTypes.DepositParams memory dp) external payable nonReentrant {\n GMXDeposit.deposit(_store, dp, false);\n }\n\nstruct DepositParams {\n // Address of token depositing; can be tokenA, tokenB or lpToken\n address token;\n // Amount of token to deposit in token decimals\n uin... | high |
```\nfunction manualsend() external {\n require(_msgSender() == _feeAddrWallet1);\n uint256 contractETHBalance = address(this).balance;\n sendETHToFee(contractETHBalance);\n}\n```\n | none |
```\npragma solidity 0.8.10;\n```\n | low |
```\n price = uint(sqrtPriceX96)*(uint(sqrtPriceX96))/(1e6) (96 * 2);\n```\n | high |
```\n function _allocate(bytes memory _data, address _sender) internal virtual override {\n …\n\n // check that the recipient has voice credits left to allocate\n if (!_hasVoiceCreditsLeft(voiceCreditsToAllocate, allocator.voiceCredits)) revert INVALID();\n\n _qv_allocate(allocator, recip... | high |
```\nfunction _prepareTake(\n Liquidation memory liquidation_,\n uint256 t0Debt_,\n uint256 collateral_,\n uint256 inflator_\n ) internal view returns (TakeLocalVars memory vars) {\n // rest of code// rest of code..\n vars.auctionPrice = _auctionPrice(liquidation_.referencePrice, k... | medium |
```\nfunction log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n... | none |
```\nfunction takeFee(address sender, uint amount) internal returns (uint) {\n uint feeAmount = (amount * fee) / 100 / 2;\n balanceOf[address(this)] = balanceOf[address(this)] + feeAmount;\n\n emit Transfer(sender, address(this), feeAmount);\n\n return amount - feeAmount;\n}\n```\n | none |
```\nfunction updatedevelopmentWallet(address newWallet) external onlyOwner {\n emit developmentWalletUpdated(newWallet, developmentWallet);\n developmentWallet = newWallet;\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 \_updateL2L1MessageStatusToClaimed(bytes32 \_messageHash) internal {\n if (inboxL2L1MessageStatus[\_messageHash] != INBOX\_STATUS\_RECEIVED) {\n revert MessageAlreadyClaimed();\n }\n\n delete inboxL2L1MessageStatus[\_messageHash];\n\n emit L2L1MessageClaimed(\_messageHash);\n}\n```\n | low |
```\n function _addFounders(IManager.FounderParams[] calldata _founders, uint256 reservedUntilTokenId) internal {\n// rest of code\n\n // Used to store the base token id the founder will recieve\n uint256 baseTokenId = reservedUntilTokenId;\n\n // For each token to vest:\n ... | 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 |
```\n function onReward(uint _pid, address _user, address _to, uint, uint _amt) external override onlyParent nonReentrant {\n PoolInfo memory pool = updatePool(_pid);\n if (pool.lastRewardTime == 0) return;\n UserInfo storage user = userInfo[_pid][_user];\n uint pending;\n i... | high |
```\nfunction getTellorCurrentValue(bytes32 _queryId)\n ..SNIP..\n // retrieve most recent 20+ minute old value for a queryId. the time buffer allows time for a bad value to be disputed\n (, bytes memory data, uint256 timestamp) = tellor.getDataBefore(_queryId, block.timestamp - 20 minutes);\n uint256 _value =... | 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 |
```\nfunction removeBotFromBlacklist(address account) external onlyOwner {\n require(_isBlackListedBot[account], "Account is not blacklisted");\n for (uint256 i = 0; i < _blackListedBots.length; i++) {\n if (_blackListedBots[i] == account) {\n _blackListedBots[i] = _blackListedBots[\n ... | none |
```\nFile: VaultAccountAction.sol\n function settleVaultAccount(address account, address vault) external override nonReentrant {\n requireValidAccount(account);\n require(account != vault);\n\n VaultConfig memory vaultConfig = VaultConfiguration.getVaultConfigStateful(vault);\n VaultAccou... | high |
```\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 withdrawStuckETH() external onlyOwner {\n uint256 balance = address(this).balance;\n require(balance > 0, "No ETH available to withdraw");\n\n (bool success, ) = address(msg.sender).call{value: balance}("");\n require(success, "transferring ETH failed");\n}\n```\n | none |
```\n/\*\*\n \* @notice Update each iToken's distribution speed according to current global speed\n \* @dev Only EOA can call this function\n \*/\nfunction updateDistributionSpeed() public override {\n require(msg.sender == tx.origin, "only EOA can update speeds");\n require(!paused, "Can not update speeds when p... | medium |
```\n for (uint i; i < _statuses.length; ) {\n whitelistedRouters[_routers[i]] = _statuses[i];\n if (_statuses[i]) {\n routerTypes[_routers[i]] = _types[i];\n emit SetRouterType(_routers[i], _types[i]);\n }\n emit SetWhitelistedRouter(_router... | medium |
```\nfunction removeLimits() external onlyOwner returns (bool) {\n limitsInEffect = false;\n return true;\n}\n```\n | none |
```\n// mTOFT.sol\n\nfunction wrap(address _fromAddress, address _toAddress, uint256 _amount)\n external\n payable \n whenNotPaused\n nonReentrant\n returns (uint256 minted)\n {\n // rest of code\n \n uint256 feeAmount = _checkAndExtractFees(_amount);\n if ... | medium |
```\nfunction \_claim(address from, address to) internal returns (uint256) {\n (uint256 amountReward, uint256 amountPool) = redeemableReward(from);\n require(amountPool != 0, "Pool: User has no redeemable pool tokens");\n\n \_burnFrom(from, amountPool);\n \_incrementClaimed(amountReward);\n\n rewardToken... | low |
```\nfunction verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n}\n```\n | none |
```\nfunction swapAndSendDividends(uint256 tokens) private {\n if (tokens == 0) {\n return;\n }\n swapTokensForEth(tokens);\n uint256 totalAmount = buyAmount.add(sellAmount);\n\n bool success = true;\n bool successOp1 = true;\n\n uint256 dividends;\n uint256 dividendsFromBuy;\n uint256... | none |
```\ndef _debt_interest_since_last_update(_debt_token: address) -> uint256:\n\n return (\n\n (block.timestamp - self.last_debt_update[_debt_token])* self._current_interest_per_second(_debt_token)\n * self.total_debt_amount[_debt_token]\n / PERCENTAGE_BASE \n / PRECISION\n )\n```\n | high |
```\nif (block.timestamp >= lien.start + lien.duration) {\n delta_t = uint256(lien.start + lien.duration - lien.last);\n} \n```\n | medium |
```\n (uint256 unitFee, , ) = _fees(10**decimals(), settlementFeePercentage);\n amount = (newFee * 10**decimals()) / unitFee;\n```\n | medium |
```\nfunction initialize(address pauserAddress) public virtual initializer {\n \_\_ERC20\_init("pSTAKE Token", "PSTAKE");\n \_\_AccessControl\_init();\n \_\_Pausable\_init();\n \_setupRole(DEFAULT\_ADMIN\_ROLE, \_msgSender());\n \_setupRole(PAUSER\_ROLE, pauserAddress);\n // PSTAKE IS A SIMPLE ERC20 TOKEN HENCE 18 DECI... | medium |
```\nfunction setCustomContract(\n address \_nativeToken,\n address \_targetContract\n) external onlyOwner isNewToken(\_nativeToken) {\n nativeToBridgedToken[\_nativeToken] = \_targetContract;\n bridgedToNativeToken[\_targetContract] = \_nativeToken;\n emit CustomContractSet(\_nativeToken, \_targetContract);\n}\n```\n | high |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.