Core Contracts

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

RAACNFT receives crvUSD for minted NFTs but tokens will be locked in the contract

Summary

When users mint NFTs, the crvUSD amount is sent to the RAACNFT contract but the contract does not implement any function to withdraw or use the tokens which causes them to be stucked in the contract

Vulnerability Details

When users mint NFTs in RAACNFT, crvUSD tokens are sent to the contract

function mint(uint256 _tokenId, uint256 _amount) public override {
uint256 price = raac_hp.tokenToHousePrice(_tokenId);
if(price == 0) { revert RAACNFT__HousePrice(); }
if(price > _amount) { revert RAACNFT__InsufficientFundsMint(); }
// transfer erc20 from user to contract - requires pre-approval from user
// @audit tokens transferred to RAACNFT but no withdraw
token.safeTransferFrom(msg.sender, address(this), _amount);

The other functions are getHousePrice, addNewBatch, setBaseUri, supportsInterface, increaseBalance, update and baseURI but none of them make any use of those crvUSD tokens and the contract is not upgradeable.

Impact

All crvUSD tokens accumulated with each mint will be locked for ever in the RAACNFT contract with no possibility to unlock them causing a huge loss for the protocol.

Recommendations

Implement a withdraw function

Updates

Lead Judging Commences

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

Give us feedback!