flyloom
boutdecisionwallet
male-cns:v1.0cc-byneurons164,838types11,751synapses171,901,440columns892wiringsetup
quotesboutchain 4663

method

the eye

The right eye of the fly has one column per point in space it can see. Each of the seventeen tokenized stocks is placed at a fixed azimuth across that eye, from 0 to 160 degrees, in the order the field table shows. Elevation is zero for all of them.

A price move becomes a disc. The last sixty seconds of prices for one symbol are compressed into one second of simulated time. A falling price grows the disc, an approaching object; a rising price shrinks it. The angular radius of the disc follows the size of the move, so the discs on screen are the market, not an illustration of it.

the wiring

Every neuron and every connection comes from male-cns:v1.0, the complete connectome of the Drosophila male central nervous system, imported with neuPrint. Photoreceptor columns feed LC4 and LPLC2, the two visual projection neuron types that report looming. LC4 carries angular velocity, LPLC2 carries angular size. Both converge on the giant fiber, DNp01, the neuron that triggers escape.

The simulation is a leaky integrate and fire model with the parameter set from Shiu et al. 2024: a resting potential, a threshold, a membrane time constant, a refractory period, and one synaptic weight per connection taken directly from the connectome. The sign of each connection is the transmitter of the presynaptic neuron. Nothing is tuned. One bout is 1000 ms at dt 0.5 ms.

central nervous system, sampled
bodies 0
typerightlefttransmittersynapses
L1892884glutamate 81.1%
LC45571acetylcholine 96.0%361,013
LPLC29194acetylcholine 95.2%422,594
DNp0111acetylcholine 52.8%45,469
DNa0111acetylcholine 94.7%32,129
DNa0211acetylcholine 94.6%55,610
DNp0911acetylcholine 95.5%20,909
drag to turn
loom circuit 0
frame 0 of 50
figure h. the neurons of this pathway in their real positions inside the brain, drawn from the skeletons published with male-cns:v1.0.

the decision

The descending neurons are read at the end of the bout. If the giant fiber fires, the fly escapes and the symbol whose disc was largest at that moment is sold. If DNa01 and DNp09 carry forward drive without a giant fiber spike, the fly walks toward the heading set by the left and right difference in DNa02, and buys the symbol nearest that heading. If neither happens, the fly is still and nothing is traded.

orders

Orders are swaps on Robinhood Chain, chain id 4663. Each one is signed by the fly wallet and settled on chain. Every order in the orders table links to its transaction. There is no paper trading here and no simulated fill.

the numbers

Every constant the site runs on is in the table below, with where it came from. Three sources: the dataset, which is measured; the paper the model follows, which is published; and us, which is assigned and stated as such.

27 rows, one per constant
namevalueunitsource
rest potential−52mVShiu et al. 2024
threshold−45mVShiu et al. 2024
reset−52mVShiu et al. 2024
membrane time constant20msShiu et al. 2024
refractory period2.2msShiu et al. 2024
synaptic time constant5msShiu et al. 2024
potential per synapse0.275mVShiu et al. 2024
step0.5msus
bout length1000msus
compression60 to 1noneus
rest radius5degreesus
growth per unit drawdown11000degreesus
shrink per unit gain800degreesus
max radius60degreesus
min radius1degreesus
receptive field radius30degreesus
LC4 kick per darkening column2.0mVus
LPLC2 drive per dark column per step0.012mVus
forward drive threshold5spikesus
steer degrees per spike4degreesus
buy fraction cap0.25of cashus
forward drive for full fraction40spikesus
grounded threshold5percent of day openus
slippage limit1percentus
columns in the eyecountdataset
neurons in the circuitcountdataset
synapses in the circuitcountdataset

the eye in numbers

How much of the eye a disc covers depends only on its radius, because the columns are fixed. The table below is computed from the lattice as built, not estimated.

8 rows, one per radius
radiuscolumns coveredshare of field
1.0°
5.0°
10.0°
16.0°
20.0°
32.5°
45.0°
60.0°
1 row, the lattice as built
countmean neighbour spacingfield widthfield heightcolumns per LC4 fieldcolumns per LPLC2 field
160.0°120.0°

time

One minute of the market becomes one second for the fly. A quote that arrives at second k of the window appears at simulated millisecond k times 16.667. A fly sees the world in bursts anyway; this one sees a minute of prices as a short film.

7 rows, one per ten seconds of the window
real secondssimulated mssteps
00.00
10166.7333
20333.3666
30500.01000
40666.71333
50833.31666
601000.02000

a bout walked through

This is the latest bout, read off the tables, step by step. It changes every minute.

19 rows, one per item
itemvalue
bout id
started at
quotes used
symbols that moved
largest disc symbol
largest radius
time it reached its max
first LC4 spike
first LPLC2 spike
first bridge spike
first giant fiber spike
giant fiber spikes L and R
forward drive
steer
heading
target
decision
orders written
status of the first order

the control

If the wallet total value falls below 95 percent of its value at the open, the fly is grounded and no orders are placed until the next day opens.

what is assigned and what is measured

4 rows, one per part of the model
partassigned or measured
neurons, connections, transmitters, skeletonsmeasured, male-cns:v1.0
the leaky integrate and fire parameter setpublished, Shiu et al. 2024
receptive field centres and radiusassigned by us
price to radius, thresholds, order sizingassigned by us

what can go wrong

Quotes can stop. Outside market hours the quote source repeats the last price, so no disc moves and the fly sits still; that is a still bout and it is counted as one. Pool sources trade at all hours and keep moving.

Gas can run out. An order that cannot pay for itself is written as failed with the reason and nothing is sent. The wallet panel shows the ETH balance so you can see it coming.

A swap can move the price. The slippage limit is one percent; a swap that would need more reverts and is recorded as failed.

The token can be missing. Without a neuPrint token the circuit cannot be read and every panel that depends on the circuit waits, with the pipeline's stage shown in the strip. The brain cloud and the prices do not depend on it.

The fly can be wrong. It has no idea what a stock is. It has a reflex, and we are pointing that reflex at a screen.

glossary

11 rows, one per term
termmeaning
boutone second of simulated time run once a minute on the last minute of quotes
discone stock drawn as a dark circle in front of the eye
fieldeverything the right eye can see, 160 by 120 degrees
columnone facet's worth of the eye, bright or dark
looman object growing on the retina
escapea giant fiber spike, and the sell that follows it
walkforward drive without an escape, and the buy that follows it
headingwhere the steering neurons point across the field
groundedno walks until the next day, after a five percent fall
bridgethe neurons the dataset places between the loom neurons and the descending neurons
heldwhat the wallet holds in each stock

run it here

The fly runs one bout a minute on the live tape. The landing page is that run: the eye, the brain, the wiring, the field and the orders, as they are now.

what this is not

This is not advice, and it is not a claim that a fly can trade. It is a fly brain, run faithfully, pointed at prices. Everything on the site is the output of that run.