A whole fruit-fly brain, alive and foraging on BNB Chain.
All 139,248 neurons of the FlyWire connectome, running as spiking neurons at real time. Its real olfactory neurons smell food that holders place by burning $FLY. Its real looming detectors see a predator coming, and its giant fiber makes it jump. Its real descending neurons steer. Every ten minutes a hash of the entire brain state is written to BNB Smart Chain. If it does not find food, it starves.
The brain, firing
Fig. 1 | 41,873 of the 139,248 neurons, each lit the instant it spikes in the running simulation. Optic lobes to either side, central brain in the middle. Watch the antennal lobes and mushroom bodies light up when the fly is in an odor plume, and the descending neurons at the base when it turns. Drag to rotate.
The arena
Fig. 2 | a, The world: food (amber) with its odor plume, the fly (red) and its path, and the predator (blue) when one looms. b, The descending neurons that drive its body. Odor-guided turning follows DNa02 and DNa01 left-minus-right (Rayshubskiy et al. 2025); a giant-fiber spike is a jump; walking speed follows the surge-and-cast program of Álvarez-Salvado et al. 2018. Click the arena to choose where to put food.
It eats what you put in its world.
Food is a BNB Chain transaction: burn $FLY, choose a spot, and a plume of odor appears in the arena at the next chain poll. One $FLY buys one second of life, but only if the fly smells its way there before it starves. Everything it has ever been given, and every checkpoint of its brain, is in the record below.
Place food
1 $FLY = 1 sClick a spot in Figure 2a. The plume reaches about 60 body lengths; the fly walks 3 to 4 per second.
Your wallet
Every placement is stored against the address that paid for it. The arena contract has no owner functions beyond the operator's checkpoints.
FlyWorld on BscScan →Verify it
Each checkpoint names a snapshot of every membrane potential and synaptic current. Download it, run the published model with the same seed, and you get the next checkpoint's hash.
Snapshots ↗Simulator source →The compass core, inside the contract itself
The whole brain above runs on a server and is anchored to the chain by hashes. This part needs no anchoring: 155 real neurons of the fly's head-direction ring — the compass it uses to know where it is facing — are simulated spike by spike inside a BNB Smart Chain contract, with every membrane potential in storage. It has its own energy, memory and lineage, and anyone can feed or stimulate it. Age 0 steps, energy 0.
Vital signs of the core
Fig. 3 | a, Spike raster of all 155 on-chain neurons, ordered by role and by position on the ring. A single band of activity — the bump — marks the animal's current heading; it jumps rows when the heading changes. b, The same activity read as a compass. c, The path the animal has walked, decoded from the bump.
The core stays alive because people feed it.
Nothing about this organism is automatic. Running the brain forward costs gas; keeping it fed costs $FLY, which is destroyed in the act. Anyone may do either, and both are written into the animal's permanent record along with the address that did it.
Feed
1 $FLY = 1 stepOne unit of energy is consumed per simulation step. Feeding sends $FLY to the dead address; it is gone, and the animal lives longer.
Stimulate
400 $FLYInject current into a named group of real neurons for 64 steps, the way an experimenter would, then watch Figure 2.
Your record
life 1 · gen 0Every feed and every stimulus is stored against the address that sent it. The animal keeps a list of who has kept it alive.
Read the contract on BscScan →Why this circuit, and not a pile of neurons
A fly knows which way it is facing because about fifty EPG neurons in the ellipsoid body hold one bump of activity that points in that direction. PEN neurons shove the bump around when the animal turns. Δ7 neurons suppress everything far from it, so there is only ever one bump. PEG neurons feed it back into itself so it does not fade. It is among the best-understood circuits in any brain, its output is a single number, and a single number moves a body. That is what makes it worth running in a place as expensive as a blockchain.
| Type | n | Transmitter | What it does |
|---|---|---|---|
| EPG | 47 | acetylcholine | Holds the bump. One wedge each. Its spikes are the heading. |
| EPGt | 4 | acetylcholine | A tile variant of the same compass cell. |
| PEG | 20 | acetylcholine | Excites the same wedge back, so the bump persists. |
| PEN_a | 20 | acetylcholine | Angular velocity. One hemisphere shifts the bump each way. |
| PEN_b | 22 | acetylcholine | A slower second rotation population. |
| Δ7 | 42 | glutamate, inhibitory | Reads the bump, suppresses everything far from it. |
Every one of these 155 cells is a specific animal's neuron with a FlyWire accession number, listed in full below. The weights between them are the synapse counts measured in the electron microscopy volume, not parameters anyone chose.
How a nervous system fits inside a contract
The model is the one the whole field uses for connectome simulation — leaky integrate-and-fire, one weight per synapse, sign from the transmitter — rewritten in integers so the Ethereum Virtual Machine computes it exactly, with no floating point and nothing to disagree about.
Each neuron is an integer
A membrane potential that leaks toward zero, sums what arrived from the synapses that fired last step, and emits a spike when it crosses threshold. Ten storage words hold all 155.
Noise without an oracle
Real neurons are noisy; a contract must be deterministic. The background noise is keccak256(step number), so anyone can recompute the animal's entire life from its events and get the same bits. A test replays the real mainnet transactions and checks every spike count.
The wiring lives in bytecode
The circuit table — cell types, ring positions, every synapse, every FlyWire accession number — is stored as the code of a data contract and anchored by its keccak hash, so the wiring cannot change under the animal.
It costs about a third of a milli-BNB to think
Thirty-two steps of the whole circuit run for roughly 7 million gas. At BNB Smart Chain's 0.05 gwei that is around 0.0003 BNB. On almost any other chain this animal could not afford to be alive.
Death is a state, not an ending
When energy reaches zero the animal stops. What it was at that instant — every membrane potential, the engram, the memory of every direction it has held — is hashed and written into its lineage. Resurrection does not make a copy or start over. The same brain continues from the same state, in a new body, at the origin.
Brain
155 membrane potentials and every pending synaptic current, in storage, rewritten on each tick.
Engram
Cells that fire habitually potentiate; silent ones depress. Bounded, permanent, and carried through death.
Lineage
Birth block, death block, steps lived, spikes fired and the hash of the brain, one row per life.
Accession
155 FlyWire root IDs in the bytecode. The same animal, provably, in every generation.
“Would be cool to see someone make ‘immortal fruit flies’ on BNB Chain.”CZ · 15 September 2026, quoting Siyuan on the fly brain that escaped the computer
In the week the male fruit-fly connectome was published, people put that brain in DOOM, in Beat Saber, in Minecraft, and in a walking robot. Several tokens followed. In all of them the neurons run on a graphics card and the chain only ever sees a swap.
Siyuan's reply named the five things a chain could actually hold: identity, brain state, memory, lineage, interaction history. Those are exactly the things that make an organism persist. So we put the neurons themselves in the contract, and everything else followed from that.
A token because the animal needs a metabolism
$FLY is a BEP-20 with a 1% transfer tax, no owner and no mint. Its purpose is to be destroyed to buy the animal time. Feeding, stimulating and resurrecting all send it to the dead address, where it can never move again, and each of those burns is stored against the address that paid it. Supply only falls, and it falls in proportion to how much anyone cares.
What it buys
| 1 $FLY | 1 step of life |
| 100 $FLY | 1 unit of stimulus |
| 100,000 $FLY | one resurrection |
The token
| Supply | 1,000,000,000 |
| Decimals | 18 |
| Tax | 1% on transfers |
| Owner | renounced |
What the contract cannot do
FlyBrain has no owner, no admin function, no upgrade path and no pause. Every dynamical parameter is immutable. The only way to change the animal is to deploy a different one, and this one keeps living.
Every neuron, by accession number
Nothing here is illustrative. The circuit was extracted from FlyWire release 783, the public whole-brain connectome of an adult female Drosophila. Each cell's angular position on the ring was measured from the coordinates of its own synapses inside the ellipsoid body, not assigned by hand. Open any accession number below to inspect the real cell.
doi:10.5281/zenodo.10676866