10190 matches found
isDeprecated CAN ONLY BE MADE TO true AND CAN NOT BE CHANGED TO false IN THE FUTURE IF THE NEED ARISES
Lines of code Vulnerability details Impact The RoeRouter.deprecatePool function is used to Deprecate a pool. It is a onlyOwner modifier controlled function. A pool can be deprecated via the deprecatePool function as shown below: function deprecatePooluint poolId public onlyOwner...
Owner of _liquidationPair can add malicious liquidation source and insufficient input parameter validations
Lines of code Vulnerability details Impact Malicious liquidationPair owner can deploy liquidationPair using malicious sourceliquidation source that the pair will use and other insufficient input validations that can put users' funds at risk. File: src/LiquidationPairFactory.sol function createPai...
getAmountsForLiquidity used in TokenisableRange.sol uses mulDiv from UniswapV3 which expects overflow behavior, but overflows can't happen
Lines of code Vulnerability details Impact getAmountsForLiquidity which is used in TokenisableRange.sol has the mulDiv function which is taken from UniswapV3 FullMath library, function which require overflow behavior, but that behavior will not be allowed in the Good Entry TokenisableRange.sol...
Wrong Accruing executed in VaultBooster.sol
Lines of code Vulnerability details Impact Accounting error in accruing at VaultBooster.sol will cause unexpected problems in VaultBooster.sol contract. Proof of Concept The accrue function of VaultBooster.sol at : does not check whether the return variable of computeAvailabletokenOut i.e.,...
Re-org attack in factory LiquidationPairFactory.sol
Lines of code Vulnerability details Impact Allowing creation of new LiquidationPairs by Re-org attack may adversely affect pricing in LiquidationPair.sol contracts. Proof of Concept The LiquidationPairFactory.solcreatePair function deploys a new LiquidationPair using the create, where the address...
Potential Near-Zero Scenarios for purchasePrice in the Continuous Gradual Dutch Auction
Lines of code Vulnerability details Impact The Continuous Gradual Dutch Auction CGDA model has potential scenarios where the purchasePrice for an amount of tokens could approach near-zero values. This is influenced mainly by two factors: emissionRate and timeSinceLastAuctionStart. If either one o...
Missing check for equal length arrays in executeOperation().
Lines of code Vulnerability details Impact The executeOperation function in the OptionsPositionManager contract doesn't check if the lengths of the arrays submitted are equal. This can lead to unexpected operations. Proof of Concept In the OptionsPositionManager contract, the executeOperation...
Too many rewards are distributed when a draw is closed
Lines of code Vulnerability details Impact A relayer completes a prize pool draw by calling rngComplete in RngRelayAuction.sol. This method closes the prize pool draw with the relayed random number and distributes the rewards to the RNG auction recipient and the RNG relay auction recipient. These...
The treasury address can be updated by the contract owner to point to a malicious address after deployment
Lines of code ttps://github.com/code-423n4/2023-08-goodentry/blob/71c0c0eca8af957202ccdbf5ce2f2a514ffe2e24/contracts/GeVault.solL58 Vulnerability details Impact Any fees or funds sent to the treasury could potentially be stolen or manipulated Proof of Concept The treasury address can be updated b...
slot0 is easily manipulatable
Lines of code Vulnerability details Impact The deposit amount of a user can be manipulated. Proof of Concept slot0 is extremely easy to manipulate as it is the most recent data point. The issue arises due to there not being any protection against sqrtPriceX96 manipulation. // @audit no check...
Missing flash loan initiator check allows attacker to open trades, close trades and steal funds
Lines of code Vulnerability details Impact The attacker can close trades, partially close trades and even steal funds. Proof of Concept The OptionsPositionManager.executeOperation function is called when a flash loan is made and it can only be called by the lendingPool. The wrong assumption by th...
Wrong calculation of debt in function close0 may lead to loss of funds.
Lines of code Vulnerability details Impact In the function close, the debt was equated to the repayAmount after checking that repayAmountis greater than zero and less than the debt. Consider a situation where a user is owing 10 tokens and wants to repay 3 tokens. since 3 passes the check of being...
rngComplete() function is vulnerable to an array out of bounds error
Lines of code Vulnerability details Impact A malicious actor can manipulate the AuctionResult passed to RewardLib.rewards to make it return a short rewards array Proof of Concept The issue is that there is no check that i stays within the bounds of rewards. If rewards is shorter than expected, th...
Risk of silent overflow in rngComplete rewards cast
Lines of code Vulnerability details Impact The rngComplete function uses the rewards function from the RewardLib library to calculates the rewards that should be given, the rewards returned by the rewards function are of type uint256 but before proceeding to the reward transfer the call to...
Check for the L2 Sequencer's uptime when calling the Chainlink feed is not implemented
Lines of code Vulnerability details Impact The getAnswer function in the LPOracle and OracleConvert contracts has a vulnerability that does not include a check for the Sequencer's uptime when calling the Chainlink feed CLTOKENA, CLTOKENB. In Layer 2 L2 systems, the Chainlink oracle may return an...
Closing the draw will be compromised if the recipient reward is address(0)
Lines of code Vulnerability details Impact The rngComplete function receives the RNG request results, it closes the draw using the randomNumber generated by the RNG request auction and it transfer the rewards. The problem is that a malicious actor can introduce a address zero in the recipient...
the _rngCompletedAt timestamp passed to rngComplete() can be manipulated by the caller to increase their reward
Lines of code Vulnerability details Impact This will result in a larger reward fraction, allowing the caller to unfairly claim more of the rewards. Proof of Concept The rngCompletedAt timestamp is controlled by the caller. They can make auctionElapsedSeconds smaller by providing a higher...
The protocol uses IRouter01 from Uniswap, which should not be used anymore because of a bug found in the code
Lines of code Vulnerability details Impact The protocol implements Router01 from UniswapV2 to do any swaps of tokens in OptionsPositionManager.sol, but Router01 is deprecated and bugged and should not be used anymore. Proof of Concept As can be seen in the UniswapV2 documentation Router01 should...
DEPRECATED POOLS CAN BE USED IN THE CRITICAL TRANSACTION EXECUTIONS OF THE OptionsPositionManager CONTRACT
Lines of code Vulnerability details Impact The PositionManager.getPoolAddresses function is used to get the important address details of the RoePool to be used in the critical function executions of the OptionsPositionManager contract such as executeBuyOptions, executeLiquidation,...
rounding error can lead to DISABLE the system
Lines of code Vulnerability details Impact In RNGAuction.sol, openSequenceId if the difference between currentTime and sequenceOffset is less than the sequencePeriod, it will round to zero leading to all functions depending on its value to return false like canStartNextSequence, or even revert in...
Use of slot0 to get sqrtPriceLimitX96 can lead to price manipulation
Lines of code Vulnerability details Impact The contracts functions have used UniswapV3.slot0 to get the value of sqrtPriceX96 which it use to perform the swap, however the sqrtPriceX96 gotten from Uniswap.slot0 is the most recent data point and can be manipulated easily via MEV bots & Flashloans...
Potential Precision Loss in claimFee() due to Division Before Multiplication
Lines of code Vulnerability details Impact The function claimFee may result in precision loss when calculating the addedValue variable. This issue arises due to division being performed before multiplication, leading to the possibility of truncated values and incorrect results. Proof of Concept T...
Not Checking For Stale Price
Lines of code Vulnerability details Impact Oracle data feed is insufficiently validated. There is no check for stale price and round completeness. Price can be stale and can lead to wrong price return value Proof of Concept /// @notice Get the price for the latest available round of a feed ///...
addDust in OptionsPositionManager.sol can add way more tokens than expected in cases where the asset used has less decimals
Lines of code Vulnerability details Impact The function addDust is used in closeDebt to // Add dust to be sure debt reformed = debt outstanding as stated in the NatSpec, but in the cases of tokens with less decimals, the amount calculated will be way bigger than expected which could make the whol...
Some functions in TokenisableRange contracts does not allow user to deadline.
Lines of code Vulnerability details Impact Not allowing users to supply their own deadline could potentially expose them to sandwich attacks Proof of Concept Consider the following scenario: if fee0 100 bal0 && fee1 100 bal1 TOKEN0.token.safeIncreaseAllowanceaddressPOSMGR, fee0;...
Functions Not Considering ERC20 Transaction Fees
Lines of code Vulnerability details Impact Some ERC20 tokens charge a transaction fee for every transfer used to encourage staking, add to liquidity pool, pay a fee to contract owner, etc.. Sometimes this is not a problem but in the cases where the same value is passed to a state variable and to...
RETURN VALUE OF LOW LEVEL call FUNCTION IS NOT CHECKED FOR SUCCESFUL VALUE TRANSFER
Lines of code Vulnerability details Impact The V3Proxy.swapTokensForExactETH and V3Proxy.swapExactTokensForETH functions use the low level call function to transfer Eth to the msg.sender as shown below: payablemsg.sender.callvalue: amountOut""; But there is no verification of the return value of...
Upgraded Q -> 3 from #16 [1691315821722]
Judge has assessed an item in Issue 16 as 3 risk. The relevant finding follows: L-04: MorphoTokenisedDeposit override decimalsOffset ==0 increase ERC4626 inflation attack risk --- The text was updated successfully, but these errors were encountered: All reactions...
Upgraded Q -> 2 from #180 [1691271324742]
Judge has assessed an item in Issue 180 as 2 risk. The relevant finding follows: L-04 Some slot data is incorrectly overwritten during storage --- The text was updated successfully, but these errors were encountered: All reactions...
Upgraded Q -> 2 from #116 [1691272104948]
Judge has assessed an item in Issue 116 as 2 risk. The relevant finding follows: L-02 Misuse of shl function leads to unnecessary over-estimation of size in calldatacopy within getArgBytes function --- The text was updated successfully, but these errors were encountered: All reactions...
Incorrect parameter for getCallerReward might return 0 reward despite insolvency
Lines of code Vulnerability details Impact The calculation of the caller reward uses an incorrect value. If the exchangeRate remains the same but a lot of interest accrues, then there will be no liquidation reward. Without a liquidation reward borrowing positions will not get liquidated and incur...
Missing access control override in BoringFactory
Lines of code Vulnerability details Impact function addBigBang address mc, address contract external onlyOwner registeredBigBangMasterContractmc isMarketRegisteredcontract = true; clonesOfmc.pushcontract; emit RegisterBigBangcontract, mc; allows only onlyOwner to call this function, while deploy ...
Cross-chain replay attacks are possible
Lines of code Vulnerability details Impact In MarketERC20.sol we have permit function: function permit / bool asset, // 1 = asset, 0 = collateral address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, ...
Yearn Stragety tolerant 0 loss, which is too strict and can block withdraw
Lines of code Vulnerability details Impact Yearn Stragety tolerant 0 loss, which is too strict Proof of Concept When withdraw from Yearn Stragety result = vault.withdrawtoWithdraw, addressthis, 0; @param maxLoss The maximum acceptable loss to sustain on withdrawal. Defaults to 0.01%. If a loss is...
Setting debtStartPoint > 0 breaks many BigBang actions
Lines of code Vulnerability details Impact If BigBang.debtStartPoint is set to a value 0, many core features will break, e.g. deposits of collateral will be possible, but removal not, which would effectively lock collateral inside the contract. Proof of Concept BigBang.getDebtRate uses the variab...
Reentrancy vulnerability in BaseUSDO._executeModule() function
Lines of code Vulnerability details Impact the success variable in the executeModule function in the BaseUSDO contract is written in both line 366 and line 369. This could potentially lead to a reentrancy vulnerability. In line 366, the success variable is set to true. In line 369, the success...
Balancer swap fee is not set and quote properly when Rebalancing
Lines of code Vulnerability details Impact Rebalance may revert Proof of Concept The rebalance functon tightly integrate with stargate and layezero however, the swap fee is not quoted and calculated the swap erc20.approveaddressrouter, amount; router.swap dstChainId, srcPoolId, dstPoolId, oft,...
Permanent funds lock in StargateRewardableWrapper
Lines of code Vulnerability details Impact The staked funds might be locked because the deposit/withdraw/transfer logic reverts. Proof of Concept In StargateRewardableWrapper, claimAssetRewards claims the accumulated rewards from the staking contract and it's called during every...
The USDOOptionsModule contract's exercise function allows for dangerous call delegation
Lines of code Vulnerability details Impact The USDOOptionsModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for oTap actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...
The Asset.lotPrice doubles the oracle timeout in the worst case
Lines of code Vulnerability details When the tryPrice function revert, for example oracle timeout, the Asset.lotPrice will use a decayed historical value: uint48 delta = uint48block.timestamp - lastSave; // s if delta = oracleTimeout + priceTimeout return 0, 0; // no price after full timeout else...
Insufficient Authorization Checks in 'SGLLeverage' Contract Functions
Lines of code Vulnerability details Description The 'SGLLeverage' contract contains critical vulnerabilities in multiple functions, including 'multiHopBuyCollateral,' 'multiHopSellCollateral,' 'sellCollateral,' and 'buyCollateral.' These functions lack proper authorization checks, allowing any us...
TapOFT.sol: Incorrect emission value due to division by higher decimal value
Lines of code Vulnerability details Impact Incorrect emission value which will be used in per week emission. Proof of Concept TapOFT.sol has the computeEmission function to calculate the emitted value. The output from this function is used in emitForWeek. when we look at the function...
The USDOLeverageModule contract's leverageUp function allows for dangerous call delegation
Lines of code Vulnerability details Impact The USDOLeverageModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for leverage actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...
Reentrancy vulnerability in SGLLendingCommon._removeCollateral
Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw collateral from the SGLLendingCommon contract without actually removing it. This could result in a loss of funds for the lender. Proof of Concept The SGLLendingCommon.removeCollateral function is...
LiquidationQueue brings centralization risk in the contract.
Lines of code Vulnerability details Impact the owner has too much unilateral control over liquidations and can manipulate te country in the following ways: The owner of LiquidationQueue sees a profitable liquidation opportunity Before anyone else can liquidate, they use LiquidationQueue to place ...
Incorrect implementation of solvent() modifier
Lines of code Vulnerability details Impact In Market.sol, solvent modifier is given as below, modifier solventaddress from updateExchangeRate; accrue; ; requireisSolventfrom, exchangeRate, "Market: insolvent"; Here the modifier has used the accrue directly, however while the functions being used ...
Incorrect parameter for allowedBorrow when repaying
Lines of code Vulnerability details Impact Incorrect parameter for allowedBorrow check during repayment in BigBang requires an approval that is orders of magnitudes higher than the intended amount if Alice wants to allow Bob to use their funds. This can be abused by Bob to take more collateral or...
borrowInternal() of BaseTOFTMarketModule.sol has phantom permit functions
Lines of code Vulnerability details Impact A malicious actor could steal funds from a User who has already done his first deposit. Proof of Concept Consider the case where attacker uses a token with phantom permit function as collateral, the most famous ones being WETH, BNB, HEX etc. Let’s consid...
rate is wrong
Lines of code Vulnerability details Impact attacker can manipulate pool price to make strategy have eth lower as it should have 1 seth 1 eth then mint new steth 1 steth = 1 eth so attacker can gain share more than normal Proof of Concept 1. attacker manipulate pool price 1 seth 1 eth 2. attacker...
Missing validation checks on sending non blocking LZ payload
Lines of code Vulnerability details Impact In OFTCoreV2 provided as example by LayerZero function sendaddress from, uint16 dstChainId, bytes32 toAddress, uint amount, address payable refundAddress, address zroPaymentAddress, bytes memory adapterParams internal virtual returns uint amount...