Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/08/07 12:0 a.m.12 views

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,...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.7 views

Overstatement of Available Funds Due to Logic Error

Lines of code Vulnerability details Impact The computeAvailable function in VaultBooster.sol could potentially overstate the available balance in certain situations. Two functions rely on computeAvailable for determining the available funds, such as liquidate, accrue. If the overstated balance fr...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.7 views

PRBMATH SD59x18.exp() reverts on hugely negative numbers.

Lines of code Vulnerability details Impact ContinuousGDA.sol inherits a version of PRB Math that contains a vulnerability in the SD59x18.exp function, which can be reverted on hugely negative numbers. SD59x18.exp is used for calculations in ContinuousGDA.solpurchasePrice ,...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.12 views

UNCHECKED TRANSFER

Lines of code Vulnerability details Impact Some tokens do not revert the transaction when transferFrom fails and returns False. Hence we must check the return value after calling the transfer or transferFrom function. Proof of Concept Check the last answer here: In short: Using...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.11 views

Anyone can complete the Rng relay auction

Lines of code Vulnerability details Impact There's no access restriction on rngComplete which allows anyone to execute this function and complete the auction. This can lead to unexpected behavior or potential DOS attack where a user completes the auction. Tools Used Manual Analysis Recommended...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

INCORRECT ACCESS CONTROL

Lines of code Vulnerability details Impact Access control plays an important role in segregation of privileges in smart contracts and other applications. If this is misconfigured or not properly validated on sensitive functions, it may lead to loss of funds, tokens and in some cases compromise of...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.12 views

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...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.10 views

Inflation attacks with virtual shares and assets on GeVault

Lines of code Vulnerability details Impact An inflation attacks can be done on the first deposit into the GeVault contract. Making the first real depositor losing his deposit. Proof of Concept Inflation attack steps : First, Alice the attacker need to craft a deposit that put valueX8 = 1 = Thus...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.7 views

GetVault poolMatchesOracle calculation may overflow

Lines of code Vulnerability details Impact Overflow. Proof of Concept The GetVault derivative contract implements the poolMatchesOracle function, which is used by deposit, withdraw and rebalance functions. The poolMatchesOracle function checks that the pool price isn't manipulated using a Uniswap...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

function rngComplete is unpprotected

Lines of code Vulnerability details Impact The rngComplete is a function Called by the relayer to complete the Rng relay auction. However it has zero access control. Proof of Concept The function makes calls to the prizepool to close a draw, it also withdraws from a reserve. All these are done wi...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.14 views

Missing deadline param in swapExactAmountOut() allowing outdated slippage and allow pending transaction to be executed unexpectedly.

Lines of code Vulnerability details Impact Loss of funds/tokens for the protocol, since block execution is delegated to the block validator without a hard deadline. Proof of Concept The function swapExactAmountOut from LiquidationRouter.sol and LiquidationPair.sol use these methods to swap tokens...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.13 views

Assets from the old step are not properly transferred to a new TR position

Lines of code Vulnerability details Impact The transferAssetsIntoStep function's intent is to serve two purposes: transferring aAssets to a target TR position and moving assets from an old step to a target TR position. However, in practice, assets removed from the old step are not integrated into...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.14 views

RngRelayAuction can be bricked or used to specify arbitrary winning random numbers

Lines of code Vulnerability details Impact The RngRelayAuction contract deployed on each chain has a rngComplete method that is supposed to be called by the relayer in order to close/complete a prize draw. However this method doesn't have any access control and can therefore be called by anyone...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

[M-02] Denial of Service on failed call Dos

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. External calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each external call into its...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.49 views

SETTING block.timestamp AS THE DEADLINE COULD LEAD TO HIGHER RATE OF FAILED TRANSACTIONS

Lines of code Vulnerability details Impact The OptionsPositionManager.swapExactTokensForTokens function is used to swap assets for exact assets. Here the exact amount of source token is swapped for an amount of target token. The function uses the IUniswapV2Router01.swapExactTokensForTokens call f...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.9 views

the check in checkExpectedBalances only allows 2% slippage, which could be insufficient in volatile markets and lock user funds.

Lines of code Vulnerability details Impact This would cause the check to fail and revert the transaction, locking the user's funds Proof of Concept In volatile markets, the price could move more than 2% between when the user sends the transactions and when it gets mined. This would cause the chec...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.5 views

Forced close position

Lines of code Vulnerability details Impact The impact of this vulnerability is that any entity can forcefully close a user's position, resulting in a potential griefing attack. If the user's position is profitable, the user could lose potential larger profits against their will. Proof of Concept...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.11 views

Wrong Implementation of Continuous Gradual Dutch Auction

Lines of code Vulnerability details Impact Breaks the core functionality of the Liquidation Pair contract. Usage of wrong formula for calculation of Continuous Gradual Dutch Auction results in wrong calculation of purchase price which is basically used to find the swapAmountIn during liquidations...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

Flashloan excess debt is not sent to user

Lines of code Vulnerability details Impact These vulnerabilities can have the following impacts: 1. Liquidators may lose their eligible funds due to missing transfers of excess debt assets. 2. Excess debt TR tokens could remain in the contract after LP.flashloan claim back borrowed funds, which c...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.9 views

Loop condition that might prevent the function from correctly detecting range overlaps

Lines of code Vulnerability details Impact The loop iterates through each element in the stepList array and checks whether the new range overlaps with each existing range. However, the revert"Range overlap"; statement is placed inside the loop, which means that the moment any overlap is detected,...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.13 views

Insufficient input validation can lead to loss of funds

