Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/12/12 12:0 a.m.15 views

Return values of transfer()/transferFrom() not checked

Lines of code 377, 509, 491, 530, 42, 50 Vulnerability details Not all IERC20 implementations revert when there's a failure in transfer/transferFrom. The function signature has a boolean return value and they indicate errors that way instead. By not checking the return value, operations that shou...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/12 12:0 a.m.19 views

Unsafe usage of msg.value in a loop

Lines of code 140 Vulnerability details The value of msg.value in a transaction's call never gets updated, even if the called contract ends up sending some or all of the Eth to another contract. This means that using msg.value in a for- or while-loop, without extra accounting logic, will either...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/12 12:0 a.m.152 views

Proxy's logic contract relies on code in the constructor

Lines of code 122, 50, 25, 67, 98, 67, 22 Vulnerability details Logic contracts cannot rely on code in their constructors, because proxy contracts do not re-execute the logic contract's constructor - only its initializer. Move all code in the constructor to the initializer function. File:...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/10 12:0 a.m.8 views

test

Lines of code L14 Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Recommended Mitigation Steps lemme...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/10 12:0 a.m.10 views

plsss

Lines of code L12 Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Recommended Mitigation Steps...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/08 12:0 a.m.17 views

The protocol is susceptible to reentrancy attacks.

Lines of code Vulnerability details Reentrancy is a well know bug in smart contract and the protocol is not handling it, The safeMint function in ERC721 make a callback to the receiver checking if they can hold a nft, this can be used to a receiver to take control of the execution of the call. in...

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

CurveTricryptAdapter::primitiveOutputAmount & Curve2PoolAdapter::primitiveOutputAmount can swap without slippage tolerance

Lines of code Vulnerability details Impact While there is a “Slippage protection” implementation in the contract if uint256minimumOutputAmount outputAmount revert SLIPPAGELIMITEXCEEDED; There is no validation that minimumOutputAmount is not set to 0. This can result in lost of funds. Although Oce...

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

No slippage check while removing liquidity from Curve Pool

Lines of code Vulnerability details Impact The hardcoded value of 0 for the minamount parameter in the removeliquidityonecoin function of the Curve pool can have significant effects on user funds. When users are removing liquidity from the curve pool, the minamount parameter represents the minimu...

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

Unwrap Fee Rounding Down: Revenue Loss, User Unfairness, and Reduced Confidence

Lines of code Vulnerability details Impact The issue with the unwrap fee rounding down can have several detrimental impacts on the Ocean protocol: 1. Revenue Loss: Due to rounding down, the contract loses out on potential unwrap fees, particularly for smaller unwrap amounts. This can significantl...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/08 12:0 a.m.22 views

Multiple re-entrancy issues allowing stealing of funds and bypassing protocol mint limits

Lines of code Vulnerability details Impact Multiple re-entrancy issues exist in the codebase, that break core functionality and allow stealing of user funds. In AuctionDemo.sol contract re-entrancy in cancelBid and cancelAllBids allows stealing of user funds. There are multiple attack surfaces,...

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

Potential Issues with Address Casting and Validation in _calculateOceanId Function

Lines of code Vulnerability details Impact The use of abi.encodePacked without padding might introduce ambiguity in situations where input lengths are not fixed. Additionally, assuming tokenId can be any uint256 value without enforcing constraints could lead to unexpected behavior if constraints...

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

REDUNDANT ERC1155 OCEAN TOKEN BALANCE UPDATE OF THE OceanAdapter CONTRACT COULD LEAD TO DoS OF THE Ocean._computeOutputAmount TRANSACTION

Lines of code Vulnerability details Impact The Ocean.computeOutputAmount function is used to compute the output amount of an output token when the input token and input token amount is given. The Ocean.computeOutputAmount function mutates the ERC1155 token ledger amounts for the primitives and al...

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

_determineTransferAmount does't support low decimal tokens.

Lines of code Vulnerability details Impact determineTransferAmount does't support low decimal tokens. Transfer amount will be force set to incorrect amount. Proof of Concept In process of erc20Wrap,in order to support different decimal tokens, the contract use determineTransferAmount to get...

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

