$npx skillfedfor your agent
REPO

A fly brain can place real crypto trades, but that doesn't mean it can learn to trade

on: nftechie/stonkfly

A fly brain is running a crypto trading account. Not metaphorically — Stonkfly loads the MaleCNS v1.0 connectome, all 166,700 neurons and 25.6 million connections, and routes live BTC-USDC price data through it as visual stimulation. Coinbase prices become an RGB candlestick chart; brightness and color channels activate 3,335 and 811 input neurons respectively. A fixed readout layer on the other end votes buy, sell, or hold. Actual orders go through a custom Coinbase AgentKit ActionProvider.

The reinforcement loop is the genuinely interesting part. Positive portfolio P&L fires 15 identified PAM11 dopamine neurons — real cells from the connectome, not abstract reward nodes. Negative P&L fires two PPL101 aversive cells. A candidate memory rule then modifies KC-to-MBON synaptic weights. This is a biologically grounded architecture, not a neural-network metaphor wearing a fly costume.

The README is admirably honest about what this does not prove. Synaptic changes happening is not the same as profitable learning emerging, and the project says so plainly. The dopamine stimulation is an engineered signal, not a model of pain or pleasure as the fly experiences it. The gap between "connections change" and "the system learns to trade" is left open, not papered over.

The safety defaults are sensible for something this experimental. Paper trading is the out-of-box mode — real public price data, simulated $100 balance, no API key required. Live mode requires a dedicated Coinbase portfolio capped at 100 USDC, a portfolio-scoped key with no transfer permissions, a $10 maximum order size, and a $20 drawdown ceiling that halts new orders. The README is explicit that the drawdown stop does not liquidate holdings or prevent further losses from existing positions — a meaningful caveat, not a footnote.

The hardware ask is real: several gigabytes for the connectome dataset, 16 GB RAM recommended, a C++17 compiler, Python 3.11. This is not a weekend pip install. The brain state is resumable across runs, which matters when you're simulating 25 million connections per tick.

What makes Stonkfly worth attention is not whether it will ever beat a moving-average crossover strategy. It probably won't. What it demonstrates is that a full biological connectome can be wired into an agentic loop with real-world consequences — sensory input, decision output, reinforcement signal, memory update — using off-the-shelf infrastructure. The Coinbase AgentKit integration is a detail, but it's a telling one: the same ActionProvider pattern that wraps any tool-using agent wraps a fly brain just as cleanly. The abstraction holds.

A real fly connectome wired to a real trading account — the honest admission that profitable learning hasn't been shown is what makes it credible.

Install it

Sources & links