Lines of code Vulnerability details Impact The VaultBooster.sol contract allows someone to liquidate tokens for a vault and improve the vault's chance of winning. The prizePool.prizeToken is set in the constructor and liquidationPair set in the setBoost function. However, the external deposit...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.8 views

TokenisableRange.sol claimFee function allows more slippage than intended due to incorrect calculation

Lines of code Vulnerability details Impact In TokenisableRange.sol, claimFee collects swap fees generated in uniswap and compound these fees by minting to Uniswap pool. During minting collected fees back in uniswap, slippage protection is conducted by comparing addedValue - a value based on added...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.13 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.16 views

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.,...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.6 views

Calculations like valueX8 and liquidity do not account for potential rounding errors

Lines of code Vulnerability details Impact These small inaccuracies could accumulate and cause the total supply of liquidity tokens to not exactly match the vault holdings. This could allow an attacker to potentially deposit tokens, get liquidity that is slightly higher than what they should base...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/07 12:0 a.m.9 views

Protocol won't work with tokens that can prevent transfers

Lines of code Vulnerability details Impact There are various tokens and token standards that can result in transfers being stopped, blocked, blacklisted, paused or disallowed. This entails protocols may function well with these tokens up until a time when any of above measures activated leading t...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/06 12:0 a.m.7 views

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...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/05 12:0 a.m.8 views

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...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/05 12:0 a.m.6 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.5 views

Reentrancy vulnerability in USDO.flashLoan() function

Lines of code Vulnerability details Impact The reentrancy vulnerability in the USDO contract could allow an attacker to withdraw funds from the contract even if the original contract has not yet approved the withdrawal. This could result in a loss of funds for the USDO contract and its users. Pro...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

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, ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

addCollateral allows anyone to addCollateral on behalf of others

Lines of code Vulnerability details Impact addCollateral allows anyone to addCollateral on behalf of others. In other words, bypassing the borrow allowance check. Proof of Concept allowedBorrow modifier will not revert if passed share == 0. addCollateral method uses allowedBorrow modifier functio...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

Calc token amount can be manipulated

Lines of code Vulnerability details Impact function calcDepositInOneCoin uint2563 memory arr private view returns uint256 return liquidityPool.calctokenamountarr, true; This function is being used to calculate slippage, return value calctokenamount can be manipulated as described in POC section,...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.12 views

Reentrancy vulnerability in Singularity.execute

Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw funds from the Singularity contract. This could result in a loss of funds for the user. Proof of Concept The Singularity.execute function has external calls inside a loop. This could potentially lead...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

Reentrancy vulnerability in BigBang.execute

Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw funds from the BigBang contract. This could result in a loss of funds for the user. Proof of Concept The BigBang.execute function has external calls inside a loop. This could potentially lead to...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

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...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

USDT approval racing can lead to DoS

Lines of code Vulnerability details Impact USDT approval racing can lead to DoS Proof of Concept 2023-07-tapioca/tapioca-periph-audit/contracts/Magnetar/modules/MagnetarMarketModule.solL157 Tools Used Recommended Mitigation Steps Use safeApprove Assessed type call/delegatecall --- The text was...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

RTokenAsset price estimation accounts for margin of error twice

Lines of code Vulnerability details RTokenAsset estimates the price by multiplying the BU basket unit price estimation by the estimation of baskets held then dividing by total supply. The issue is that both BU and baskets held account for price margin of error, widening the range of the price mor...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.34 views

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...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.7 views

The USDOMarketModule contract's lend function allows for dangerous call delegation

Lines of code Vulnerability details Impact The USDOMarketModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for market actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.6 views

User can't redeem from RToken based on CurveStableRTokenMetapoolCollateral when any underlying collateral of paired RToken's price oracle is offline(timeout)

Lines of code Vulnerability details The CurveStableMetapoolCollateral is intended for 2-fiattoken stable metapools that involve RTokens, such as eUSD-fraxBP. The metapoolToken coin0 is pairedToken, which is also a RToken, and the coin1 is lpToken, e.g. 3CRV. And the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.5 views

TOFT in (m)TapiocaOft contracts can be stolen by calling removeCollateral() with a malicious removeParams.market

Lines of code Vulnerability details Impact The TOFT available in the TapiocaOFT contract can be stolen when calling removeCollateral with a malicious market. Proof of Concept mTapiocaOFT inherit BaseTOFT, which has a function removeCollateral that accepts a market address as an argument. This...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.5 views

Malicious user can drain the Singularity contract of it's liquidity

Lines of code Vulnerability details Impact The SGLCollateral contract has functionality to allow users to remove and add collateral for the Singularity market. The addCollateral function accepts a skim parameter that, if defined as true, will cause the internal addTokens function to assert that t...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.5 views

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,...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.6 views

Reentrancy vulnerability in SGLCommon._removeAsset

Lines of code Vulnerability details Impact The function SGLCommon.removeAsset is vulnerable to reentrancy attacks. Reentrancy occurs when a contract calls another contract, and the second contract calls back to the first contract before the first contract has finished executing. This can allow th...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

There is no decrease for the share allowance from _addCollateral when share passed zero

Lines of code Vulnerability details Impact When calling addCollateral, and if the share passed as zero, it is calculated based on the passed amount. However, this happens after allowanceBorrow was already called in addCollateral. So, deduction never occur for the share. Eventually, the borrow...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

cbETH's fails to check for a depeg since pegPrice is always 1

Lines of code Vulnerability details Whenever refresh is called for a collateral it does a few checks, one of them is to ensure the collateral didn't depge. It does so by calling tryPrice and checking that the returned parameter pegPrice which is supposed to represent the current price of the...

6.8AI score
Exploits0
Total number of security vulnerabilities10190