imbalanced or invalid liquidity additions/removals could happen

Lines of code Vulnerability details Impact Potential for loss of funds or manipulation of the pool prices. Specifically: • By allowing deposit from only one of the xToken or yToken, it enables manipulating the price ratio between the tokens in the pool. This could benefit one token over the other...

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

Users can add 6 decimal token funds for free

Lines of code Vulnerability details There is a logic error in convertDecimals function which means wrapping interactions for tokens with less than 18 decimals are processed incorrectly. The below is triggered in convertDecimals where the input parameter decimals is less than 18. If amountToConver...

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

Unrestricted Unwrap Fee Changes: Instability, Market Disruption, and Loss of Trust

Lines of code Vulnerability details Impact The current changeUnwrapFee function in the Ocean smart contract allows the owner to change the unwrap fee divisor with no restrictions, leading to several negative impacts: 1. Unstable Unwrap Fees: Frequent changes in the divisor can cause instability a...

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

Usage of _safeMint in NextGenCore@_mintProcessing allows an attacker to reenter when onERC721Received is called

Lines of code Vulnerability details Impact An attacker can : Exceed the per address allowance in Fixed Price Sale, Exponential Descending Sale and Linear Descending Sale modes. Cause a loss for another user in Burn-to-Mint mode by accepting an offer when onERC721Received is triggered. Proof of...

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

Ocean.doMultipleInteractions() cannot wrap ether

Lines of code Vulnerability details Bug Description doMultipleInteractions in Ocean.sol attempts to wrap ether but reverts due to a logical error. The internal helper function, doMultipleInteractions, includes the following: if msg.value != 0 balanceDeltas.increaseBalanceDeltaWRAPPEDETHERID,...

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

Unwrapping function emits event with incorrect values.

Lines of code Vulnerability details Impact The etherUnwrap function in the smart contract does not correctly emit the EtherUnwrap event. The issue arises when calculating and emitting the fee and transfer amounts. The current implementation deducts the fee, transfers the calculated amount, and...

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

Invalid WETH inclusion for Curve's Tricrypto pools.

Lines of code Vulnerability details Impact For some of Curve's Tricrypto pools, CurveTricryptoAdapter will not be working. Proof of Concept address wethAddress = ICurveTricryptoprimitive.coins2; zToken = calculateOceanIdaddress0x4574686572, 0; // hexadecimalascii"Ether" indexOfzToken = 2;...

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

Missing onlyOwner Modifier Will Give Access To Any Malicious User To Change UnwrapFee Immediately

Lines of code Vulnerability details Impact Any address can call the function changeUnwrapFee and modify or influence the unwrap fee, compromising the intended governance structure and allowing malicious users or entities to favourably adjust fees to their advantage for token unwrapping. Proof of...

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

Lack of Validation and Potential Overflow in _fetchInteractionId Function

Lines of code Vulnerability details Impact The lack of validation on interactionType could allow invalid values, potentially leading to unexpected interaction IDs. Additionally, if interactionType exceeds 8 bits, it could cause an overflow issue, potentially altering the token address within the...

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

Funds are lost when Curve pool is killed (paused)

Lines of code Vulnerability details Vulnerability Details If self.iskilled in the curve pool contract becomes true, users will be unable to close their position because removeliquidityonecoinwill revert. Users will be unable to exit their position. if outputToken == zToken uint256 wethBalance =...

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

Potential Gas Inefficiency due to Unnecessary abi.encode Usage

Lines of code Vulnerability details Impact The function unnecessarily uses abi.encode to convert a uint256 to bytes32, incurring additional gas costs. This doesn't affect correctness but may lead to suboptimal gas usage. Proof of Concept By modifying the fetchInteractionId function to directly ca...

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

Fee on transfer tokens are not accounted for in any way

Lines of code Vulnerability details Impact Fee on transfer or other unique tokens are not properly accounted for. This could lead to wrong accounting within The Ocean and eventual losses for the protocol. Proof of Concept The Ocean doesn't keep track of its balances when a user is wrapping a toke...

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

