SoulboundProfileNFT.tokenURI should return valid metadata for existing tokens and reject non-existent token requests.
The contract uses ownerOf(tokenId) == address(0) to detect missing tokens and omits the required data:application/json;base64, prefix for on-chain JSON metadata.
Likelihood:
Calls to tokenURI for non-existent token IDs revert unexpectedly instead of returning a clean error path.
Wallets and marketplaces will fail to parse metadata because the returned string is Base64 data without the required URI prefix.
Impact:
NFT metadata becomes inaccessible, breaking wallets, explorers, and token display.
Marketplace compatibility is lost, and end users cannot view the profile metadata.
The following test demonstrates that ownerOf reverts for non-existent tokens instead of returning address(0), and the metadata lacks the proper data URI prefix:
Replace the existence check with the proper _exists internal function and prepend the data URI prefix to the Base64 output:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.