BRC-226 · demo two

The Bitcoin Battery

A covenant with a fuel tank. Each transaction performs one Mandelbrot iteration and recreates itself, slightly lighter. There is no key — so there is nothing to steal, and anyone can advance it. When the fuel runs out it simply stops, until someone tops it up.

A Bitcoin battery can power a Mandelbrot generator, or an autonomous AI agent — with no hot wallet anywhere in the picture.

the load you can see

Mandelbrot generator

The chain thinks. Every step is deterministic and forced — nobody chooses the next pixel, not even the person who built it. You are watching Bitcoin Script do arithmetic.

the load you cannot

Autonomous AI agent

The agent thinks; the chain bounds it. It decides what to do, and the covenant constrains what it is able to do — and pays for it.

Don't give an agent a hot wallet. Give it a battery. A key is unbounded capability. Funding a hot wallet bounds the amount, never the behaviour — you simply get robbed in small amounts, repeatedly. OP_PUSH_TX unlocks with a proof about the transaction rather than a signature, so the agent holds no credential at all. "The agent's wallet got drained" becomes a category error: there is nothing to exfiltrate, and nothing a prompt injection can extract. The worst a fully compromised agent can do is spend fuel doing exactly what the covenant was built to do. The failure mode is a flat battery, not a theft. Said precisely, because the precise version is the stronger one: the battery powers an agent's on-chain actions — writing, paying, proving. Not its thinking. The agent thinks wherever it likes; it can only act within the covenant.

And the visible load proves the invisible one. Nobody can verify "an agent cannot be robbed" by reading a claim about it. You can watch a fractal draw itself below, with no key in existence — and having seen that, the agent claim needs no defending.
It is running now reading the chain…
grafverse.com
computed on chain not yet — needs fuel
reading the chain…
fuel
ticks of fuel left
iterations done
frame
checking the chain…
the tip on chain ↗

Tick it and your browser builds a Bitcoin transaction with one input, one output and no signature, then broadcasts it. The covenant authorises with a proof about the transaction rather than a key, so it costs you nothing and risks nothing — the ~312 sat fee comes out of the battery's own fuel, which is what the fuel is for. Only topping it up is signed, because only topping it up spends someone's money.

Every satoshi pays a miner. There is no toll gate and no turnstile. The covenant has no author output, no crumb and no platform cut — nothing is skimmed on the way past, because there is no way past. Fuel you contribute sits in the battery until it is spent to have the next iteration computed, and that is the entire path.
in  901,657 satthe battery, before a tick out 901,348 satthe battery, one iteration further on →     309 satthe miner — the whole difference, every time
Don't take that on trust either: open any tick on chain ↗. One input, one output. If a satoshi were being taken, there would have to be an output to take it with.
The covenant, its transaction builders and this page are published under the Apache License 2.0 — a working example, here to be read, tested, forked and played with. the source · demo one
How it works. The state — the pixel being computed, the running value z, and the iteration count — lives inside the locking script. Each spend proves it is the transaction it claims to be (OP_PUSH_TX), reads that state back out of its own script, performs z → z² + c in fixed point, and rebuilds itself one step further on. Nothing about the next state is chosen by whoever presses the button: it is forced.

The state is the picture. A pixel's escape count is the iteration recorded on the tick where c advanced. Nothing is emitted, nothing is stored anywhere else — walk the chain and the image reassembles itself.

Measured: the arithmetic is 46 bytes; proving nobody faked it is 499. Roughly ten to one. The maths is nearly free — the proof is what costs.

← demo one: the self-running counter Bitcoin BASIC — read this covenant as a program →

Colophon. Designed by sun-dive, who chose everything that is now permanent — the grid, the iteration ramp, the target the descent aims at, and the decision to mint a second genesis rather than live with a first one that drew a blob instead of a Mandelbrot — and written with Claude (Opus 5).

The methods this battery cost are the reason the ones after it were cheaper. Measure, never count — its first fee was hand counted, landed at 99.68 sat/KB against a 100 sat/KB floor, and had no key anywhere able to amend it. Feel the constants in a toy before they are permanentMX0 = 6 looked entirely reasonable written down and was visibly wrong the moment it rendered a frame. Both lessons were paid for here, and they have been earning ever since.

© 2026 sun-dive · Apache License 2.0 · in the covenant we trust

Play with it — the parameter toy

The same integer arithmetic the covenant runs, with the knobs still attached. This is how the genesis parameters were chosen; they are permanent now, so nothing here touches the real battery. Turn the dials and watch what a grid or an iteration budget actually costs.

grafverse.com
speed fast fps 8

Local simulation — the same integer arithmetic the covenant executes on chain, verified step-for-step against the Script interpreter. Nothing here spends anything.

fuel sat
ticks remaining
ticks spent0
pixels drawn0
cost so far0 sat
level1
magnification
next level costs
levels left (precision)

These numbers are baked into the covenant at genesis and can never be changed. Tune them here until the picture is the one you want — this preview is exactly what the chain will draw.