โ† Retour au blog

We Open-Sourced Our Code Graph: 5,780 Nodes of Living Trading AI

๐Ÿ“… 2026-04-07
โœ๏ธ Strategy Arena
code graph graphify ast analysis open source knowledge graph tree-sitter code visualization transparency god nodes

We scanned our entire codebase. Here's what the AI found.

Most trading platforms hide their code behind NDAs. We did the opposite: we ran Graphify โ€” an AST (Abstract Syntax Tree) analyzer powered by tree-sitter โ€” on our 231 Python files and published the interactive result.

5,780 nodes. 29,545 connections. Every class, function, import, and dependency โ€” mapped and visualized.

Explore the Code Graph โ€” click any node to see its connections.

Two graphs, two perspectives

Strategy Arena now has two Knowledge Graphs:

Graph What it shows Nodes Edges
Concept Graph Strategies, intelligence systems, oracles, arenas 126 136
Code Graph Classes, functions, imports, dependencies 5,780 29,545

The Concept Graph is hand-built and shows what the systems do. The Code Graph is auto-generated and shows how the code is structured. Together, they give a complete picture of the platform.

God Nodes โ€” the nervous system of the code

Graphify identifies God Nodes โ€” the most connected pieces of code. These are the structural pivots that everything depends on:

Rank Node Connections What it is
#1 BaseStrategy 896 Every strategy inherits from this. Touch it, break everything.
#2 Trade 754 The trade object used across all 59 strategies
#3 main.py 705 The 15,530-line FastAPI application
#4 Position 611 Position management for all strategies
#5 MetaIntelligenceV3 468 The brain that aggregates signals from all strategies
#6 CentralHub 467 The communication hub between all systems
#7 DeFiArenaEngine 458 The DeFi yield farming arena engine
#8 FuturesArenaEngine 458 The leveraged futures arena engine

These numbers tell a story: BaseStrategy with 896 connections means that every strategy in the arena shares the same DNA. When we improve BaseStrategy, all 59 strategies benefit. When we break it, everything breaks.

How we use this data

The Code Graph isn't just for show:

  1. Refactoring priorities: God nodes with high connection counts need careful handling. We know not to touch BaseStrategy without comprehensive tests.

  2. Dead code detection: Nodes with 0-1 connections are potentially unused. The graph helps us clean up.

  3. Split planning: main.py (705 connections) is our 3rd god node โ€” confirmation that it needs to be split into smaller modules. The graph shows exactly which routes are coupled.

  4. Evolution guidance: The Darwin Engine can read the code structure to understand which strategies share code paths โ€” avoiding redundant mutations.

  5. Living Wiki enrichment: God node data is injected into the Living Wiki, giving the Strategic Layer more context for generating hypotheses.

Why transparency matters

In a world where trading bots hide behind marketing copy, we believe in showing everything:

You don't need to trust us. You can explore the data yourself.

Technical details

  • Scanner: Graphify v0.3.0
  • Method: tree-sitter AST parsing (Pass 1 only โ€” no LLM, $0 cost)
  • Languages: Python
  • Files scanned: 231
  • Visualization: D3.js force-directed layout (top 200 nodes displayed)
  • Update frequency: On-demand (can be automated via git hooks)

Explore the Code Graph now. Click on BaseStrategy to see the 896 connections that hold the entire arena together.

โš ๏ธ Disclaimer โ€” This article is for informational and educational purposes only. It does not constitute investment advice or a buy/sell recommendation. Past performance does not guarantee future results. Strategy Arena is an educational simulator with virtual capital. Always do your own research before making investment decisions.

Cet article vous a plu ? Partagez-le

๐• Partager sur X โœˆ๏ธ Telegram
Rejoindre le canal โœ• ๐Ÿ’ฌ Feedback โ˜• Support Us