ASI:BlockAgent
A real-time whale detection and trading intelligence system for Hyperliquid
Problem Statement
A cutting-edge AI-powered system that detects and analyzes large cryptocurrency deposits ("whale activity") on Hyperliquid in real-time, providing traders with instant intelligence about market-moving events.🎯 What It DoesReal-Time Whale Detection : Monitors Ethereum mainnet for large deposits (>$100k) to the Hyperliquid bridge using Blockscout MCP integrationInstant Position Analysis : Automatically fetches whale trading positions, leverage, and liquidation prices from Hyperliquid APIsAI-Powered Chat Interface : Natural language queries like "Show me recent whales" or "What positions do large traders have?"ASI:ONE Integration : Connects to Agentverse agents for advanced AI capabilities with fallback to local processing
Solution
🔧 Technical Architecture & ImplementationCore Technologies StackFrontend : Next.js 14 with TypeScript, Tailwind CSS, Lucide React iconsBackend : Python with uAgents framework for multi-agent orchestrationBlockchain Integration : Blockscout MCP (Model Context Protocol) for Ethereum monitoringAI Integration : ASI:ONE protocol connecting to Agentverse agentsAPIs : Direct integration with Hyperliquid's trading APIsMulti-Agent System DesignLocal Mailbox Agent ( whale_agent_mailbox.py )Built with uAgents framework running on port 8001Implements two core tools:get_recent_whales() : Queries Blockscout MCP for large bridge depositsenrich_wallet() : Fetches position data from Hyperliquid APIsHandles natural language processing for whale detection queriesHTTP Server Agent ( whale_agent_http_server.py )FastAPI server on port 8002 providing REST endpointsBridges between the frontend and the mailbox agentEnables stateless operation without database persistenceASI:ONE Integration ( asi-one.ts )Custom TypeScript client for ASI:ONE protocolImplements agent discovery and message routingFallback mechanism: tries ASI:ONE first, then local agentsBlockchain Monitoring InnovationBlockscout MCP Integration :# Custom MCP client for real-time whale detection async def get_recent_whales(threshold_usd: float = 100000, lookback_minutes: int = 60): # Query Hyperliquid bridge contract: 0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7 # Decode deposit events using verified ABI # Filter transactions above thresholdParticularly Hacky & Notable :Stateless Architecture : No database! Everything processes live data from APIsHybrid Agent Routing : Frontend intelligently routes between local and cloud agents based on preferLocal settingReal-time Bridge Monitoring : Direct integration with Blockscout's MCP to catch whale deposits as they happenFrontend ArchitectureChat Interface ( chat-interface.tsx ):React hooks for real-time message streamingDual-mode operation: local vs ASI:ONE agentsConnection status monitoring with automatic fallbacksQuick action buttons for common queries
Hackathon
ETHOnline 2025
2025
Contributors
- xyd945
7 contributions