The RAACNFT.sol
contract is designed to represent multiple NFTs, each backed by a physical house. However, the current implementation does not restrict minting after a house has been "bought," allowing multiple users to mint the same token ID. This creates a critical issue where there is no restriction to stop buying a house once it has been bought . The contract inherits from ERC721Enumerable.sol but does not implement it properly to stop this from happening.
The mint
function in RAACNFT.sol
does not enforce a restriction on re-minting an already purchased house. As seen in the following function (GitHub reference: RAACNFT.sol#L32-L50), users can continuously mint the same token ID if they have sufficient funds:
Since there is no check to prevent the same _tokenId
from being minted multiple times, multiple users can own the same house-backed NFT, breaking the intended exclusivity.
This vulnerability has high impact because:
Users may unknowingly purchase an NFT without true asset backing.
The protocol could lose credibility and legal validity if asset-backed claims cannot be enforced.
Manual Review
To fix this issue, the protocol should implement a finite minting mechanism that prevents an already-minted _tokenId
from being minted again. Possible solutions include:
Checking Ownership: Before minting, check if _tokenId
is already assigned to an owner (ownerOf(_tokenId)
) and revert if so.
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.