Solana Token Metadata Explained

Introduction

Token metadata on Solana provides crucial information about SPL tokens and NFTs. It defines how these digital assets appear in wallets, explorers, and marketplaces. Understanding metadata is essential for creators and users alike. This page explains what metadata is, how the Metaplex standard works, common JSON fields, hosting options, update authority, immutability, and best practices.

Diagram showing Solana token metadata structure including on-chain metadata accounts, off-chain JSON storage, and the relationship between mint addresses and metadata

Token Metadata - Understanding Data Structure on Solana

What is Metadata? (Simple Definition)

Metadata for Solana tokens and NFTs follows a two-part model. There is an on-chain metadata account and off-chain JSON data. The on-chain part stores essential fields like name, symbol, URI pointer, royalties, and verification flags. The off-chain JSON contains rich details like full descriptions, images, and attributes. This separation allows for comprehensive metadata without excessive on-chain storage costs.

Metadata Structure Overview

ComponentLocationContentsControl
On-chain metadataSolana blockchainName, symbol, URI, royalties, verification flagsUpdate authority
Off-chain JSONExternal storage (Arweave/IPFS)Full descriptions, images, attributes, rich mediaHost/pinner

On-chain fields are stored directly on the Solana blockchain in the metadata account. These include the update authority, immutable flag, short name (32 chars), symbol (10 chars), URI pointer, seller fee basis points, creators array with verification flags, and collection verification. The off-chain JSON holds extended information like full descriptions, high-resolution images, detailed attributes, and multiple media formats.

The Metaplex Token Metadata Standard

The Metaplex Token Metadata standard is widely adopted on Solana. It defines a consistent way to structure and interpret token metadata. This standard ensures that wallets, marketplaces, and explorers can display token information correctly. It uses a metadata PDA (Program Derived Address) to store the on-chain metadata. This PDA is associated with the token’s mint address.

The standard also defines the update authority. This is the key that can modify the metadata. It also includes a creators array. This lists the original creators of the token or NFT. Collection verification signals are also part of this standard. They help confirm the authenticity of NFTs belonging to a specific collection.

Example JSON Metadata

{
"name": "My Awesome Token",
"symbol": "MAT",
"description": "This is a description of my awesome token.",
"image": "https://arweave.net/my-image-hash",
"seller_fee_basis_points": 500,
"attributes": [
{
"trait_type": "Color",
"value": "Blue"
},
{
"trait_type": "Rarity",
"value": "Rare"
}
],
"properties": {
"creators": [
{
"address": "CreatorPubkey1",
"share": 100
}
]
}
}

Core JSON Fields (Quick Reference Table)

This table outlines the core fields found in the off-chain JSON metadata:

FieldWhat it meansRequired?StorageNotes
nameDisplay nameOn-chain + JSONOn-chain limited to 32 chars
symbolShort tickerOn-chain + JSONOn-chain limited to 10 chars
descriptionHuman-readable summaryJSON onlyMarkdown/plain text
imagePrimary media URLJSON onlyPrefer content-addressed links
animation_urlOptional rich mediaJSON onlyVideo/HTML if supported
seller_fee_basis_pointsRoyalty percentageOn-chain + JSONBasis points (500 = 5%)
attributesTrait listJSON only[{ trait_type, value }]
external_urlProject/site linkJSON onlyLanding page
properties.filesMedia variantsJSON onlyMIME types and sizes
properties.creatorsCreator list with sharesJSON only[{ address, share }]
collectionCollection linkageOn-chain + JSONCan be verified

Update Authority & Immutability

The update authority is a key that controls changes to a token’s metadata. This authority can modify fields like the URI. It can also update the creators array. This flexibility allows for corrections or evolving project needs.

However, metadata can also be made immutable. This means the update authority is revoked. Once immutable, the metadata cannot be changed. This builds trust with users. It assures them that the token’s properties are permanent. For example, an NFT’s image or name will never change.

Trust & Verification Features

Verified creators: Have confirmed their identity through cryptographic signatures stored in the metadata account
Collection verification: Collections can be verified to group authentic NFTs
Immutability: Once set, metadata cannot be changed, ensuring permanence

