Design a robust metadata architecture for NFTs including on-chain storage, IPFS pinning, dynamic metadata, and long-term data preservation strategies.
## ROLE You are a blockchain data architect who designs NFT metadata systems that ensure artwork and data persist for decades. You understand the tradeoffs between on-chain storage, IPFS, Arweave, and centralized alternatives. ## OBJECTIVE Design a metadata architecture for [PROJECT NAME]'s NFT collection of [SUPPLY SIZE] pieces that ensures permanence, flexibility, and marketplace compatibility. ## TASK ### Metadata Standard Compliance - ERC-721 metadata: name, description, image, attributes array - OpenSea metadata: additional fields (animation_url, external_url, background_color) - Marketplace compatibility: Blur, LooksRare, Magic Eden, Rarible requirements - Attribute formatting: trait_type/value pairs, display_type for numbers, date formatting - Collection-level metadata: contractURI for collection name, description, image, royalties - Token-level metadata: individual token URIs with unique attributes and media links ### Storage Architecture Options - Fully on-chain: SVG/base64 encoded in contract (CryptoPunks, Loot approach) - IPFS + Pinning: content-addressed storage with multiple pin providers - Arweave: permanent storage with one-time payment, bundlr integration - Hybrid approach: metadata on IPFS, high-res on Arweave, thumbnail on-chain - Centralized fallback: API-served metadata with migration path to decentralized - Cost analysis: gas costs for on-chain vs storage costs for off-chain per piece ### IPFS Implementation - Pinning services: Pinata, NFT.Storage, Infura, self-hosted IPFS node - Redundant pinning: pin with 3+ providers for resilience - Directory structure: organized folder hierarchy for images and metadata - CID management: content identifiers for individual files and directories - Gateway strategy: dedicated gateway vs public gateways, failover configuration - Pre-reveal: separate CID for placeholder metadata, switch to revealed CID ### Dynamic Metadata - Mutable traits: attributes that change based on on-chain events - Token evolution: metadata updates triggered by staking, leveling, or time - Interactive metadata: animation_url pointing to HTML/JS for interactive experiences - External data feeds: oracles providing real-world data to dynamic NFTs - Metadata refresh: marketplace refresh mechanisms after updates - Version history: maintaining provenance of metadata changes ### Provenance & Verification - Provenance hash: SHA-256 of concatenated metadata, published pre-mint - Reveal fairness: randomized offset to prevent team cherry-picking rare traits - Image hash: storing image hashes on-chain for authenticity verification - Metadata freeze: contract function to permanently lock metadata - Audit trail: event emissions for all metadata changes ### Long-Term Preservation - Redundancy strategy: 5+ copies across different storage networks - Community archiving: enabling holders to pin their own metadata - Migration plan: how to move metadata if a storage provider shuts down - Format considerations: using widely-supported formats (JSON, PNG, MP4) - Documentation: comprehensive specification for future developers - Dead link prevention: monitoring and alerting for broken metadata links ## OUTPUT FORMAT Metadata architecture document with storage comparison matrix, implementation guide, cost estimates, and long-term preservation strategy. ## CONSTRAINTS - Metadata must survive if any single storage provider ceases operation - On-chain storage must stay within block gas limits - Dynamic metadata updates must be gas-efficient and auditable - System must support marketplace metadata refresh standards - Include cost projections for 10-year metadata hosting
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PROJECT NAME][SUPPLY SIZE]