← Back
nftechie

nftechie/stonkfly

A full retained fly-connectome simulation with experimental memory and guarded Coinbase AgentKit trading actions.

View on GitHub ↗
Stars
862
Forks
160
Watchers
862
Open issues
7
Contributors
1
Language
Python
License
MIT License
Default branch
main
Created Sep 10, 2026Updated Sep 10, 2026

Star growth

Today—
This week—
This month—

Star history will appear here once this repo has been tracked for a couple of days.

README

Stonkfly: a pixel fly beside a candlestick chart

Stonkfly

A fly-connectome simulation that can operate a crypto trading account. Actual neural output, actual Coinbase integration. Profitable learning has not been demonstrated.

How it works: Public Coinbase prices become an RGB chart. It stimulates 3,335 brightness inputs and 811 R8 color inputs in the retained MaleCNS v1.0 graph: 166,700 neurons, 25.6 million connections. A fixed neural readout proposes buy, sell or hold. A custom Coinbase AgentKit ActionProvider checks limits and places spot orders through Coinbase Advanced.

Positive portfolio P&L stimulates 15 identified PAM11 dopamine cells; negative P&L stimulates two PPL101 aversive dopamine cells. A candidate memory rule changes existing KC-to-MBON connections. These are engineered reinforcement signals, not modeled pain receptors. Synaptic changes do not establish that it learns to trade profitably. Model and evidence.

Run it

Python 3.11, a C++17 compiler, macOS/Linux. Allow several GB for the dataset and dependencies; 16 GB RAM recommended.

python3.11 -m venv .venv
source .venv/bin/activate
pip install -e '.[test]'
python -m stonkfly prepare
python -m stonkfly run

Default: paper trades, real public BTC-USDC data, $100 simulated balance. No key needed. Local logs, sensory images and resumable brain state go in runs/paper/. Ctrl-C stops it; the same command resumes.

For real orders, first create a dedicated Coinbase Advanced portfolio with at most 100 USDC and a portfolio-scoped ECDSA API key with View + Trade, no Transfer. Copy .env.example to .env, fill it in locally, then run these commands yourself:

python -m stonkfly run --live --preflight-only
python -m stonkfly run --live

Defaults: $10 maximum order including reserved fees, 24 attempts/day, no shorts or leverage. A $20 drawdown stops new orders; it does not liquidate holdings or cap further losses. Operation and recovery.

python -m stonkfly status
python -m pytest -q

The repo does not come funded or connected to anyone’s account. Live execution needs your local credentials and explicit opt-in.