Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข18 views

Loss of ETH for proposer when it is a contract that doesn't have fallback function.

Lines of code Vulnerability details Description sendEthOrWeth is used in several locations in OptimisticListingSeaport: 1. rejectProposal - sent to proposer 2. rejectActive - sent to proposer 3. cash - sent to msg.sender This is the implementation of sendEthOrWeth: function...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

Funds are permanently stuck in OptimisticListingSeaport.sol contract if active proposal is executed after new proposal is pending.

Lines of code Vulnerability details Description constructOrder is called in propose, OptimisticListingSeaport.sol. It fills the order params stored in proposedListingsvault. orderParams.offerer = vault; orderParams.startTime = block.timestamp; // order doesn't expire in human time scales and need...

6.3AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข24 views

Earlier bidders get cut out of future NFT holdings by bidders specifying the same price.

Lines of code LOC: Vulnerability details Description In GroupBuy module, users can call contribute to get a piece of the NFT pie. There are two stages in transforming the msg.value to holdings in the NFT. 1. filling at any pricesupply is not yet saturated uint256 fillAtAnyPriceQuantity =...

6.6AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข10 views

GroupBuy does not properly refund users

Lines of code Vulnerability details Impact On a successful purchase, users can call claim on the GroupBuy contract to mint and refund. The refunded amount is userContributions - summinReservePricesqty - pendingBalances. In case of the actual purchase price minReservePrices, the difference is not...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข10 views

MEV searchers can capture slippage tolerance on pool creation

Lines of code Vulnerability details Impact In the current Caviar protocol, anybody can supply initial liquidity to a newly created pool. An LP who intends to create a new pool and add liqiduity could execute the following transactions: 1. LP transaction 1: pair = Caviar.create 2. LP transaction 2...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข10 views

User didn't get an lpToken when trying to add liquidity to the pair with some baseTokenAmount

Lines of code Vulnerability details Impact User didn't get an lpToken when trying to add liquidity to the pair with some baseTokenAmount. The user lost their asset since they didn't get any lpToken Proof of Concept Inside Pair.sol contract, the add function exist for adding liquidity to the pair...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข17 views

GroupBuy can be drained of all ETH.

Lines of code Vulnerability details Description purchase in GroupBuy faciilitates the purchasing of an NFT after enough contributions were gathered. Another report titled "Attacker can steal the amount collected so far in the GroupBuy for NFT purchase" describes a high impact bug in purchase. It ...

7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

Pair.sol has payable functions with no way of withdrawing that ether

Lines of code Vulnerability details Pair.sol has payable functions with no way of withdrawing that ether Summary Value is deposited on the contract using payable functions but later can't be taken out Impact Locked ether Proof of Concept Pair.adduint256,uint256,uint256 Pair.buyuint256,uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข19 views

Attacker can make group pay for tokenID that is not intended.

Lines of code Vulnerability details Description purchase in GroupBuy.sol executes the purchase call for the group. There are two possibilities for which tokenIDs can be bought in GroupBuy: 1. If the group is for a specific NFT, the tokenID is the value in pool.merkleRoot variable. 2. If the group...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

unwrap function in Pair.sol can be exploited by a malicious user to exchange less expensive NFT's for more expensive ones in the pool

Lines of code Vulnerability details Impact nftRemove function burns lpTokens and releases baseTokenAmount and fractionalTokenAmount and then burns the fractionalTokenAmount to unwrap the NFT that is released back to the sender. At the time of unwrapping, code does not check if the tokenIds...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข16 views

PRICES CAN BE MANIPULATED WHEN LIQUIDITY IS VERY LOW

Lines of code Vulnerability details Impact Base and fractional token prices in the pool can be manipulated and set to values severely deviating from the originally intended price ratio right after the pool has been created. At this point, liquidity in the pool is deemed zero or exceptionally thin...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข28 views

ERC20 TOKENS WITH DIFFERENT DECIMALS THAN 18 MAY BREAK THE LOGIC AND PROVIDE UNEXPECTED RESULTS

