Root cause: PuppyRaffle::tokenURI interpolates the rarity name into the JSON without wrapping it in quotes.
Impact: every token's metadata is syntactically invalid JSON, so any strict consumer — marketplaces, wallets, indexers — fails to parse it and the NFT displays without name, description or image.
tokenURI must return a base64-encoded JSON document conforming to the ERC-721 metadata schema, in which value is a string and must therefore be quoted.
The opening quote before the value is missing and so is the closing one. The produced document ends up as "value": common}, where common is a bare token, which no JSON parser accepts.
The resulting payload, once decoded:
Likelihood:
Deterministic and universal: every token ever minted carries the malformed document, regardless of rarity or owner.
Impact:
Marketplaces and wallets that validate metadata reject the document outright, so the puppy renders as an unnamed, imageless token. The NFT is the entire prize of the protocol, and it is undisplayable.
Indexers that parse leniently may read the attribute as null, silently losing the rarity trait that gives the collection its value.
Decode the returned URI and attempt to parse it:
Running the decoded payload through any JSON parser fails:
Control — the same document with the value quoted parses without error, confirming the quotes are the only defect:
Quote the value:
A test that base64-decodes tokenURI and asserts the result parses as JSON would prevent this class of regression.
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.