Skip to content
Business logic Audit finding Intermediate

Tokens can get stuck in NFTXMintRequestEligibility

The NFTX mint request contract ignores the amounts array for ERC721 tokens, allowing a user to request a mint with an amount of zero. The ERC721 transfer still occurs, but the token becomes stuck because the reclaim function requires a positive amount.

NFTX contest

Originally disclosed on Code4rena

When dealing with ERC721 (instead of 1155) the amounts array is ignored, which leads to an issue.

User can call NFTXMintRequestEligibility.requestMint for an ERC721 with amounts[i] = 0. The ERC721.transferFrom is still executed but user cannot reclaimRequestedMint later and the NFT is stuck as it checks (amounts[i] > 0).

Tokens can get stuck. Also, subscribers to Request event could be tricked by specifying amounts[i] > 1 in the ERC721 case, as only one token was transferred, but the amount multiple quantities get logged.

Recommend that requestMint: Check amounts[i] == 1 in ERC721 case, amounts[i] > 0 in 1155 case.

- 0xKiwi (NFTX) confirmed

The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the contract fails to validate that the amount is exactly one for ERC721 transfers, and the reclaim function only allows amounts greater than zero, creating a mismatch.

Impact

Tokens can get stuck, and event subscribers could be misled by incorrect amount logs.

What the attacker needed

Access to requestMint function; ERC721 token

The fix

The `requestMint` function should check that `amounts[i] == 1` for ERC721 and `amounts[i] > 0` for ERC1155.

How it was found

  1. Call `NFTXMintRequestEligibility.requestMint` for an ERC721 with `amounts[i] = 0`.
  2. The ERC721 transfer is executed, moving the token to the contract.
  3. Attempt to call `reclaimRequestedMint` later, which fails because it checks `amounts[i] > 0`.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a smart contract bug where a function that handles NFT minting does not properly check the quantity you specify for ERC721 tokens. If you say you want zero tokens, it still moves your NFT into the contract, but later you cannot get it back because the contract only allows reclaiming if the amount was greater than zero. So your NFT gets stuck.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from NFTX contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.