Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Accidental ETH transfers to InfinityStaker cannot be withdrawn

Lines of code Vulnerability details The rescueETH function is meant to allow the contract owner to withdraw ETH accidentally sent to the contract. However, it will forward the exact ETH amount sent by the caller to the given destination address, rather than withdraw ETH from the contract balance:...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•7 views

Malicious relayer could exploit sponsor vaults

Lines of code Vulnerability details Impact Sponsor vaults drained Proof of Concept reimburseRelayerFees uses SponsorVault funds to repay users the fees they pay to relayers. A malicious relayer could create a large number of transactions with the max reimbursed relay fee specified in SponsorVault...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Executor and miner collusion and gas price

Lines of code Vulnerability details Impact The MATCHEXECUTOR can choose tx.gasprice and take the gas cost from a buyer. An executor can make a overly costly tx mined by a friendly miner and take extra profits. Proof of Concept and similar functions... Recommended Mitigation Steps There's no...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•12 views

InfinityExchange owner can grief with high fees

Lines of code Vulnerability details Impact The owner of the InfinityExchange contract can set any high fee values for PROTOCOLFEEBPS via the InfinityExchange.setProtocolFee function. The fee value should be limited to a maximum of 10000. If set to higher values and due to the usage across functio...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

_transferNFTs() functions doesn't reverts if the transfer item doesn't supports interface for both ERC721 and ERC1155

Lines of code Vulnerability details Impact The transferNFTs function use ERC165 to check if the itemnft supports ERC721 interface or ERC1155 interface and execute transfer accordingly. But if it doesn't supports either, it just exits the functionno revert. Proof of Concept in...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

In execute() the amount routers pay is what user signed, but in _reconcile() the amount routers get is what nomad sends and this two amount are not necessary equal because of slippage in original domain

Lines of code Vulnerability details Impact routers pay for transaction in destination domain then nomad messages come and routers get paid again. but the amount routers pay in execute are what transaction sender signed and the amount routers receive is what nomad sends and handles in reconcile bu...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•7 views

User may lose funds if msg.value > totalPrice

Lines of code InfinityExchange.solL300-L328 InfinityExchange.solL336-L364 Vulnerability details Impact When using InfinityExchange.sol:takeMultipleOneOrders or InfinityExchange.sol:takeOrders, if currency == address0 and a user has a msg.value totalPrice the overspent ETH is left in the contract...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•10 views

Ether can get lock on functions takeMultipleOneOrders and takeOrders

Lines of code Vulnerability details Impact Ether send by the user cang gets locks when taking order/s Proof of Concept If Bob use function takeMultipleOneOrders or takeOrders to buy and sends more ETH that it supposes to remaing ETH will be lost, also if the seller is selling for other token and...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•6 views

Wrong gasCost calculation per order

Lines of code Vulnerability details Impact During a match, there's some accounting on how much gas we're spending, so that the executor can be reimbursed. The gas cost is split between multiple orders, computing the difference between the gas at the start and at the end. The gas at the start is...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Relayer Will Not Receive Any Fee If execute Reverts

Lines of code Vulnerability details Proof-of-Concept Connext relies on the relayer to trigger the BridgeFacet.execute function on the destination domain to initiate the token transfer and calldata execution processes. Relayers pay for the gas cost to trigger the execute function, and in return fo...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

diamondCut doesn't validate _init and _calldata

Lines of code Vulnerability details Malicious or compromised governance can send a different init and calldata payload than the one that was proposed. This is dangerous as they will be used for a delegatecall operation. An attacker can pretend to propose a safe upgrade and later execute a...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•11 views

Tokens with decimals larger than 18 are not supported

Lines of code Vulnerability details For tokens with decimals larger than 18, many functions across the codebase will revert due to underflow. function getPriceFromDexaddress tokenAddress public view returns uint256 PriceInfo storage priceInfo = priceRecordstokenAddress; if priceInfo.active uint25...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Admin can set arbitrarily high WETH_TRANSFER_GAS_UNITS which is a fee

Lines of code Vulnerability details Impact Users can lose their fund by attack from the admins Poc In the function updateWethTranferGasInfinityExchange.sol there is no limit for setting WETHTRANSFERGASUNITS . As this is a kind of fee paid by from the buyers to the contract By definition of the...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

