I connected an authentic fruit fly brain to Polymarket order books via WebGL

작성자

카테고리:

← 피드로
DEV Community · Robin-kevin vettik · 2026-09-14 개발(SW)
Cover image for I connected an authentic fruit fly brain to Polymarket order books via WebGL

Robin-kevin vettik

ost algorithmic trading bots rely on standard linear heuristics or basic prompt-chained LLMs. We decided to take an experimental detour into computational neurobiology.

We built Degeneret Fly, an open-source pipeline that drives a WebGL character using authentic reconstructed MaleCNS v1.0 fruit fly neuron morphology (SWC skeletons) and live market telemetry.

How the Pipeline Works

  1. Sensory Drive: Top-of-book depth imbalance and bid/ask spread velocity from Polymarket’s CLOB WebSocket are normalized and injected directly as synaptic current ($I_{syn}$) into sensory neuron clusters.
  2. Biophysical Loop: A continuous 8.333 ms Leaky Integrate-and-Fire (LIF) integration loop computes dynamic membrane voltages ($V_m$) against leak conductances.
  3. Volatility Modulator: Octopamine (the insect stress/arousal neuromodulator) scales with spread velocity, dynamically lowering action potential thresholds.
  4. Kinematics & Execution: Descending neurons (DNge104) gate 3D character animations and execution decisions in real time.

Stack

  • Rendering: Three.js / WebGL2 custom shaders
  • Physics/LIF: TypeScript 8.333 ms integration loop
  • Data: Polymarket CLOB WebSocket API

Live Demo & Open Source

We have the entire visualizer and execution engine streaming live right now:
🔴 Live Stream: https://kick.com/degenaratefly

The repository, SWC parsing scripts, and LIF solver are 100% open source under the MIT license:
💻 GitHub: https://github.com/Rob-bio4/degeneretfly

Feedback on conductance equations and WebGL optimization is welcome!

원문에서 계속 ↗