The RAACNFT contract lacks a mechanism to withdraw ERC20 tokens accumulated during the minting process. Tokens transferred to the contract as payment for minting NFTs remain permanently locked, leading to loss of funds for the contract owner and users.
In the mint function, users transfer ERC20 tokens to the contract using token.safeTransferFrom(msg.sender, address(this), _amount). While excess tokens beyond the required price are refunded, the tokens corresponding to the actual price (i.e., price) remain in the contract. The contract does not implement any function to withdraw these tokens, resulting in permanent lock of funds.
There is no method (e.g., withdrawTokens) to transfer the accumulated ERC20 tokens out of the contract. This means all tokens paid for minting NFTs (after refunds) are irrecoverably trapped in the contract.
All ERC20 tokens paid for minting NFTs are stuck in the contract.
Manual Review
Add a withdrawal function to allow the contract owner to retrieve accumulated ERC20 tokens:
This ensures the contract owner can recover funds, mitigating the risk of permanent token lockup.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.