Metadata and Decentralized Storage Flashcards
6 cards from real NFT practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Metadata and Decentralized Storage flashcards as text
An NFT project stores its metadata using an `ipfs://` URI in the smart contract. What is the primary purpose of using an IPFS Content Identifier (CID) instead of a traditional HTTPS URL?
Answer: To provide a verifiable, immutable link based on the content of the metadata itself.
IPFS uses content addressing, where the identifier (CID) is a unique cryptographic hash of the content. This means the CID is intrinsically linked to the data itself. If the data is altered in any way, the CID will change. This provides a verifiable and immutable link, ensuring the NFT's metadata cannot be tampered with without breaking the link stored on-chain.
A developer is choosing a decentralized storage solution for an NFT collection's metadata and art. The highest priority for the project is ensuring the data remains available forever with a single, one-time transaction, without relying on ongoing payments or community pinning. Which service best meets this specific requirement?
Answer: Arweave.
Arweave is designed for permanent data storage. It utilizes a "pay once, store forever" model where a single upfront fee is intended to cover the cost of indefinite storage through an endowment-based economic model. This contrasts with IPFS, which requires data to be actively 'pinned' to remain available, and Filecoin, which operates on ongoing storage contracts.
Which of the following is the most significant disadvantage of storing NFT metadata directly on-chain?
Answer: It is prohibitively expensive for large files due to gas costs.
Storing data directly on a blockchain like Ethereum is extremely expensive due to the gas costs associated with block space. While on-chain data is highly permanent and secure, the cost makes it impractical for anything other than very small amounts of data, such as a few attributes. Storing entire JSON files, images, or videos on-chain is cost-prohibitive for nearly all projects.
A team is launching a 'revealable' NFT collection where the final artwork and traits are hidden at the time of minting. To achieve this, they initially point the `tokenURI` to a placeholder metadata file on IPFS. What is the correct procedure to reveal the final metadata?
Answer: Upload the new metadata to IPFS and call a function on the smart contract to update the `tokenURI` to the new CID.
Data on IPFS is content-addressed and therefore immutable; you cannot change data once it has been uploaded and a CID has been generated. The proper method for a metadata reveal is to upload the new, final metadata to a decentralized storage provider (generating a new URI/CID), and then call a privileged function on the smart contract to update the `tokenURI` pointer to this new location.
According to the common ERC-721 metadata schema, which of the following is a standard, top-level property for the JSON metadata file?
Answer: image
The official ERC-721 metadata schema specifies a few core properties, including `name`, `description`, and `image`. The `image` property should contain a URI pointing to the visual representation of the NFT. While other properties like traits (which can be used for rarity) and external URLs are common and supported by marketplaces, `image` is a fundamental part of the base schema.
An NFT project's images are stored on IPFS, but some users report that the images occasionally fail to load. The project owner confirms the files were uploaded but is not running their own IPFS node. What is the most likely cause of this issue?
Answer: The blockchain network is congested, preventing metadata access.
For data to remain available on the public IPFS network, it must be hosted, or 'pinned,' by at least one node. If a file is uploaded but no node continues to pin it, the data can become unavailable as nodes garbage-collect unpinned content. Using a pinning service (like Pinata, NFT.Storage, etc.) or running a dedicated node is necessary to ensure the persistence of the data.