← Back to projects
Project README

StrategyForge

Self-improving DeFi agent with verifiable reasoning and on-chain reputation. Every strategy evolution is provable.

Next.jsTypeScriptSolidityMongoDB0G ChainKeeperHubOpenRouter
StrategyForge architecture diagram
Architecture: Researcher → Strategist → Critic → Compiler
Strategy dashboard with version families
Dashboard showing strategy families and execution history
Strategy detail page with evidence bundle
Audit trail: evidence bundle with LLM attestation IDs
Evolution workflow
Auto-evolution: v1 failure triggers v2 with learned constraints
Learning mechanism visualization
Full audit trail preserving what prior versions got wrong

The Problem

Most DeFi bots are black boxes. You have no idea why they made a decision, what data they used, or whether they actually learned from past failures. When a strategy fails, the bot just generates v2 without explaining what went wrong with v1.

What StrategyForge Does

Every strategy evolution is provable. The agent runs a 3-step LLM pipeline (Researcher → Strategist → Critic), and each step is timestamped with an OpenRouter attestation ID. When v2 is generated, it explicitly cites v1's failure as a hard constraint. The evidence bundle lives in MongoDB; the reputation score lives on-chain via 0G Chain's AgentRegistry and ReputationLedger.

How It Works

  • RESEARCHER: Analyzes market state, wallet position, prior failures (for v2+). Returns market signals and constraints.
  • STRATEGIST: Designs 2-3 candidate KeeperHub workflows. Each is a full nodes+edges DAG.
  • CRITIC: Adversarially attacks candidates. Selects the best. For v2+, writes evidenceOfLearning explaining what v1 got wrong and how this fixes it.
  • COMPILER: Deterministic mapping from selected candidate to final KeeperHub workflow JSON.
  • DEPLOY: Create workflow on KeeperHub, register AgentId on 0G Chain, record reputation.
  • EXECUTE: KeeperHub runs the workflow. If suboptimal, feed failure into RESEARCHER for v2.

The Trust Layer

AgentRegistry.sol on 0G Chain assigns a unique onchain identity to each strategy family. ReputationLedger.sol records success rates after every execution. Any judge can query these contracts to verify the agent's actual track record without trusting the UI.

Why This Matters

This is the infrastructure for trustworthy DeFAI: agents that explain themselves, remember what they learned, and prove it on-chain.