Core Contracts

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

RAACNFT tokens used to mint NFTs will be stuck forever

Vulnerability Details

When you buy a RAACNFT you call RAACNFT::mint() and the following logic executes:

function mint(uint256 _tokenId, uint256 _amount) public override {
// more code...
// transfer erc20 from user to contract - requires pre-approval from user
@> token.safeTransferFrom(msg.sender, address(this), _amount);
// more code...
}

The porblem is that the RAACNFT does not have any way of transfering out or using the tokens transferred to it. As there is no transfer funciton neither approval function called trhougout the contract, the tokens are stuck in the contract forever. Just enter VSCode and check for all instances of transfer or approvals, as you can see the only transfers are the ones in mint and nothing else.

The inherited OZ contracts do not posses ERC20 token transfers either:

contract RAACNFT is ERC721, ERC721Enumerable, Ownable, IRAACNFT

Contract here.

Impact

Tokens used to buy RAACNFT are stuck in the contract forever.

Recommendations

Add a way to transfer them out, either by using transfer or using approvals so someone can move the funds on the RAACNFT contract.

Updates

Lead Judging Commences

inallhonesty Lead Judge 5 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 5 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.