Fly Brain Simulation Trades Crypto Using Real Neural Reinforcement Signals 🔗
Simulated dopamine responses from portfolio P&L modify synaptic connections in a retained Drosophila connectome model
The nftechie/stonkfly project simulates a fruit fly’s brain to drive cryptocurrency trading decisions through biologically inspired reinforcement learning. It maps live Coinbase BTC-USDC price data into RGB and color-channel inputs that stimulate 3,335 brightness and 811 color sensors tied to a retained male CNS connectome comprising 166,700 neurons and 25.
6 million synaptic connections. Neural activity generates buy, sell, or hold signals, which are validated and executed via a custom Coinbase AgentKit ActionProvider interfacing with Coinbase Advanced. Profitable trades trigger artificial dopamine release in 15 PAM11 cells, reinforcing synaptic changes from Kenyon cells to mushroom body output neurons (MBONs), while losses activate two aversive PPL101 cells. These engineered reinforcement signals update connection weights in real time, simulating a form of experiential learning without claiming profitability or cognitive modeling of pain or reward. The simulation runs locally with paper trading by default, using a $100 simulated balance and public market data, requiring no API keys. For live trading, users must configure a dedicated Coinbase Advanced portfolio with limited funds and scoped API credentials, then manually opt in. The system logs sensory inputs, neural states, and portfolio changes to enable resumable runs. Built in Python 3.11 with a C++17 dependency for performance-critical components, it demands ~16 GB RAM and several gigabytes for datasets. Despite its novelty in bridging neuromorphic simulation and automated trading, the project explicitly states that profitable learning has not been demonstrated, and synaptic changes do not equate to effective trading strategy acquisition.
The catch: The simulation has not demonstrated profitable learning, and its reinforcement mechanism remains an unvalidated analogy to biological reward systems rather than a proven adaptive trader.
Why this leads today It offers a concrete, biologically inspired framework for testing autonomous decision-making in high-stakes financial systems, bridging neuroscience and practical AI agent safety.
- Researchers testing neuromorphic models in financial decision loops
- Developers exploring biologically inspired reinforcement learning systems
- Educators demonstrating neural simulation interfacing with real-world APIs
Source: nftechie/stonkfly — based on the project README.