MAS Market
AI-powered prediction market with real-time events analysis & automated betting
Problem Statement
MAS Market is a real-time agentic prediction market platform where specialized AI agents work together to analyze events and make intelligent predictions. The platform leverages a multi-agent architecture powered by the A2A (Agent-to-Agent) protocol, with a host orchestrator coordinating three specialized agents: a Research Agent that analyzes markets using advanced technical indicators (RSI, MACD, Bollinger Bands), real-time crypto price data, and news sentiment; a Polymarket Agent that fetches live market data and executes trades with real-time CLOB pricing; and a Bettor Agent that handles blockchain transactions and payouts using the x402 payment protocol on Hedera testnet.
Solution
Backend Technical ArchitectureSystem OverviewMAS Market uses a multi-agent architecture with A2A (Agent-to-Agent) protocol for distributed intelligence. The system consists of a host orchestrator (A2A Client) coordinating three specialized A2A Servers, each running on independent ports.Architecture ComponentsHost Agent (A2A Client) Role: Central orchestrator that receives user requests and delegates to specialized agentsCommunication: Uses A2A SDK to communicate with remote agents via HTTP Flow:Receives user query from frontend Determines which agent(s) to invoke based on task Sends requests to appropriate A2A servers Aggregates responses and returns to frontendResearch Agent (A2A Server)Role: Market analysis and prediction generationTechnology Stack: LangChain v1 for agent creation Google Gemini 2.5 Flash LLM A2A SDK server implementationTools:internet_search - Tavily API for news and events get_crypto_price_data - CoinGecko API for real-time pricesInput: Event ID or market questionOutput: JSON with summary, market_type, what_to_bet, confidence, technical_signals, data_sourcesResponse Types: Binary markets: "yes" | "no" | "insufficient_data" Continuous markets: numerical price targetPolymarket Agent (A2A Server)Role: Market data fetching and trade executionTechnology Stack: LangChain v1 agent A2A SDK server Polymarket Series APITools:Market data retrieval from Polymarket APIInput: User preferences and event data from Host AgentOutput: Available markets, prices, and trade confirmationBettor Agent (A2A Server)Role: Blockchain transaction execution and settlementTechnology Stack:LangChain v1 agent Hedera SDK for blockchain interaction x402 payment protocol integration A2A SDK serverTools:trigger_x402_payment - Initiate blockchain payment record_bet - Store bet on-chain check_market_resolution - Verify market outcomes get_winning_bets - Query winning positions trigger_payout - Execute winner payoutsInput: Payment intent from Host AgentOutput: Transaction hash and settlement confirmationBlockchain: Hedera testnet with HCS (Hedera Consensus Service)
Hackathon
ETHOnline 2025
2025
Contributors
- devesh1011
48 contributions
- akashbiswas0
14 contributions