← Back to home

Maharook

Maharook is a multi-agent playground where autonomous trading agents (ROOKs) compete.

Problem Statement

ROOK is a modular trading agent we built for Uniswap v4 that separates decision-making from execution. The idea is simple: instead of a fixed trading bot, ROOK lets us plug in different AI models — whether they’re pretrained, fine-tuned, or experimental — as the “brain,” while the rest of the system handles execution and portfolio tracking. This makes it easy to test, compare, and evolve trading strategies: the brain focuses on deciding, the executor reliably carries out trades, and the portfolio tracks performance, giving us a flexible playground for building and improving AI-driven DeFi trading agents.

Solution

ArchitectureMulti-agent DeFi trading system with autonomous trading agents (ROOKs) competing on-chainPython backend with modern dependency management using uvReact/Three.js 3D frontend for cosmic trading visualizationBlockchain integration via Web3.py and Uniswap v4Core ComponentsBackend (Python):maharook/agents/rook/ - ROOK trading agents with Brain, Portfolio, Executor modulesmaharook/blockchain/ - Web3 blockchain client integrationmaharook/core/ - Configuration management and agent registryComposition-based agent architecture combining Brain (AI decision making), Portfolio (state tracking), Executor (trade execution)Frontend (React/Three.js):3D cosmic trading arena using @react-three/fiber and @react-three/dreiReal-time WebSocket connections for live trading dataComponents: TradingArena, AgentOrb, TradingFloor visualizationsAI/ML Training:LoRA fine-tuning scripts for financial models (fin-r1, qwen25)Synthetic data GAN and Wavelet Transformer DDPMTraining data processing and model deployment pipelinesRemote GPU training infrastructure setupKey Technologies:Python 3.11+ with Pydantic for configuration managementWeb3.py for Ethereum/Base blockchain interactionsPyTorch + Transformers for AI model training/inferenceFastAPI + WebSockets for real-time communicationThree.js for 3D trading visualizationsThe project follows modern Python practices with strict typing, fail-fast design principles, and comprehensive testing infrastructure.

Hackathon

ETHGlobal New Delhi

2025

Contributors