NextGenMinterContract::mint can be reentered for sales option 3 to mint many NFTs in a single period and bypass viewMaxAllowance for any sales option

Lines of code Vulnerability details Impact The reentrancy vulnerability in the NextGenMinterContract::mint function allows an attacker to bypass the restriction of minting only one NFT per period. The reentrencies can be achieved from the safeMint in the function NextGenCore::mintProcessing to ca...

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

Upgraded Q -> 3 from #534 [1702060375162]

Judge has assessed an item in Issue 534 as 3 risk. The relevant finding follows: L-03 Consider use stETH/UDS oracle Issue Description: The sponsor has confirmed their choice of Chainlink as an oracle to fetch prices. Since all other LST price feeds are 18 decimal places, they will most likely use...

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

Wrapping ether with Ocean.doMultipleInteractions() reverts

Lines of code Vulnerability details Summary Wrapping ether with doMultipleInteractions reverts. This is the case if one or more of the interactions is handling ether. If we look at the internal helper function, doMultipleInteractions, it includes the following: if msg.value != 0...

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

Replay Attack because EIP712 DOMAIN_SEPARATOR stored as immutable

Lines of code Vulnerability details Impact Loss of fund due to replay attacks. Approvals made on one chain could be replayed when there is a fork without owner's consent. Proof of Concept The issue is in the ERC1155PermitSignatureExtension.sol which is inherited by the OceanERC1155.sol and...

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

Slippage Handling

Lines of code Vulnerability details Impact The primitiveOutputAmount function reverts the transaction if the output amount is less than the minimumOutputAmount, which is a strict slippage protection. This could lead to failed transactions due to normal price fluctuations in the Curve pool. Proof ...

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

convertedAmount set to zero because of bad math arithmetic

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The pool will be able to give an outputAmount corresponding to the rawInputAmount = 0 Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/08 12:0 a.m.19 views

Front-Running

Lines of code Vulnerability details Impact Visible computed input amounts could be susceptible to front-running by malicious actors. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used...

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

An attacker can mint more than they are allowed due to MinterContract.sol#mint() reentrancy vulnerability

Lines of code Vulnerability details Bug Description mintProcessing in NextGenCore.sol calls OpenZeppelin’s safeMint from their ERC721 contract to mint a token. safeMint checks if the target address is a contract by calling checkOnERC721Received to ensure it supports receiving NFTs. If the target...

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

doInteraction() won't mint tokens to user if interaction.specifiedAmount less than 10**12 and has certain conditions

Lines of code Vulnerability details Impact If the user calls doInteraction and executes Interaction with specifiedAmount less than 10 12 and a big difference in token decimals, the user won't get any tokens. Proof of Concept Core external functions like doInteraction will call the internal...

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

ERC721 and ERC1155 Reentrancy Guard is Incomplete and Wrongly Implemented

Lines of code Vulnerability details Impact Whether there is a ERC721 and ERC1155 Interaction clash or not, or if there is an inadequate transfer callback, all this would not matter as reversion would not occur due to absence of proper validation during wrap of ERC721 and ERC1155 in the Ocean.sol...

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

Upgraded Q -> 2 from #677 [1702060237936]

Judge has assessed an item in Issue 677 as 2 risk. The relevant finding follows: L-04 Deposited amounts in the EigenLayer strategy should be checked before updating the strategy for the asset Users deposit in this protocol and the protocol deposits these funds to EigenLayer strategy contracts...

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

Withdraws will be bricked if the curve pool gets killed

Lines of code Vulnerability details Impact Liquidity will be locked forever since there is no interface to remove it. Proof of Concept Curve pools have a killed parameter that allows an admin to kill the pool, suspend all deposits, swaps, and single token withdrawals, and then only allow for taki...

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

Reentrancy in mint function leads to various problems

Lines of code Mint function in minter contract: Mint function in core contract: Vulnerability details Bug Description When minting NFTs, users will using the mint function. This function will mint a NFT using the safeMint function. The problem is that this mint will be done before crucial variabl...

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

