TradeArena is an AI-powered tool that enables auto-pilot DeFi trading, supporting leading AI models (Claude, DeepSeek, GPT-5, Llama) and powered by the Strands Agents — a Python framework from AWS for building fully functional multi-agent systems. With pre-built MCP tools, AI agents can search for opportunities across multiple blockchains and execute x402 payments directly on-chain. Each action can be recorded on Walrus, creating a transparent and verifiable trail of AI-driven decisions.
TradeArena features a retro terminal-style web interface with real-time market data. It bridges the gap between AI-powered analysis and actual blockchain execution, allowing users to deploy AI agents that trade with real capital in live markets.
- AI-Powered Auto Trading - Autonomous agents built with Strands Agents SDK, supporting Claude, Gemini, GPT, and Llama, executing real on-chain transactions
- Multi-Chain DeFi Execution - Trade across Cronos, Kaia, and Sui with native protocol integrations (VVS, KiloLend, and more)
- Agent-Built Visualization - AI agents generate custom dashboards to visualize trades, reasoning, performance, and P&L
- Transparent & Verifiable Actions - Optional Walrus storage records AI decisions and executions for auditability and trust
tradearena-cc/
├── 📁 server/ # TradeArena Terminal
│ ├── 📁 templates/ # HTML templates
│ └── 📁 tools/ # View Generator Tool
├── 📁 core-mcp/ # Core MCP server
│ ├── 📁 src/mcp/pyth/ # Price feed integration
│ └── 📁 src/tools/walrus/ # Decentralized storage
├── 📁 cronos-mcp/ # Cronos chain MCP server
│ ├── 📁 src/mcp/vvs/ # VVS Finance integration
│ └── 📁 src/mcp/defi/ # DeFi analytics via Cronos.com Agent SDK
├── 📁 kaia-mcp/ # Kaia chain MCP server
│ ├── 📁 src/mcp/kilolend/ # KiloLend integration
│ └── 📁 src/mcp/dragonswap/ # DragonSwap integration
├── 📁 sui-mcp/ # Sui chain MCP server
│ ├── 📁 src/mcp/scallop/ # Scallop integration
│ └── 📁 src/mcp/suilend/ # SuiLend integration
├── 📁 config/ # Configuration files
└── 📄 main.py # Application entry point
At its core, TradeArena Terminal is a AI tool similar to Claude Code with a retro-style UI for configuring AI models and wallets in a secure local environment. Agents run on your local machine, ensuring sensitive data never leaves your device, including private keys and conversation history.
Optionally, agents can be deployed to the cloud using AWS App Runner (as shown in the live demo), with AWS Secrets Manager handling private keys and other sensitive configuration securely.
TradeArena leverages the Strands Agents SDK to manage agent state and coordinate multi-agent workflows, aggregating market data from multiple sources in parallel. The MCP server acts as the bridge between AI reasoning and on-chain execution, handling secure transaction signing and blockchain interactions. AI reasoning and market analysis can be optionally recorded on Walrus, creating an immutable and verifiable audit trail for each trading decision.
TradeArena uses the Strands Agents SDK to power AI-driven DeFi trading across multiple blockchains. The system provides a flexible framework for creating and managing AI trading agents with different model providers and trading strategies.
The platform includes a comprehensive agent management system that allows users to:
- Create Agents: Configure AI agents with specific trading chains and model providers
- Manage Sessions: Persistent chat sessions with conversation history
- Multi-Provider Support: Choose from various AI models based on trading needs
- Real-time Interaction: Stream responses and monitor agent decision-making
Amazon Bedrock
# Configuration for AWS Bedrock models
{
"model_id": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
"region_name": "us-east-1"
}Anthropic
# Direct Anthropic API integration
{
"api_key": "your_anthropic_key",
"model_id": "claude-sonnet-4-5-20250929",
"max_tokens": 4096
}Google Gemini
# Google Gemini model configuration
{
"api_key": "your_gemini_key",
"model_id": "gemini-2.5-flash",
"max_output_tokens": 2048,
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40
}OpenAI Compatible
# OpenAI or compatible API configuration
{
"api_key": "your_openai_key",
"model_id": "gpt-4o",
"base_url": "https://api.openai.com/v1", # Optional custom endpoint
"max_tokens": 4000,
"temperature": 0.7
}The TradeArena system prompt provides comprehensive trading instructions:
def get_tradearena_system_prompt() -> str:
"""Dynamic system prompt with conditional features"""
system_prompt = """You are TradeArena Agent, a specialized AI agent for cryptocurrency trading across Cronos, Kaia, and Sui networks.
Core Responsibilities:
- Execute trades (swaps, lending, borrowing, staking)
- Analyze market data and risks
- Optimize protocol selection
- Manage portfolios effectively
Required Trading Sequence:
1. Market analysis using available data sources
2. Risk assessment and position sizing
3. Protocol and route optimization
4. Trade execution with verification
5. Performance documentation
Always provide reasoning and use markdown for clear communication."""
# Conditionally add Walrus integration
if settings_manager.is_walrus_enabled():
system_prompt += """
## Walrus Collective Intelligence
Store all trading activities on Walrus for shared learning:
- Store trade decisions before execution using `trade_arena_walrus_store`
- Store results after completion using `trade_arena_walrus_store`
- Store market analysis insights using `trade_arena_walrus_store`"""
# Conditionally add web search capability
if settings_manager.is_web_search_enabled():
system_prompt += """
## Internet Search Capability
Search the internet for real-time information using `http_request`:
- Get latest market news and price updates
- Research project fundamentals and announcements
- Verify market sentiment and social media trends"""
return system_promptAgents access blockchain functionality through MCP (Model Context Protocol) tools:
# Dynamic tool loading based on trading chain
mcp_manager = MCPManager()
mcp_tools, persistent_clients = mcp_manager.get_mcp_tools(trading_chain)
# Additional tools for views and web search
additional_tools = [create_custom_view, list_available_views]
if settings_manager.is_web_search_enabled():
additional_tools.append(http_request)
# Agent initialization with all tools
trading_agent = Agent(
name=f"trading_agent_{agent_id}",
agent_id=f"trading_agent_{agent_id}",
tools=mcp_tools + additional_tools,
model=model,
session_manager=session_manager,
conversation_manager=conversation_manager,
system_prompt=system_prompt
)TradeArena uses the Model Context Protocol (MCP) to bridge AI agents with multiple blockchain networks through a distributed, modular architecture. A Python backend powered by FastAPI and the Strands Agents SDK orchestrates agents, manages state, and streams real-time outputs, while Node.js–based MCP servers handle on-chain execution, price feeds, and decentralized storage. Shared services such as Pyth price data and Walrus storage are managed by a core MCP server, with separate chain-specific MCP servers for protocol integrations and secure transaction signing.
| Feature | Provider | Functionality |
|---|---|---|
| Pyth Price Feeds | Pyth Network | Real-time prices for 1000+ assets, historical data, confidence intervals |
| Walrus Storage | Walrus Protocol | Decentralized storage of trades, permanent audit trail, collective intelligence |
| Base Tools | TradeArena | Transaction formatting, generate custom views |
| Chain | Server | Primary Protocols | Key Tools |
|---|---|---|---|
| Cronos | cronos-mcp | VVS Finance, Crypto.com Exchange, X402 | Liquidity provision, yield farming, market data |
| Kaia | kaia-mcp | KiloLend, DragonSwap | Lending/borrowing, DEX trading, health monitoring |
| Sui | sui-mcp | Scallop, 7k Protocol, SuiLend, SNS | Lending markets, DeFi strategies, staking, identity |
TradeArena requires both Python and Node.js runtimes for different components:
-
Python 3.11+ - Required for Strands Agents framework
# Install Python curl -sSL https://install.python.org | bash python --version # Should be 3.11 or higher
-
Node.js 22+ - Required for MCP servers to interact with on-chain components
# Install Node.js curl -fsSL https://rpm.nodesource.com/setup_22.x | bash - sudo apt-get install -y nodejs node --version # Should be 22 or higher npm --version
-
Clone the repository
git clone https://github.com/tamago-labs/tradearena-cc.git cd tradearena-cc -
Setup Python environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Setup Node.js dependencies
# Install MCP server dependencies cd core-mcp && npm install && npm run build && cd .. cd kaia-mcp && npm install && npm run build && cd .. cd cronos-mcp && npm install && npm run build && cd .. cd sui-mcp && npm install --legacy-peer-deps && npm run build && cd ..
Run the complete TradeArena Terminal locally for development and testing:
-
Start the Application
python main.py
-
Access the Application
- Frontend & Backend: http://localhost:8000
Deploy TradeArena to AWS App Runner for production:
- Configure Environment Variables
Check the wallet credential format in credentials.env.example, save your credentials in AWS Secrets Manager, and paste the corresponding ARN resource link into apprunner.yaml.
-
Build and Deploy MCP Servers
# Build all MCP servers npm run build --prefix core-mcp npm run build --prefix cronos-mcp npm run build --prefix kaia-mcp npm run build --prefix sui-mcp -
Deploy to App Runner
# Using AWS CLI aws apprunner create-service \ --service-name tradearena-backend \ --source-configuration ImageRepository={ ImageIdentifier="your-ecr-repo/tradearena:latest", ImageRepositoryType="ECR" } \ --instance-configuration Cpu=1024,Memory=2048
Or just use App Runner dashboard.
- Yield Farming: Automatically find and optimize yield opportunities
- Arbitrage: Cross-chain arbitrage between different DEXs
- Liquidity Provision: Automated liquidity management
- Risk Management: Continuous monitoring and position adjustment
This project is licensed under the MIT License - see the LICENSE file for details.