These signals help users distinguish legitimate projects from fakes.

Hosting Options & Reliability (Comparison Table)

Choosing where to host your metadata is crucial for its long-term availability. Here are common options:

HostingProsConsBest forReliability
ArweaveDurable, content-addressedGateway reliance for accessLong-term assetsVery High
IPFS (pinned)Decentralized, flexibleRequires reliable pinning/gatewaysMedium/long-termHigh
HTTPS (CDN)Fast, familiarCentralized, link rot riskPrototypes/docsMedium

Images & Media (Best Practices)

Images and media are central to token and NFT metadata. Follow these best practices for optimal display and accessibility:

Media Format Guidelines

FormatUse CaseBenefitsConsiderations
PNGGraphics, transparencyLossless, transparent backgroundsLarger file sizes
JPEGPhotographsGood compression, widely supportedLossy compression
WebPModern webExcellent compression, qualityLimited legacy support
GIF/MP4AnimationsDynamic contentFile size management

Best Practices Checklist

Recommended formats: Use widely supported image formats like PNG, JPEG, or WebP
Size limits: Keep file sizes reasonable for faster loading
Thumbnails: Provide smaller thumbnail versions for quick loading
Aspect ratios: Maintain consistent aspect ratios to prevent distortion
Animation support: Use animation_url field for videos or interactive HTML
Accessibility: Provide descriptive description and name fields as alt-text equivalents

Versioning & Migrations

Managing metadata over time requires careful planning. If your metadata is mutable, you can rotate URIs safely. This means updating the on-chain pointer to a new off-chain JSON file. This is useful for content updates or bug fixes.

Migration Considerations

FactorImpactMitigation
Caching delaysUpdates may not appear instantlyCommunicate changes clearly to users
Gateway changesIPFS gateways may changeUse multiple gateways, have fallbacks
Content updatesNeed to maintain URI consistencyPlan migration strategy in advance

Reference Tables

Table A: On-Chain vs Off-Chain

AspectOn-Chain (Metadata Account)Off-Chain (JSON at URI)
Who controlsUpdate authorityHost/pinner
MutabilityToggleable (immutable)Mutable unless content-addressed
Typical contentsShort name, symbol, URI pointer, royalties, creators + verification flags, collection flagFull description, image(s), attributes, external links, rich media

Table B: Roles & Permissions

RoleCan change what?ScopeRisk if misused
Update authorityMetadata account fields (URI, creators, mutability flag)Per mint metadataUnexpected changes, brand confusion
Verified creatorCryptographically signed verificationStored in creators arraySpoofing if users don’t check verification flag
Collection authorityVerifies NFTs belong to a collectionCollection groupingFake or misleading collections

History & Ecosystem Context

The Metaplex Token Metadata program has been the de facto standard on Solana since 2021. It’s required for almost all Solana NFTs to display rich information in wallets and marketplaces. Without metadata, SPL tokens still exist functionally, but they appear as raw token accounts with no visual representation or descriptive information.

Ecosystem Integration

Candy Machine integration and NFT launches
Marketplace compatibility across all major Solana NFT platforms
Wallet display of token information and media
Collection management and verification systems

📝 Conclusion

Metadata shapes how users perceive tokens and NFTs. It is a critical component of their identity. Choose durable hosting solutions. Set clear authorities. Lock metadata when it is final. These steps ensure a reliable and trustworthy experience for your users.

❓ FAQ

Q: What happens when metadata is immutable?

A: When metadata is immutable, its details cannot be changed after creation. This provides permanence and trust for the token or NFT.

Q: Where should I host NFT images and JSON?

A: NFT images and JSON metadata are best hosted on decentralized storage solutions like Arweave or IPFS for durability and censorship resistance.

Q: How do verified creators and collections work?

A: Verified creators and collections are signals of authenticity. Creators can verify their identity, and collections can be verified to group legitimate NFTs from a project.

Q: Can I change the image after minting?

A: Changing the image after minting depends on whether the metadata is mutable. If the metadata is immutable, the image cannot be changed. If it’s mutable, the update authority can change the URI pointing to the image.

📚 References and Further Reading