Users can unwrap assets in batches and avoid paying fees to protocol

Lines of code Vulnerability details Impact Users can unwrap their assets from The Ocean and evade paying fees to the protocol when the requested amount is smaller than the fee divisor. This happens due to a truncation of the result in the fee calculation. Proof of Concept This affects the...

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

_doMultipleInteractions - User can use more wrapped tokens than they own

Lines of code Vulnerability details Impact User can use more wrapped tokens than they own. Proof of Concept When wrapped tokens are used by an Adaptor or Primitive through computeOutputAmount, it does not check if the user has enough tokens. Therefore, when calling computeOutputAmount, you need t...

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

Issue with Decimal Conversion in Shell Protocol

Lines of code Vulnerability details Impact The identified issue within the convertDecimals function in the Shell Protocol could lead to a loss of value due to decimal truncation during token conversions. This situation is particularly critical in the context of Shell Protocol's operations, which...

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

OverInflation or OverDeflation of Value of ERC20 tokens with unequal Wrap and Unwrap Token Decimal

Lines of code Vulnerability details Impact Due to wrong parameter arrangement of convertDecimals... function call during the course of wrap and unwrap of erc20 token function call, OverInflation or OverDeflation of Value of ERC20 tokens with unequal Wrap and Unwrap Token Decimal which would cause...

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

Core function of Ocean contract like doInteraction | doMultipleInteractions | forwardedDoInteraction may revert under certain conditions

Lines of code Vulnerability details Impact Core functions like doInteraction, forwardedDoInteraction, doMultipleInteractions, forwardedDoMultipleInteractions etc, will always revert under certain conditions due to overflow in calculations. Proof of Concept Core external functions like doInteracti...

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

[H-02] The Ocean contract and the onERC721Received function is vulnerable to read-only re-entrancy

Lines of code Vulnerability details Impact The contract.function called Ocean.onERC721Received is vulnerable to read-only re-entrancy. The read-only re-entrancy is possible if the contract function is called externally from another contract. What follows are the functions that are traversed throu...

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

Event Emission

Lines of code Vulnerability details Impact Events such as Swap, Deposit, and Withdraw are emitted with the primitive address as the user parameter, which might not be the actual user msg.sender initiating the transaction. Proof of Concept Provide direct links to all referenced code in GitHub. Add...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/08 12:0 a.m.22 views

[H-01] Ocean contract and onERC1155Received function is vulnerable to read only reentrancy

Lines of code Vulnerability details Impact The Ocean contract and onERC1155Received function is vulnerable to read only reentrancy when read from another contract. The order of function execution when called externally from the onERC1155Received function in the Ocean contract is as follows. The...

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

Ocean cannot _mintBatch() as onERC1155BatchRecieved() not implemeneted on the Ocean contract when batch transferring to itself

Lines of code Vulnerability details The comment @ Ocean L348 states: The Ocean never initiates ERC1155 Batch Transfers. This is untrue, note the following callstack: Ocean.doMultipleInteractions | Ocean.forwardedDoMultipleInteractions Ocean.doMultipleInteractions calls mintBatch @ L560...

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

Compute Type Determination

Lines of code Vulnerability details Impact The determineComputeType function reverts if the input and output tokens do not match expected pairs. This could lead to failed transactions if new token pairs are introduced without updating the function. Proof of Concept Provide direct links to all...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/08 12:0 a.m.16 views

Reentrancy in mint function allows minting above the limit allowed per address / allowlisted address

Lines of code Vulnerability details Impact The mint function in NextGenCore.sol doesn't follow the checks-effects-interactions pattern and can be reentered through the onERC721Received function, if the receiver is a contract. The state variables written after the call are...

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

Incorrect Decimals Conversion in Curve2PoolAdapter::primitiveOutputAmount Function

Lines of code Vulnerability details Impact The bug in the primitiveOutputAmount function can lead to incorrect decimal conversions when calculating the rawInputAmount. The rawInputAmount is calculated using the convertDecimals function, but the decimals parameter passed to convertDecimals is...

7.2AI score
SaveExploits0
Total number of security vulnerabilities10190