The contract's implementation of the token URI relies on _baseURI()
, which by default returns an empty string. This can lead to an improperly formatted token URI, potentially causing issues when interfacing with wallets or platforms that expect a specific URI format (e.g., a data URI prefix).
Default Behavior: OpenZeppelin’s ERC721 implementation of _baseURI()
returns an empty string. As a result, when concatenating the Base64-encoded JSON metadata, the expected prefix (such as "data:application/json;base64,"
) is missing.
Formatting Issue: The lack of the correct prefix can cause external systems and clients to misinterpret the token metadata or fail to load it altogether.
Assumption Mismatch: Developers might assume that _baseURI()
is correctly configured, leading to integration issues if the token URI is not in the expected format.
Interoperability Problems: Wallets, marketplaces, or other platforms expecting a properly formatted data URI may not display the NFT metadata correctly.
User Experience: This could result in a degraded user experience where NFT details (like profile information) are not properly rendered.
Maintenance Confusion: Future maintainers might overlook this subtle issue, leading to persistent integration bugs.
Manual Code Review
Analysis of OpenZeppelin ERC721 documentation and source code
Override _baseURI(): Modify the _baseURI()
function to return the appropriate prefix for on-chain metadata. For example:
`_baseURI` can remains empty, the token URI will have a valid JSON. Rest can be handled in the app interface.
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.