Multiple items order can be matched to many same items order

Lines of code Vulnerability details Impact Let's consider an example. Alice makes an order for an ERC1155, where she wants to buy 10 items with id=1 and 10 with id=2. This order can be matched using matchOneToManyOrders with two orders that sell both 10 items with id=1. Basically Alice gets 20 id...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

LibDiamond.diamondCut() should check diamondStorage().acceptanceTimes[keccak256(abi.encode(_diamondCut))] != 0

Lines of code Vulnerability details Impact Normally, diamondStorage.acceptanceTimeskeccak256abi.encodediamondCut will be set in LibDiamond.proposeDiamondCut. Then in LibDiamond.diamondCut, it checks that diamondStorage.acceptanceTimeskeccak256abi.encodediamondCut function proposeDiamondCut...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•10 views

The amount of gas calculation for refunding is incorrect

Lines of code Vulnerability details Impact While matching the orders the gas cost is calculated so that it can be refunded back to the contract. The calculation for this gas is incorrect. The function keeps track of the gasleft at the beginning of the loop and adds additional amount of gas for pr...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•7 views

_transferNFTs doesn't revert for bad tokens

Lines of code Vulnerability details Impact transferNFTs checks if an item is ERC721 or ERC1155 by using IERC165item.collection.supportsInterface.... function transferNFTs address from, address to, OrderTypes.OrderItem calldata item internal if IERC165item.collection.supportsInterface0x80ac58cd...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•11 views

Centralization Risk with onlyOwner modifier

Lines of code Vulnerability details Impact During the code review, It has been observed the all currency tokens can be withdraw by owner without timelock. The currency token should not be withdrawn by owner. This poses centralization risk. Proof of Concept 1. Navigate to the following contract...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

The owner can set arbitrarly high fees

Lines of code Vulnerability details Impact The owner of InfinityExchange contract can set arbitrarly big fees, and coul stole funds from seller. Proof of Concept When an order is executed the payment and the transfer from buyer to seller and viceversa are done by transferNFTsAndFees function wich...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•17 views

Rescue ETH at InfinityStaker.sol is incorrectly implemented

Lines of code Vulnerability details Impact Admins are unable to recover any ETH locked in the contract PoC The function rescueETHInfinityStaker.sol is incorrectly implemented. It is using msg.value instead of the balance of the contract /// @dev Admin function to rescue any ETH accidentally sent ...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•6 views

Diamond upgrade proposition can be falsified

Lines of code Vulnerability details Impact Diamond is to be upgraded after a certain delay to give time to the community to verify changes made by the developers. If the proposition can be falsified, the contract admins can exploit the contract in any way of their choice. Proof of Concept To...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•12 views

division rounding error in _handleExecuteLiquidity() and _reconcile() make routerBalances and contract fund balance to get out of sync and cause fund lose

Lines of code Vulnerability details Impact variable routerBalances suppose to keep track of routers balance in contract and routers can withdraw their balance from contract. but because of division rounding error in handleExecuteLiquidity and reconcile contract uses more of its tokens than it...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•13 views

rescueEth does not transfer ether in contract

Lines of code Vulnerability details Impact The InfinityStakerrescueETH and InfinityExchangerescueETH payable functions sends msg.value to the destination and not the ether in the contract, so the fees and accidentally transferred ether is not sent to the destination address Proof of Concept...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•22 views

rescueETH function doesn't works as expected

Lines of code Vulnerability details Impact The rescueETH function is implemented to collect any unexpected ETH transferred to the infinityExchange.sol contract, But this function will not work as expected. The function is supposed to return the eth from the contract to the specified destination...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•10 views

NO TIMELOCK ON setProtocolFee() CAN LEAD TO SELLERS LOSING THEIR NFTs

Lines of code Vulnerability details NO TIMELOCK ON setProtocolFee CAN LEAD TO SELLERS LOSING THEIR NFTs In InfinityExchange.sol, there is no timelock on setProtocolFee. This is the fee that is applied in orders, and determines how much the Exchange receives in fee VS how much the seller receives...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Overpaying ETH in InfinityExchange

