On-Chain Reveal

An on-chain reveal is an NFT minting and revelation mechanism in which the complete artwork data — including visual rendering code, trait metadata, and any generative parameters — is stored directly in Ethereum smart contract storage or calldata rather than on external systems like IPFS or centralized servers, meaning the NFT can reconstruct and display its artwork using only the blockchain’s own data without relying on any external infrastructure to remain functional, making it the most permanent and decentralized form of NFT storage available. On-chain reveals are the gold standard for NFT permanence because they eliminate the single points of failure inherent in IPFS-dependent or centralized storage systems — an NFT stored entirely on-chain will remain viewable and verifiable for as long as the Ethereum network exists.


On-Chain vs. Off-Chain NFT Storage

Storage Type Where Metadata Lives Permanence Gas Cost
On-Chain Ethereum contract/calldata Permanent (blockchain) Very High
IPFS Distributed hash network Depends on pinning Low
Arweave Permaweb (pay-once storage) ~200 years (economic guarantee) Low-Medium
Centralized Creator’s server/CDN Depends on creator upkeep Lowest

How On-Chain NFTs Work

SVG in Solidity

“`solidity

function tokenURI(uint256 tokenId) public view returns (string memory) {

// Retrieve stored traits for this token

uint8 background = traits[tokenId].background;

uint8 eyes = traits[tokenId].eyes;

uint8 hat = traits[tokenId].hat;

// Assemble SVG from stored layer data

string memory svg = string(abi.encodePacked(

”,

backgroundLayers[background],

eyeLayers[eyes],

hatLayers[hat],

));

// Assemble JSON metadata

string memory json = Base64.encode(bytes(string(abi.encodePacked(

‘{“name”:”Token #’, tokenId.toString(),

‘”,”image”:”data:image/svg+xml;base64,’, Base64.encode(bytes(svg)),

‘”}’

))));

return string(abi.encodePacked(“data:application/json;base64,”, json));

}

“`

The artwork is reconstructed dynamically every time tokenURI is called — no external request made.

Fully On-Chain vs. Partially On-Chain

  • Partially on-chain: Metadata (traits, name, description) on-chain; artwork still on IPFS
  • On-chain generative: Algorithm stored on-chain; output generated deterministically from seed

Why On-Chain Matters

No Server to Go Down

No Rug via Metadata Change

Censorship Resistance

Marketplaces Display Without Creator Cooperation


Gas Cost Tradeoff

Storing data on Ethereum is expensive. Deploying a fully on-chain 10,000-token collection requires:

  • Storing all SVG layer data in the contract (~hundreds of KB)
  • Contract deployment gas: 10–100× more than a standard ERC-721A deployment
  • At peak gas prices (100+ gwei): can cost thousands of ETH to deploy

This is why fully on-chain collections are rare and typically carry premium collector status. They represent a genuine technical and financial commitment to permanence.


Notable On-Chain NFT Collections

Collection Notes
CryptoPunks Punk images stored on-chain (updated after launch)
Autoglyphs First fully on-chain generative art (Larva Labs, 2019)
Art Blocks Generative script stored on-chain; rendered deterministically
Nouns New Noun generated on-chain daily; pixel art stored in contract
Chain Runners 10,000 pixel characters fully on-chain
Loot (for Adventurers) Text-only metadata fully on-chain

On-Chain Reveal Flow

“`

  1. Contract deployed with all trait data stored on-chain
  1. Mint begins:
    All tokens show placeholder (or immediate reveal — no IPFS needed)
    Randomness from block hash or Chainlink VRF assigned to token IDs
  1. Reveal:
    No external metadata update needed
    Traits were always in the contract; just required randomness assignment
    Once VRF returns result, traits are assigned and tokenURI renders immediately
  1. Permanent:
    Artwork accessible forever via contract
    No maintenance, no fees, no dependencies

“`


History

  • 2019: Autoglyphs (Larva Labs) — first fully on-chain generative art on Ethereum; 512 tokens
  • 2020: Art Blocks launches; stores generative algorithm on-chain; output rendered by IPFS images but algorithm is permanent
  • 2021: Loot launches as text-only on-chain NFT; influences “on-chain” design philosophy
  • 2021–2022: Nouns DAO: daily on-chain generated pixel nouns; establishes on-chain as premium
  • 2022+: On-chain storage increasingly possible via Ethereum calldata (EIP-4844 blob transactions in 2024); cost reduced significantly
  • 2024: EIP-4844 blobs enable cheaper on-chain storage; more projects explore full on-chain viability

See Also