A software engineer at Coinbase has introduced Stonkfly, an open-source cryptocurrency trading experiment that employs a simulated fruit fly brain to make trading decisions. The project, released on GitHub, leverages a neural model to process visual cryptocurrency market data and generate buy, sell, or hold actions.
Simulated Brain Processes Real Market Data
Stonkfly gives its virtual fruit fly access to a candlestick chart image depicting live data from Bitcoin, Ethereum, and Solana trading pairs. Instead of numerical pricing, the model converts visual chart information into brightness and color signals, which are sent to a computer-generated neural system representing about 166,700 neurons connected by 25.6 million synapses. This system outputs trading decisions in real time.
A separate position manager interprets these signals to execute simulated trades, taking into account portfolio cash, cryptocurrency allocations, and trading limitations. Stonkfly imposes a 40% overall portfolio target for cryptocurrencies, capping individual assets at 18%. Developers emphasized that these limits are manually set for the experiment and not learned by the fly-brain simulation.
The project runs on real BTC-to-USDC market data and allows paper trading. For permitted live trading, it can route orders through Coinbase Advanced, but imposes a $10 maximum per order.
Stonkfly’s system sends a new market observation to the simulated brain every minute, while portfolio values on the project’s website update each second based on Coinbase price feeds. This separation ensures rapid price reflection but does not impact the simulation’s learning or trading frequency.
Mini dictionary: Stonkfly — An experimental open-source crypto trading system that uses a biologically inspired neural network based on the fruit fly Drosophila’s brain structure. It receives visual input and generates trading actions.
Dopamine-Inspired Reward System Reinforces Trades
Stonkfly introduces a simulated reward mechanism inspired by biological learning. When the virtual portfolio’s value changes by at least 0.01 USDC, the system provides a 200-millisecond feedback signal into the simulated reward circuit. Portfolio gains trigger 15 “dopaminergic” cell models, while losses activate two “aversive” cells. These adjustments impact the network’s plasticity, reinforcing or discouraging certain behaviors within the experiment.
According to the developer, this feedback does not prove that Stonkfly can learn a profitable trading strategy, since feedback is based on the entire portfolio’s outcome and not on specific trades. The system lacks information to establish direct causality between a trading decision and its financial result.
Stonkfly’s feedback mechanism is designed as a scientific experiment rather than an investment tool. The developer cautioned, “The system cannot establish that a specific trade was responsible for a profit or loss.”
Open Source and Research-Focused
Stonkfly is intended to explore how animal-inspired neural models respond to visual market data and financial incentives, not to provide a proven or validated trading system. Researchers and cryptocurrency enthusiasts with at least 16 GB of RAM and familiarity with Python 3.11 and a C++17 compiler can run the software on both macOS and Linux systems.
The experiment’s significance centers on the unconventional approach of employing an animal nervous system model, rather than attempting to outperform conventional crypto trading strategies.
This project reflects growing interest in biologically inspired AI methods: “Stonkfly is a novelty experiment, not a validated trading strategy, but it may encourage further research using neuron-based systems in crypto markets.”
Stonkfly is purely experimental and does not claim that a fruit fly-derived neural network can predict crypto price movements. Its open-source release is designed to stimulate further development and exploration of biologically driven AI trading models.
| Feature | Stonkfly Simulator | Conventional Trading Bot |
|---|---|---|
| Core Model | Fruit fly neural simulation | Rules or standard AI/ML |
| Input Data | Chart images (visual) | Numerical data |
| Reward System | Dopamine-based simulation | Profit/loss without biology |
| Order Limit | $10 per order | Varies, often user-defined |
| Open Source | Yes | Depends on bot |
Broader interest in applying biologically inspired machine learning to financial trading may grow as more researchers experiment with open-source projects like Stonkfly.