Lines of code Vulnerability details Impact Note: Though it is mentioned that Rebase/fee-on-transfer tokens are not expected, however there exist other ERC20 tokens having different decimals than 18 Contracts LpToken and Pair performs calculations by using hardcoded value of decimals 18 1e18 for...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

LP's ERC20 tokens cannot be rescued when owner closes the pair

Lines of code Vulnerability details Impact LP cannot be rescued when owner closes the pair. Aside from the NFT which can be salvaged through Pair.withdraw, the ERC20 token amounts cannot be rescued, resulting in fund loss. Proof of Concept In case of any malicious attempt to grief the protocol, t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข20 views

Reentrancy issue #1: Functions buy() and add() are vulnerable to reentrancy attack through tokensToSend() hook of ERC777

Lines of code Vulnerability details It is important to be aware that I have reported two reentrancy bugs. Each of these have different ways of being activated and can be found in separate functions. Impact All calculations done in Caviar Pair are using token balance directly. For example, when...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข24 views

Malicious users can block listing

Lines of code Vulnerability details Impact In the OptimisticListingSeaport contract, any user with the Rae token corresponding to this Vault can call the propose function to create a listing proposal, which can be used for listing when the proposal exists over PROPOSALPERIOD. function listaddress...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข16 views

Unlimited minting of fractional tokens by calling Pair.wrap() multiple times

Lines of code Vulnerability details Impact User can mint an unlimited amount of fractional tokens and break the protocol by selling the tokens. Proof of Concept NFTs can be traded for 1e18 fractional tokens by calling the function wrap. Wrap calls validateTokenIdstokenIds, proofs which in turn ru...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

(*POTENTIAL DUPLICATE) unwrap function can be exploited to exchange lower priced NFT's for higher priced counterparts

Lines of code Vulnerability details POTENTIAL DUPLICATE - Submitted earlier but haven't received an email confirmation. Hence resubmitting - please ignore if my earlier submission was already recorded Impact nftRemove function takes an array of tokenIds and LPTokens, releases the fractional NFT...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข17 views

xyk invariant does not hold after calls to buy() and sell()

Lines of code Vulnerability details Impact Functions buyQuote and sellQuote are defined like this in Pair.sol: /// @notice The amount of base tokens required to buy a given amount of fractional tokens. /// @dev Calculated using the xyk invariant and a 30bps fee. /// @param outputAmount The amount...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

NOT refunding excess token while adding liquidity

Lines of code Vulnerability details Impact LP providers can lose fund Proof of Concept Tools Used Recommended Mitigation Steps incase of ether, return excess ether - incase of erc20, transfer only required amount - --- The text was updated successfully, but these errors were encountered: ๐Ÿ˜• 1 Shun...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข18 views

Only one GroupBuy can ever use USDT or similar tokens with front-running approval protections

Lines of code Vulnerability details Calling approve without first calling approve0 if the current approval is non-zero will revert with some tokens, such as Tether USDT. While Tether is known to do this, it applies to other tokens as well, which are trying to protect against this attack vector...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข15 views

Stealing liquidity provider's fund by manipulating the reserve

Lines of code Vulnerability details Impact An attacker can steal liquidity provider's fund by manipulating the reserve. During adding a liquidity, the amount of lpToken to be minted will be calculated in the function addQuote. function addQuoteuint256 baseTokenAmount, uint256 fractionalTokenAmoun...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

_transferFrom() in Pair contract doesn't update approval amounts when transferring user fractional tokens

Lines of code Vulnerability details Impact Contract Pair is and ERC20 token which represents user fractional token balance and it has all the features of the standard ERC20 tokens. function transferFrom has been written for transferring token but the logic isn't complete and it doesn't consider...

7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข15 views

Possible Reentrancy Vulnerability

Lines of code Vulnerability details Impact In Add function, in case of non Eth Base Token, LP Tokens are minted for LP Provider before transferring the Base Token from Provider to Contract. In remove function, Fractional Tokens are Transferred to LP Provider before Burning the LP Token. In wrap...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข21 views

LP token is vulnerable to flashloan manipulation

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The addQuote function in the pair.sol smart contract utilizes a pricing formula for liquidity pools that is susceptible to exploitation through flashloan manipulation. By introducing a large quantity of...

7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข9 views

