Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•10 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•14 views

REENTRANCY

Lines of code Vulnerability details Impact In a Re-entrancy attack, a malicious contract calls back into the calling contract before the first invocation of the function is finished. This may cause the different invocations of the function to interact in undesirable ways, especially in cases wher...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•8 views

RngRelayAuction.rngComplete() DOS attack

Lines of code Vulnerability details Impact If the recipient maliciously enters the blacklist of priceToken, it may cause rngComplete to fail to execute successfully Proof of Concept The current implementation of RngRelayAuction.rngComplete immediately transfers the prizeToken to the recipient...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•16 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

GeVault cannot deposit ETH

Lines of code Vulnerability details Impact The GeVault contract has two instances where the require statement for token validation can cause reverts. In the first instance, the contract allows only token0 and token1 addresses for withdrawal, making it impossible to withdraw ETH. In the second...

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

removeFromAllTicks() withdraws all tick assets before deposit and withdraw re-deposit them creates a reentrancy attacks.

Lines of code Vulnerability details Impact reentrancy attacks can result to stolen funds Proof of Concept The key issue is that removeFromAllTicks calls removeFromTickindex in a loop, which calls lendingPool.withdraw and tr.withdraw. These external calls could trigger a reentrant call back into t...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•14 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•51 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•14 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•12 views

INCORRECT ACCESS CONTROL

Lines of code https...

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

RemoteOwner circular dependency at deployment time

Lines of code Vulnerability details Impact The RemoteOwner.sol contract has a security measure that ensures the sender from the remote/origin chain was the origin chain owner i.e. a RngAuctionRelayerRemoteOwner.sol deployment, and this address is set at deployment time in the constructor. The...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•13 views

The RngRelayAuction::rngComplete() function can be called by anyone (malicious actor) causing that the draw will be closed using a malicious random number

Lines of code Vulnerability details Impact The rngComplete function is called by the RngAuctionRelayerDirect contract or the RngAuctionRelayerRemoteOwner contract. The rngComplete function receives the RNG results from the rng auction. The problem here is that the rngComplete function can be call...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•13 views

swapExactAmountOut() does not have deadline which allows pending transactions to be maliciously executed

Lines of code Vulnerability details Impact In LiquidationRouter.sol, swapExactAmountOut function has no deadline for the transaction when swapping. File: src/LiquidationRouter.sol function swapExactAmountOut LiquidationPair liquidationPair, address receiver, uint256 amountOut, uint256 amountInMax...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•11 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•14 views

An attacker could manipulate the _rngAuctionResult to unfairly distribute more rewards to themselves

Lines of code Vulnerability details Impact When the rewards are calculated using computeRewards, the attacker's inflated rewardFraction will be used, giving them a bigger share Proof of Concept The rngAuctionResult passed to rngComplete is stored directly into the auctionResults array without any...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•14 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•17 views

executeOperation() doesn't pass/authenticate the initiator address

Lines of code Vulnerability details Impact In OptionsPositionManager.sol executeFlashloan. File: contracts/PositionManager/OptionsPositionManager.sol function executeOperation address calldata assets, uint256 calldata amounts, uint256 calldata premiums, address initiator, bytes calldata params...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•8 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•13 views

CONTROLLED LOW-LEVEL CALL

Lines of code Vulnerability details Impact The contract was using call which was accepting address controlled by a user. This can have devastating effects on the contract as a delegate call allows the contract to execute code belonging to other contracts but using it’s own storage. This can very...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

initiator in OptionsPositionManager.executeOperation is not checked

Lines of code Vulnerability details Impact An attacker can execute flashloan pretending to be other user. Proof of Concept LendigPool.flashloan sends which user called in the parameter initiator, but it is not used in executeOperation. Tools Used Manual review. Recommended Mitigation Steps Check ...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•10 views

integer underflow vulnerability in the _fractionalReward() function

Lines of code Vulnerability details Impact It could cause an integer underflow when calculating the reward fraction, resulting in the attacker getting more rewards than intended. True or false, explain in details, show relevant code and explain proof of co Proof of Concept The...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•18 views

Integer underflow/overflow is possible in some of the timestamp calculations if sequenceOffset or auctionDuration are set maliciously

Lines of code Vulnerability details Impact An attacker could exploit this to make auctionElapsedTime return a low value when it should be high, thereby manipulating the reward calculation. Proof of Concept The vulnerability comes from the subtraction currentTime - sequenceOffset which could...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•7 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
SaveExploits0
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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•10 views

VaultBoosterFactory allows deployment of VaultBooster with phoney PrizePool

Lines of code Vulnerability details Impact A malicious VaultBooster can be deployed via VaultBoosterFactory contract. Users may lose funds while interacting with such VaultBooster. File: src/VaultBoosterFactory.sol function createVaultBoosterPrizePool prizePool, address vault, address owner...

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

RangeManager.initRange does not refund leftover underlying assets to the contract owner

Lines of code Vulnerability details Impact The initRange function in the RangeManager contract has a vulnerability where leftover underlying assets from the tokenizable range are not properly refunded to the contract owner. This can lead to a situation where the owner's funds are stuck in the...

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