Lines of code Vulnerability details Impact A user of the InfinityExchange contract can accidentally send more ETH than needed without the possibility to get the overpaid amount refunded. Proof of Concept if isMakerSeller && currency == address0 requiremsg.value = totalPrice, 'invalid total price'...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•13 views

Maker buy order with no specified NFT tokenIds may get fulfilled in matchOneToManyOrders without receiving any NFT

Lines of code Vulnerability details The call stack: matchOneToManyOrders - matchOneMakerSellToManyMakerBuys - execMatchOneMakerSellToManyMakerBuys - execMatchOneToManyOrders - transferMultipleNFTs Based on the context, a maker buy order can set OrderItem.tokens as an empty array to indicate that...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

getCurrentPrice will be return a higher value than expected due to insufficient check in isTimeValid

Lines of code Vulnerability details The Boolean value will always return true if start price is zero. The condition will be sufficiently fulfilled since a time will be set in the future but no time is set in the past or at current time: sumCurrentPrices uses the returned value of getCurrentPrice...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

matchOneToManyOrders doesn't consider numItems of the orders

Lines of code Vulnerability details Impact An order can specify a numItems in MakerOrder.constraints0. This number is the min/max number of items the order wants to buy/sell. For example a buy order can provide a list of nfts and say that wants to buy only 3 of them from that list. The function...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•12 views

Admin can set arbitrarily high exchange fees

Lines of code Vulnerability details Impact Admins can attack users by frontrunning them Poc In the function setProtocolFeeInfinityExchange.sol function setProtocolFeeuint16 protocolFeeBps external onlyOwner PROTOCOLFEEBPS = protocolFeeBps;@audit medium emit NewProtocolFeeprotocolFeeBps; Admins ca...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•11 views

Timelock able to be bypassed because of wrong check in LibDiamond

Lines of code Vulnerability details Impact In the walkthrough video, it said that the upgrades of Diamond must go through a proposal window with a delay of 7 days. Upgrade should be done by first call proposeDiamondCut and then wait 7 days and call diamondCut. But this timelock can be bypassed...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Funds(ETH) permanent lock on InfinityStaker.sol

Lines of code Vulnerability details Impact The rescueETH function does not work as expected and if the contract receives ETH, it gets stuck in the contract Proof of Concept If an addresswallet or contract send ETH to the InfinityStaker.sol contract, the owneradmin can't rescue the ETH because the...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

Swaps done internally will be not be possible

Lines of code Vulnerability details Affected functionsthat rely on swapAsset are: swapAsset facilitates two swaps, either using the internal or external pool. But if an internal pool exists, a swap will be unsuccessful because the call to s.swapStoragescanonicalId.swapInternal takes two incorrect...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Protocol can steal WETH founds

Lines of code Vulnerability details Impact The protocol can steal WETH founds with the refunds gas cost mechanism in the functions matchOneToOneOrders, matchOneToManyOrders and matchOrders This functions can call only by the MATCHEXECUTOR but we don't know what is this contract/address according...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

attacker can perform griefing for process() in PromiseRouter by reverting calls to callback() in callbackAddress

Lines of code Vulnerability details Impact process in PromiseRouter is used for process stored callback function and anyone calls it gets callbackFee and it calls callback function of callbackAddress. but attacker set a callbackAddress that reverts on callback and cause process caller griefing...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Diamond can be updated without proposing the change

Lines of code Vulnerability details Impact The diamond shall be monitored externally to remove the need of trust to developers. If a timelock can be bypassed, it poses a threat as people who weren't trusted can exploit the system. Additionally, the contract can immediately perform any delegatecal...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•10 views

Consistently check account balance before and after transfers for Fee-On-Transfer discrepancies

Lines of code Vulnerability details As arbitrary ERC20 tokens can be passed, the amount here should be calculated every time to take into consideration a possible fee-on-transfer or deflation. Also, it's a good practice for the future of the solution. Affected code:...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•13 views

Routers Are Not Enforced To Repay AAVE Portal Loan

Lines of code Vulnerability details Background AAVE Portal AAVE portal provides a trusted credit line that allows bridges to take on an unbacked position, and Connext intents to use this credit line to provide fast-liquidity for its users in the event the routers do not have sufficient liquidity...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