there is no max value for min lp in add function

Lines of code Vulnerability details Impact breaking logic, ... Proof of Concept there is no check Tools Used Recommended Mitigation Steps ad checks to ensure min lp amt is have max --- The text was updated successfully, but these errors were encountered: ๐Ÿ‘Ž 2 Shungy and soosh1337 reacted with thum...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข24 views

Bidding data structure is corrupted, leading to unfair removal from queue.

Lines of code Vulnerability details Description processBidsInQueue in GroupBuy handles integrating a new bid into the existing structure. If bumps out lower-paying bids until the new bid is completely fulfilled or the remaining bids are too high. When the lowest paying bid has higher quantity tha...

6.6AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข14 views

Invalid tokens can be added to the pair

Lines of code Vulnerability details Impact merkleRoot is a bytes32 and it is compared to bytes230 which makes it possible for a non-zero merkleRoot to be set in the constructor and yet still all tokens will be declared as valid Proof of Concept Tools Used Manual Audit Recommended Mitigation Steps...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข15 views

Incorrect rounding in buyQuote

Lines of code Vulnerability details The function buyQuote present in the Pair contract is used to calculate the amount of base tokens required to buy a given amount of fractional tokens. function buyQuoteuint256 outputAmount public view returns uint256 return outputAmount 1000 baseTokenReserves /...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข15 views

Price manipulation if baseToken have transfer hook

Lines of code Vulnerability details Impact Pair calculate the price by dividing the fractional token reserve with base token reserve. If the token have a before transfer hook, there would be a time where the fractional token reserves changed but the base token reserve have not, where the executio...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข22 views

Attacker can delay proposal rejection

Lines of code Vulnerability details Impact In OptimisticListingSeaport.rejectProposal, it revert if proposedListing.collateral if proposedListing.collateral proposedListing.collateral -= amount; Proof of Concept 1. Attacker propose at 10000 collateral at a very low price 2. Bob try to reject it b...

6.6AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข7 views

Frontrunning initial liquidity adding

Lines of code Vulnerability details Impact Creation of the pair does not add initial liquidity which leads to situation where attacker can front-run creator and execute sandwich attack against the creator. Exploitation Scenario: 1. Alice creates pair and wants to add liquidity 2. Bob front-runs...

7.1AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข18 views

Attacker can DOS OptimisticListing with very low cost

Lines of code Vulnerability details Impact The only check on a new proposal is that it is priced lower than the existing proposal. It does not constrain on the collateral supplied except it will revert in verifyBalance if set to 0. Anyone can block normal proposal creation by creating a proposal...

6.6AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข28 views

Orders may not be fillable due to missing approvals

Lines of code Vulnerability details Not all IERC20 implementations revert when there's a failure in approve. If one of these tokens returns false, there is no check for whether this has happened during the order listing validation, so it will only be detected when the order is attempted. Impact I...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

GroupBuys that are completely filled still don't raise stated target amount

Lines of code Vulnerability details Description createPool in GroupBuy.sol creates a new contribution pool around an NFT. It specifies a target initialPrice as minimum amount of ETH the NFT will cost, and totalSupply which is the number of Raes to be minted on purchase success. minBidPrices is...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข25 views

Attacker can steal the amount collected so far in the GroupBuy for NFT purchase.

Lines of code Vulnerability details Description purchase in GroupBuy.sol executes the purchase call for the group. After safety checks, the NFT is bought with market's execute function. Supposedly it deploys a vault which owns the NFT. The code makes sure the vault is the new owner of the NFT and...

7.1AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข14 views

buyQuote should be rounded up

Lines of code Vulnerability details Impact The buyQuote is not rounded up, which can cause a leak of value, due to the buyQuote being underestimated. Proof of Concept The function Pair.buyQuote does not round up, which can cause the issue described under Impact: function buyQuoteuint256...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข19 views

Rounding down leads to breakage of the xy curve calculation

Lines of code Vulnerability details Impact When needing to calculate the inputAmount required to receive a certain amount of fractional tokens called outputAmount, we are deriving from the xy = k curve used on the Uniswap V2 protocol. Proof of Concept Some maths: The so-called curve equation is: ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข25 views