A malicious deployer can set auctionTargetTime close to auctionDuration to make it hard or impossible for anyone to win a reward.

Lines of code Vulnerability details Impact A malicious deployer could set auctionTargetTime very close to auctionDuration, making it hard/impossible for anyone to win a reward leading to losses Proof of Concept In the constructor, auctionTargetTime is not validated to be less than auctionDuration...

6.7AI score
SaveExploits0
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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

Wrong Type for Time Related Variable

Lines of code Vulnerability details Impact uint8, uint16 was used as Type to declare Time Related Variable in the LiquidationPair.sol contract, this totally wrong as except otherwise stated, seconds is the standard time frame in solidity and the number of digits needed will be too large for uint8...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•13 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•17 views

GeVault#poolMatchesOracle is extemely easy to manipulate due to how it calculates underlying token balances

Lines of code Vulnerability details Impact GeVaultpoolMatchesOracle uses the UniV3Pool.slot0 to determine the number of tokens it has in it's position. slot0 is the most recent data point and is therefore extremely easy to manipulate. Given that the protocol specializes in leverage, the effects o...

6.8AI score
SaveExploits0
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
SaveExploits0
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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

Missing sanityCheckUnderlying Call in Certain Functions of OptionsPositionManager Contract

Lines of code Vulnerability details Bug Description In the OptionsPositionManager contract, there is a missing call to the sanityCheckUnderlying function at the beginning of the sellOptions and close functions. These functions involve interactions with option assets and underlying tokens. However...

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

Deposit will always revert when depositing ETH if one of the GeVault tokens is not WETH

Lines of code Vulnerability details Impact When a user deposits funds, the deposit function requires an argument namely, the address of the token with which to fund the transaction. If the GeVault has two tokens of for example: USDC/DAI. Line 251 expects the function argument to be the address of...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

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

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•15 views

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

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

Incorrect Target Amount Calculation with Different Decimals in OptionPositionManager Contract

Lines of code Vulnerability details Bug Description In the OptionPositionManager contract, at line 524, there is a calculation error in the implementation of the getTargetAmountFromOracle function. This function calculates the target amount amountB based on the prices of assets A and B obtained...

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

swapExactAmountOut() no deadline protection

Lines of code Vulnerability details Impact no deadline protection , users may suffer losses Proof of Concept LiquidationRouter.swapExactAmountOut use for swap tokens. However, currently only amountInMax slippage protection is provided, and not deadline protection like the common AMMS protection...

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

_computeAvailable() the calculations are wrong

Lines of code Vulnerability details Impact computeAvailable incorrect calculations that result in a return value greater than the current balance, causing methods such as liquidate to fail Proof of Concept VaultBooster.computeAvailable used to count the number of tokens currently available There...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•13 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•12 views

Lack of check in LiquidationPair.sol#_computePeriod() can lead to DOS

Lines of code Vulnerability details Impact computePeriod will revert because lack of check input validation Proof of Concept In LiquidationPair.sol, computePeriod is used to computes the current auction period: see here. It is called in functions like getPeriodStart and checkUpdateAuction. 377:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•10 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
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•17 views

Incorrect Import Path Directories

Lines of code Vulnerability details Impact Wrong Import Path Directories of LiquidationPair.sol contract would affect the functionality of the contract as this contract relies of the implementation of this imports Proof of Concept 4. import ILiquidationSource from...

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

The absence of proper Access Control in RngRelayAuction::rngComplete() enables anyone to prematurely conclude the Auction Process.

Lines of code Vulnerability details Explanation For the DrawAuction to be successfully completed, a specific sequence of actions must be followed, and each step holds significance. This demands a carefully designed execution flow that considers both the procedure's requirements and the authorized...

7.4AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•18 views

swapExactTokensForTokens and swapTokensForExactTokens in OptionsPositionManager.sol uses UniswapV2Router01 which doesn't exist on Arbitrum

Lines of code Vulnerability details Impact The functions swapExactTokensForTokens and swapTokensForExactTokens are using UniswapV2Router01 to make swaps in different functions like closeDebt, withdrawOptionAssets or swapTokens, but that would not be possible and those function would revert. Proof...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

Only a relayer should call rngComplete function in RngRelayAuction.sol contract.

Lines of code Vulnerability details Impact An arbitrary user can set a wining number and set a rewardRecipient to take the rewards Proof of Concept The contract RngRelayAuction is setting a rngAuctionRelayer in the constructor. file: pt-v5-draw-auction/src/RngRelayAuction.sol /// @notice The...

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

TokenisableRange.sol does not have onERC721Received

Lines of code Vulnerability details Impact TokenisableRange.sol will be unable to mint Uniswap NFTs without a ERC721 Receiver. Proof of Concept TokenisableRange.sol intends to create liquidity NFTs using Uniswapv3 NonfungiblePositionManager. However, there is no callback to check onERC721Received...

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

Calculation Errors in calculateAndSendFee Function of OptionsPositionManager Contract

Lines of code Vulnerability details Bug Description In the OptionsPositionManager contract, specifically in the calculateAndSendFee function lines 365 to 367, there are several mathematical errors that impact the accuracy of the feeAmount result. These errors can lead to incorrect fee calculation...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190