Skip to content

Code4rena

Infinity NFT Marketplace contest

Every publicly disclosed report for Infinity NFT Marketplace contest and what kind of bugs they were.

disclosed reports
20
most reported class
Business logic
bug classes found
3
first disclosure
2022
Find Infinity NFT Marketplace contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Infinity NFT Marketplace contest chose to make public.

Business logic

canExecTakeOrder mismatches makerOrder and takerItems when duplicated items present

The order-matching check compared only the total number of items and whether each taker item was allowed, so duplicated taker items could pass. An attacker could pay for a bundle of different ERC1155 tokens but receive multiple copies of the most expensive one.

Infinity NFT Marketplace contest

High
Business logic

_transferNFTs() succeeds even if no transfer is performed

The NFT transfer function succeeds even when the token does not support ERC-721 or ERC-1155 interfaces, so the buyer pays but receives no NFT. An attacker could exploit this with a malicious contract or a non-compliant token to take the buyer's funds.

Infinity NFT Marketplace contest

High
Business logic

Sellers may lose NFTs when orders are matched with matchOrders()

The order-matching function checked the buyer's constraint against the seller's constraint instead of checking the number of items actually being matched against the seller's maximum. An attacker could therefore match a seller's order with more NFTs than the seller had authorised, causing the seller to sell extra NFTs.

Infinity NFT Marketplace contest

High
Business logic

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

Maker buy orders reimburse the transaction gas cost to the executor at whatever gas price the transaction used, so the buyer's total cost is unpredictable. A match executor could execute the order during a busy period at a very high gas price, and the buyer would pay that inflated cost.

Infinity NFT Marketplace contest

Medium
Business logic

Incorrect condition marks valid order as invalid

The order-matching logic in a smart contract contained an incorrect check that caused valid orders to be rejected. An attacker could not exploit this directly, but legitimate users would be unable to execute trades that should have succeeded.

Infinity NFT Marketplace contest

Medium
Business logic

Fund loss or griefing in all order matching functions [ matchOneToOneOrders() , matchOneToManyOrders() , matchOrders() , takeMultipleOneOrders() , takeOrders() ] because condition (seller != buyer ) is not checked in any of them

The order matching functions do not check that the seller and buyer are different addresses, so a user's own buy and sell orders can be matched against each other. An attacker could exploit this to cause fund loss or griefing, for example by having a user's buy order filled with the user's own sell order, leaving the user without the expected NFT.

Infinity NFT Marketplace contest

Medium
Smart contracts

Reentrancy from matchOneToManyOrders

The matchOneToManyOrders function updates the maker order nonce only after transferring tokens, allowing a malicious contract to re-enter and execute the same order again via takeOrders. This lets an attacker cause a user's order to be fulfilled twice, resulting in the user buying more NFTs than intended and losing funds.

Infinity NFT Marketplace contest

High
Business logic

Calling unstake() can cause locked funds

The unstake function incorrectly zeroes out the staked amount for a shorter vesting period even when no tokens from that period are removed, causing those tokens to become locked in the contract. An attacker could stake tokens for a short period, then unstake vested tokens from a longer period, resulting in the shorter-period tokens being permanently locked.

Infinity NFT Marketplace contest

High
Business logic

Loss of funds in matchOneToManyOrders() and takeOrders() and matchOrders() because code don’t check that different ids in one collection are different, so it’s possible to sell one id multiple time instead of selling multiple id one time in one collection of order (lack of checks in doTokenIdsIntersect() especially for ERC1155 tokens)

The order-matching functions did not check that token IDs within a single collection in an order were distinct, so an attacker could list the same ERC1155 token ID multiple times and receive payment for tokens the buyer did not intend to purchase. This allowed the attacker to take a buyer's funds while delivering only a subset of the requested NFTs.

Infinity NFT Marketplace contest

High
Business logic

Accumulated ETH fees of InfinityExchange cannot be retrieved

The contract's rescueETH function sends only the ETH attached to the call (msg.value) rather than the contract's balance, so accumulated ETH fees from trades are permanently stuck. An attacker cannot directly steal these funds, but the project loses revenue permanently.

Infinity NFT Marketplace contest

High
Business logic

Bug in MatchOneToManyOrders may cause tokens theft

The MatchOneToManyOrders function does not check whether a sell order contains any NFT tokens, so an attacker can include an empty sell order that requests payment but transfers nothing. This allows the attacker to profit without giving up any NFT.

Infinity NFT Marketplace contest

Medium
Business logic

Malicious tokens can be used to grief buyers and cause loss of their WETH balance

The exchange contract charges buyers a dynamically calculated fee based on gas consumed during order matching, and a malicious seller token can deliberately waste gas to inflate this fee, draining the buyer's approved WETH. An attacker could cause the buyer to lose all WETH they have approved to the exchange.

Infinity NFT Marketplace contest

Medium
Access control

Malicious governance can use updateWethTranferGas to steal WETH from buyers

The contract's owner can set the WETH transfer gas units to an arbitrarily high value, which inflates the gas cost charged to buyers when their orders are filled. A malicious or compromised governance could use this to take the buyer's approved WETH as gas fees.

Infinity NFT Marketplace contest

Medium
Business logic

Missing Complication check in takeMultipleOneOrders

The takeMultipleOneOrders function did not check the Complication rules that define who may take an order. An attacker could take a private-sale order that was meant only for a specific taker.

Infinity NFT Marketplace contest

High
Business logic

Overpayment of native ETH is not refunded to buyer

The InfinityExchange contract accepts native ETH payments but does not refund any amount sent above the final calculated price. An attacker (or ordinary user) could accidentally overpay, and the excess ETH becomes permanently locked in the contract because a separate bug prevents the owner from withdrawing it.

Infinity NFT Marketplace contest

High
Business logic

Protocol fee rate can be arbitrarily modified by the owner and the new rate will apply to all existing orders

The protocol fee rate can be changed by the owner at any time and applies immediately to all existing maker orders, so a seller who placed an order expecting a given payout can receive less if the fee is raised before the order is filled. An owner could raise the fee sharply and take a much larger cut from sellers who had already committed to a price.

Infinity NFT Marketplace contest

Medium