Funds will be lost if the contract handling the refunds are unable to handle them at the moment

Lines of code Vulnerability details The return values of low-level calls are not checked Impact If the fund transfer results in a revert on the recipient's end, e.g. due to being paused, the code will continue on as if it had been successful, and the Ether will be lost. Proof of Concept Return...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข11 views

Price manipulation by sending Ether

Lines of code Vulnerability details Price manipulation by sending Ether not profitable although The function Pair.price uses Pair.baseTokenReserves uses addressthis.balance or ERC20baseToken.balanceOfaddressthis. In case addressthis.balance is used when address0 is passed, there can be price...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข18 views

Not supporting fee-on-transfer token as base token

Lines of code Vulnerability details Impact In Caviar protocol, all calculations in functions add, remove, buy, sell is done using token balance of Pair contract directly. In function add, it calculates and mints LP token to sender first before transferring baseToken in. function adduint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข21 views

sellQuote might lead to unexpected reverts when returning zero

Lines of code Vulnerability details Impact the implementation of sellQuote follows the logic of getAmountOut from Uniswap V2 Library. However it doesn't add +1 as the original implementation, this could make the function return zero and lead to reverts. Proof of Concept Tools Used Manual review...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข12 views

Protocol's fractional token assumes that each NFT in a collection has the same value

Lines of code Vulnerability details Impact User can cheat the system by wrapping getting fractional tokens a low value NFT and unwrapping a high value NFT selling the same fractional tokens. Pair creator might lose out. Proof of Concept Pair.wrap takes in an array of tokenIds and an array of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข17 views

Missing approval check

Lines of code Vulnerability details Proof of Concept The lpToken.mint function is called with the msg.sender as the recipient, but there is no check to ensure that the sender has approved the contract to transfer the fractional tokens on their behalf. If the lptoken.mint function is missing a che...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

Proposal can be infinitely DOSed with no additional conditions

Lines of code Vulnerability details Description OptimisticListingSeaport.sol is easily DOSable due to the following conditions: 1. A new proposal overrides the existing proposal 2. The deposited collateral can be any non-zero amount 3. Only requirement is that pricePerToken is lower than before. ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

contribute() locks too much ETH from the user

Lines of code Vulnerability details Impact In the contribute function of the GroupBuy contract, even if the filledQuantity is less than quantity, all the ETH provided by the user is locked in the contract, and the user can only call claim to get it back after purchasing NFT or Pool expires, which...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข15 views

Reentrancy issue #2: Functions remove() and sell() are vulnerable to reentrancy attack if baseToken implement a call to receiver in _beforeTokenTransfer().

Lines of code Vulnerability details It is important to be aware that I have reported two reentrancy bugs. Each of these have different ways of being activated and can be found in separate functions. Impact All calculations done in Caviar Pair are using token balance directly. For example, when...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

Upgraded Q -> M from #201 [1671458492331]

Judge has assessed an item in Issue 201 as M risk. The relevant finding follows: Deposit function is not compatible with deflationary token The actual deposited amount might be lower than the specified depositAmount of the function parameter. This would lead to wrong interest rate calculations on...

6.9AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข18 views

A malicious early user/attacker can manipulate the lpToken's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details Impact A well known attack vector for almost all shares based liquidity pool contracts, where an early user can manipulate the price per share and profit from late users' deposits because of the precision loss caused by the rather large value of price per share...

6.7AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข20 views

Priority queue min accounting breaks when nodes are split in two

Lines of code Vulnerability details The README states If two users place bids at the same price but with different quantities, the queue will pull from the bid with a higher quantity first, but the data-structure used for implementing this logic, is not used properly and essentially has its data...

6.5AI score
SaveExploits0
Code423n4
Code423n4
โ€ขadded 2022/12/19 12:00 a.m.โ€ข13 views

LP pricing formula is vulnerable to flash loan manipulation

Lines of code Vulnerability details Impact The LP pricing formula used in the buyQuote, sellQuote, addQuote, removeQuote functions of Pair.sol contract is vulnerable to flash loan manipulation. Proof of Concept The baseTokenReserves calculates the current balance of base token reserves. This...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190