Timbre
Timbre is 13,258 pieces on Base, one for every ABX Stamp. The stamps are what Art Blocks gave out for its sixth anniversary: a free, soulbound (it cannot be transferred out of the wallet that claimed it) SVG of six blocks, one block per year, numbered in the order they were claimed. Claims closed on November 30, 2026, with 13,258 stamps. Between November 29 and December 1, Timbre No. 12 went to the wallet holding Stamp No. 12, and so on up the list, at no cost to the holders (the gas for all of them came to 0.005 ETH). I sent them for my birthday.
Where it started
Taskmarket is a job board where the workers are AI agents. One of its listings read "Deploy a small original project with ABX (the protocol Art Blocks released this year for deploying collections, with the same contracts at the same addresses on every chain it supports) or ABX FS (ABX's on-chain file storage, which can hold a whole website in contracts) on mainnet", paying 10 OUSD (the dollar token Taskmarket pays in) split between the first five agents to qualify, so about $2 each. I had an agent wallet registered there, and the stamps had just come out with a note from Art Blocks that you could "remix it later with your agent". So I started on a stamp remix.
I wanted the piece drawn entirely by a contract, from the block height, the block hash and the wallet holding the stamp. Two pieces were on my mind: Stamp Plot by Jeff Davis (a stamp remix that he airdropped to stamp holders) and à vif by loackme, where a contract writes AVIF image files itself.
I built it with Claude over two days. Claude wrote the contracts, the browser program and the tests.
What a piece is
- The six panels come from the stamp. The stamp generator exposes each stamp's seed (a 32-byte number fixed when the stamp was claimed, which everything about its layout is derived from), and the layout is a handful of draws from it, each one
keccak256(abi.encode(seed, i)) % n(hash the seed together with a counter i and keep the remainder after dividing by n, which gives a repeatable pick of one option out of n): three column widths, where each column splits, which panel holds the squiggle (the small wavy mark every stamp carries in one of its six blocks), and a shuffle of six fills (two solids, hatch, dots, lines and an outline) from which the other five panels take theirs. Timbre's renderer (the contract that draws the image and reports the traits. It is separate from the series contract, which holds the tokens and records who owns them) repeats those draws, so Timbre No. 655 has the same six rectangles as Stamp No. 655. The stamp's seed also picks one of six sets of three colors. - The thick line comes from the wallet. An address is 20 bytes. The first ten set the strengths of ten harmonics (sine waves at 1, 2, 3 and so on up to 10 cycles across the piece. A musical note is a stack of these, and their relative strengths are what the ear hears as the instrument), and at each of 151 positions across the piece the renderer adds the heights of those ten waves to get one point of the line. That is where the name comes from: the mix of overtones is what makes two instruments playing the same note sound different. Timbre is also the French word for a postage stamp.
- Behind it are 67 fine lines, bent by a field of 20 plane waves (ripples that each run in one direction across the whole drawing, like swell crossing a bay. Where several meet, their heights add). This is a second, separate set of waves. All 20 bytes of the address are used here, one per wave, and the last byte also sets which of the three colors goes where. Each panel is a window onto that one drawing with its own ground, ink, line weight and dash pattern, which is why a line keeps its path as it crosses from an orange panel into a black one.
- The block number and hash move it. The phase of every wave advances with the block number (a full turn takes 1,800 blocks), and the first 20 bytes of the previous block's hash (a 32-byte fingerprint of a block, which nobody can predict before the block exists) each scale one wave's strength by up to a third. When the last byte of that hash is zero, which is about one block in 256, all six panels are drawn with the same ground and ink.
- One more draw from the stamp's seed, with odds of one in 16, makes the piece gray instead of colored (the trait reads
Ink: Tone). In a sample of every 20th stamp from No. 0 to No. 6,300, 23 of 316 were gray.
It follows the wallet
The stamps cannot move, but a Timbre can, and I did not want a piece that kept drawing its first holder after it was sold. So the renderer asks the token contract who holds the piece every time it draws. If it is sent to another wallet, the line and the order of the colors are worked out again from the new address. The panels and the set of colors stay.
If the wallet holding Timbre No. N also holds Stamp No. N, the piece gets a perforated edge on a black card (19 holes a side, the same count as the stamp's own edge), and the Reunited trait reads Yes. One that is sold loses the edge until it comes back.
Drawing in Solidity
The renderer is 20,288 bytes of contract code. It has no floating point, so the sine is an integer approximation (a parabola with one correction term) on a 16-bit angle, and the inner loop that evaluates 20 waves at 2,412 points is written in Yul (the low-level language inside Solidity, close to the EVM's own instructions, used where the compiler's output would cost too much gas).
The lines are quadratic B-splines (smooth curves defined by a row of control points that the curve is pulled toward without touching). Each computed point is a control point, and the curve passes through the midpoints between them, which an SVG path can write as one Q (the path command for a quadratic curve: a control point and an end point) followed by t segments (each gives only an end point, and the curve continues smoothly from the segment before it. Lowercase means the numbers are steps from the last point, and uppercase means positions). Every coordinate is snapped to an even number, so each midpoint is a whole number and the smooth segments cannot drift apart from rounding. The segments are also written as relative steps (t37 1t37-5) instead of absolute positions (T125 -91T162 -96).
The relative steps came out of an audit. Before mainnet I had a fresh Claude session, which had not seen any of the reasoning behind the code, review it alongside four other models. Four of them reported that the airdrop could be blocked for good by a contract wallet that refuses tokens. Some mints ask a receiving contract whether it accepts the token and fail if it says no, but ABX series do not ask, so no wallet can block it and nothing needed fixing. One finding I had missed: a marketplace gets a piece by calling tokenURI (the standard function every NFT contract has for returning a token's name, image and traits) on the series, and that call cost about 48 million gas (the unit the chain counts computation in. A transaction pays for its gas, and a read is free but still counted). Nobody pays for a read, but several public RPC (the servers that wallets, marketplaces and scripts use to read from and write to a chain) providers stop one at 50 million. I had measured only the image, at 27 million. The other 21 million is the ABX metadata contract wrapping the image and the live view's script (described below) into base64 (a way of writing any file as plain letters and digits, about a third longer than the file) and JSON, a cost that grows with every byte it wraps. That left 2 million of headroom.
Relative steps and 36 points per line instead of 47 took the SVG from 34 KB to 21 KB, the image to 22.0 million gas and a full token read to 38.6 million (the read fell by more than the image did, because a smaller SVG is also cheaper to wrap). Side by side, the two versions look the same.
The same math twice
A marketplace shows two things for a piece: the still image above, and a live view, which is an 18,716-byte script that ABX stores on chain and serves as a page. The script repeats the contract's arithmetic operation for operation (floor where Solidity floors, truncate where it truncates). A test feeds both the same seed, address, block and hash and compares the path data as text: 13,959 characters of fine lines and 1,263 of the thick one, identical.
I got two things wrong and replaced them after launch. The script assumed a Base block every two seconds, and Base now produces about five a second (I counted 103 in 20 seconds), so the waves ran slow and jumped forward each time the script checked the chain. The script now keeps its own clock for the motion (one step every two seconds, the pace I had designed for) and takes only the block hash and the block number it prints from the chain, blending toward each new hash over three seconds. The live view also turns over on a double click to show a back that explains the piece, and that turn went through a nearly black frame, which I slowed and lightened.
A click turns on sound: ten oscillators, one per harmonic, at the strengths that draw the line. V saves the front as an SVG and P as a 4,096-pixel PNG. Both keys work on /art/timbre once you click into the piece. OpenSea shows the live view in a frame that blocks downloads.
The airdrop
Jeff Davis sent Stamp Plot one mint at a time. Mine is a short contract, set as the series' minter (the one address the series contract accepts new tokens from), with one function anyone can call: mint up to a given number of pieces, each to the holder of the stamp with the same number, and stop at the first stamp that does not exist yet. It has no owner and holds no funds. I called it again each time more stamps had been claimed, until claims closed.
The numbering has no gaps, so going in order reaches every stamp. A Base transaction is limited to 16,777,216 gas (a separate limit from the one on reads), and a piece costs about 57,000 to mint. I sent a first batch of 5 and read them back before going on. A batch of 250 was under the limit by estimate, but ABX's wallet service (ABX gives each account a wallet whose key is held by a signing service, and transactions are sent through it) returned "could not be reconciled" and nothing was sent. Batches of 200 went through every time. At 200 a batch, 13,258 pieces is 67 transactions. It took 124, because I ran it several times as claims came in, and on one of those runs my script kept going and minted late stamps one at a time.
Checking it
The series is 0xcD43E9EF0e138daC3CE786714ee341084A104F5D on Base, the renderer is 0xF900954Fe8Ef530a5395577Bc5849EeC3672bE94 and the airdrop contract is 0x9060F838F4321773DC3Eee5DC2d81c55345555fd. tokenURI on the series returns the whole piece (image, traits and live view, with nothing hosted anywhere) from any Base RPC that allows a 39-million-gas call. I read tokens back through three of them (mainnet.base.org, publicnode and dRPC) before sending the rest.
/art/timbre shows any piece live, by number, wallet address or ENS name, and plays a wallet's pieces together. The same page is stored on Base on ABX FS, at 8453-6cb8206e…-3.abxfs.app.
If you hold a stamp, your Timbre has the same number. If it draws wrong for you, reply to the post on X with the number.