This project is an autonomous, AI‑assisted trading platform that turns chart context into executable on‑chain strategies. The frontend lets traders capture market context (via a TradingView‑style chart and strategy controls), while the backend analyzes that context using a large language model to propose risk‑aware strategies and, when approved, executes them on Ethereum through battle‑tested smart contracts and the 1inch DEX aggregator. Real‑time prices come from Pyth so decisions reflect accurate market conditions.
What users can do
- Upload/capture a chart view, ask the Agent for analysis, and receive a concise thesis with entry/exit levels, risk/reward and confidence.
- Browse a “Strategy Address Book” that tracks proposed strategies and their current status.
- Simulate or send transactions that implement the selected strategy on chain (Sepolia testnet supported).
- Monitor live price data and order‑book style summaries alongside the chart.
How it works at a high level
- Frontend (Next.js + React + TypeScript) provides the trading UI, chart capture, and wallet interactions.
- Backend (FastAPI, Python) handles chart/feature extraction, LLM‑based technical analysis, and an Agent Orchestrator that validates and translates suggestions into concrete trades.
- Trading Core integrates Pyth price feeds for reliable quotes and 1inch for optimal routing and execution.
- Smart contracts (ERC‑8004 compatible agents, AgentRegistry, and utilities) give the system a safe, modular surface for on‑chain strategy execution.
- Risk controls enforce position limits and sanity checks before any transaction is sent.
Why this matters
By combining LLM reasoning with verifiable on‑chain execution and oracle‑grade prices, the platform shortens the loop from market context → strategy → transaction, making systematic trading faster, safer, and more transparent.
Core technologies
- Frontend: Next.js (App Router), React, TypeScript, shadcn/ui components, TradingView‑style chart widget.
- Backend: FastAPI (Python) with modular services for chart analysis, historical data, support/resistance, and an event bus for orchestrating agent tasks.
- LLM: Claude Sonnet accessed via an OpenRouter client for robust, low‑latency reasoning over chart context and indicators.
- Market data: Dedicated Pyth oracle microservice streams price updates consumed by the Agent Orchestrator.
- Execution: 1inch Aggregation Router for quotes and swaps; transactions are prepared server‑side and surfaced to the user for signing.
- Smart contracts: ERC8004‑style agent architecture with
AgentRegistry and agent templates; Foundry/Hardhat for builds, tests, and ABIs.
- Networks: Ethereum (testnet ready, e.g., Sepolia) with environment‑based RPC configuration.
System design and glue
- The frontend captures chart state and user intent, then calls the backend analysis API. The backend turns this into an LLM prompt enriched with computed indicators (e.g., RSI, support/resistance).
- The LLM returns a structured strategy (entry, stop, targets, risk budget). The Agent Orchestrator validates against risk rules and pulls fresh Pyth prices.
- If approved, it fetches 1inch quotes and prepares a transaction that implements the strategy (swap, position open/close). The user reviews/signs in the browser wallet.
- Strategy drafts and outcomes flow into the “Strategy Address Book” for traceability.
- Contracts provide a deterministic, auditable execution surface and can be extended with new agent templates.
Partner/infra benefits
- Pyth: high‑fidelity prices reduce MEV/slippage surprises and make backtests more realistic.
- 1inch: best‑path routing across liquidity venues with a single integration, simplifying execution logic.
- Claude via OpenRouter: state‑of‑the‑art technical analysis narratives and parameter suggestions with fast iteration.
Notable hacks/engineering highlights
- Prompt‑engineering pipeline that converts noisy chart context into a compact, machine‑readable plan and back into human‑friendly explanations.
- Event‑driven orchestrator that decouples analysis, quoting, risk checks, and transaction preparation.
- ERC8004‑compatible agent scaffolding so strategies can evolve from “advisory” to “autonomous” with minimal code changes.
- End‑to‑end developer ergonomics: env‑templated setup, separate oracle microservice, and a clean Next.js UI for rapid demoability.