← notes

The block number is the token id

Jan 23, 2024

Make the scarce thing the block, not the artwork. Be the first person to mint an NFT in each new Base block.

Generative collections mostly choose uniqueness by randomness, which means the only interesting question is what did I get. Tying it to a block turns it into whether you can get there first, and Base blocks arrive every two seconds, so it is a real race against a real clock.

The mechanism is that tokenId is block.number. Uniqueness is free because the chain already enforces it, and only one mint per block can succeed. MetadataRenderer.sol builds the SVG and the JSON in contract storage and base64-encodes both with a local Base64.sol, so there is no IPFS and no server. The renderer sits behind IMetadataRenderer, so the art can be replaced without touching the token.

Everything on chain costs more gas per mint and caps how complex the art can be. It also means the NFT does not depend on anything I keep paying for, which is the failure that has quietly killed a lot of collections. Affordable on an L2 and not on mainnet, which is the argument for the L2 in numbers.

Unresolved: everyone who races and loses still pays gas to revert.