MoonCats is the earliest generative art on Ethereum in the strict, technical sense of being generated at mint by users under an on-chain verifiable algorithm. Period. Here's why🧵
2017 on-chain deployment. The MoonCatRescue contract was verified on August 9, 2017, predating ERC-721 and most NFT infrastructure.
On-chain, activation-time randomness. When the owners call activate(), the contract commits to searchSeed = block.blockhash(block.number - 1), which cannot be known until just before activation. This prevents precomputation or premine of desirable outputs.
Proof-of-work gated mint. Minting uses rescueCat(bytes32 seed), which computes catIdHash = keccak256(seed, searchSeed) and requires catIdHash[0] | catIdHash[1] | catIdHash[2] == 0x0. In practice, rescuers had to search seeds off-chain until a hash with three leading zero bytes was found, then submit that seed on-chain. This made generation permissionless and miner-discoverable rather than pre-generated by the creators.
Deterministic ID derivation at mint. For valid seeds the contract assigns catId = bytes5((catIdHash & 0xffffffff) << 216), i.e., the low 32 bits of the hash shifted into a 5-byte identifier, with the high byte reserved for the “genesis” flag. Uniqueness is enforced on-chain with require(catOwners[catId] == 0x0).
Canonical generator anchored on-chain. The contract stores imageGenerationCodeMD5 so clients can verify that the rendering code they use matches the canonical generator the contract references. This is an on-chain cryptographic anchor for the renderer.
Compact, generative “recipe” fully stored on-chain. Each MoonCat’s 5-byte Hex ID encodes its full recipe: direction, palette inversion, fur pattern, facial expression, pose, and base color. The second byte (“k”) multiplexes pose/face/fur/facing, and the last three bytes provide the base RGB that is expanded into a palette.
Open, reference renderer. The official generator mooncatparser deterministically maps the 5-byte ID into a 2D pixel array. Anyone can independently re-render a MoonCat from only the on-chain ID, ensuring long-term verifiability.
User-controlled distribution at mint. The original “Scanner” let users mine seeds locally and decide whether to submit a rescue, which made rarity statistics and trait distributions emerge from open participation rather than a precomputed drop.
Pre-ERC-721, fully on-chain market and naming. The 2017 contract includes an on-chain marketplace (makeAdoptionOffer, acceptAdoptionOffer, requests) and immutable naming via nameCat, demonstrating a self-contained generative mint plus provenance and exchange layer in one system.
Later hardening to fully on-chain images. In 2022, supplementary contracts (MoonCatSVGs, MoonCatColors, MoonCatTraits) were deployed so the chain itself can return the SVG for any MoonCat directly from its on-chain recipe, eliminating off-chain image dependencies while preserving the original 2017 generative model.
In sum, MoonCats pioneered on-chain–seeded, proof-of-work–gated, user-discovered generative minting in August 2017, with a verifiable rendering pipeline anchored by a hash in the contract and a compact on-chain recipe per token.
23,97K