nonReentrant modifier is not added to all functions that generate state changes, there is a possibility of re-entry.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. I noticed that the nonReentrant modifier only adds some of the functions that generate state changes to the InfinityExchange.sol contract, which provides the feasibility of reentrancy between multiple...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Upgraded Q -> M from 225 [1655654402923]

Judge has assessed an item in Issue 225 as Medium risk. The relevant finding follows: C4-011 : Centralization Risk On The teamSummon Function - LOW Impact - LOW With the teamSummon function, owner can mint unlimited warriors. This poses a security risk. The max/min limit should be implemented at...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•12 views

InfinityExchange owner can steal user's tokens via front-running

Lines of code Vulnerability details Impact Contract InfinityExchange.sol charges protocol fee through PROTOCOLFEEBPS. The issue is that owner of the contract is able to change protocol fee at any time without any restriction which puts him in a very privileged position and allows him to steal...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•7 views

function removeRouter() in RouterFacet don't check that router has balance and don't transfer it, it just set router owner and recipient to 0x0 which can cause make router balance in danger or unavailable for router owner

Lines of code Vulnerability details Impact There are some security levels for router, like setting owner and recipient and when removeRouter is called this values set to 0x0 and router address become vulnerable. contract should transfer router balance to recipient before removing it. Proof of...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Wrong implementation of withdrawAdminFees() can cause the adminFees to be charged multiple times and therefore cause users' fund loss

Lines of code Vulnerability details function withdrawAdminFeesSwap storage self, address to internal IERC20 memory pooledTokens = self.pooledTokens; for uint256 i = 0; i pooledTokens.length; i++ IERC20 token = pooledTokensi; uint256 balance = self.adminFeesi; if balance != 0 token.safeTransferto,...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•13 views

Incorrect accounting results in loss of user stake

Lines of code InfinityStaker.solL116-L131 InfinityStaker.solL290-L325 Vulnerability details Impact In InfinityStaker.sol, when calling the unstake function updateUserStakedAmounts is called to readjust the user staked amounts. If a user stakes an amount in a duration and has an already vested amo...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

Maker order buyer is forced to reimburse the gas cost at any tx.gasprice

Lines of code Vulnerability details uint256 gasCost = startGasPerOrder - gasleft + wethTransferGasUnits tx.gasprice; // if the execution currency is weth, we can send the protocol fee and gas cost in one transfer to save gas // else we need to send the protocol fee separately in the execution...

7.2AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•8 views

Router Owner Could Be Rugged By Admin

Lines of code Vulnerability details Proof-of-Concept Assume that Alice's router has large amount of liquidity inside. Assume that the Connext Admin decided to remove a router owned by Alice. The Connext Admin will call the RoutersFacet.removeRouter function, and all information related to Alice's...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•5 views

Issues beyond expected behavior.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. function unstakeuint256 amount external override nonReentrant whenNotPaused requireamount != 0, 'stake amount cant be 0'; uint256 noVesting = userstakedAmountsmsg.senderDuration.NONE.amount; uint256...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•4 views

AssetLogic's _swapAssetOut can fail on the one step approval

Lines of code Vulnerability details swapAssetOut performs one step approval for an arbitrary assetIn before calling pool's swapExactOut. As ERC20 that do not allow approval race condition prohibit setting approval to a new positive value when allowance is positive already, this call will fail if...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•6 views

ETH mistakenly sent over with ERC20 based takeOrders and takeMultipleOneOrders calls will be lost

Lines of code Vulnerability details takeOrders and takeMultipleOneOrders are the main user facing functionality of the protocol. Both require currency to be fixed for the call and can have it either as a ERC20 token or ETH. This way, the probability of a user sending over a ETH with the call whos...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•9 views

in reimburseLiquidityFees() of SponserVault contract swaps tokens without slippage limit so its possible to perform sandwich attack and it create MEV

Lines of code Vulnerability details Impact when code swaps tokens it should specify slippage but in reimburseLiquidityFees code contract calls tokenExchange.swapExactIn without slippage and it's possible to perform sandwich attack and make contract to swap on bad exchange rates and there is MEV...

6.9AI score
Exploits0
Total number of security vulnerabilities10190