Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Valid

Locked tokens due to missing NFT burn functionality

Summary

The RAACNFT contract prevents burning NFTs by disallowing transfers to address(0), while also lacking functionality to withdraw deposited tokens, resulting in permanent token lockup after minting.

Vulnerability Details

The RAACNFT::_update() function prevents transfers to address(0), which is the standard mechanism for burning NFTs in ERC721:

function _update(address to, uint256 tokenId, address auth)
internal
override(ERC721, ERC721Enumerable)
returns (address)
{
@> if (to == address(0)) revert RAACNFT__InvalidAddress();
return super._update(to, tokenId, auth);
}

This means that users cannot burn their NFTs since the zero-address check prevents it, so once the NFT is minted, it cannot be destroyed.

However, the user paid with crvUSD tokens when minting the NFT, but he cannot get them back. Moreover, due to the absence of function for withdrawing the deposited tokens, even the contract owner cannot withdraw them, resulting in permanent token lockup.

Proof of Concept:

  1. User mints an NFT by calling RAACNFT::mint with required tokens

  2. The tokens are transferred to the contract and stored there

  3. User attempts to burn the NFT but cannot due to address(0) check

  4. The paid tokens remain locked in the contract permanently

  5. Even the contract owner cannot withdraw the tokens due to missing functionality

Impact

  • Users cannot burn NFTs they no longer want

  • Tokens paid for minting are permanently locked in the contract

Recommendation

Consider adding a burn functionality, or a function for withdrawing the deposited tokens.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACNFT collects payment for NFT minting but lacks withdrawal functionality, permanently locking all tokens in the contract

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACNFT collects payment for NFT minting but lacks withdrawal functionality, permanently locking all tokens in the contract

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.