One Brain. Every Market. Zero Wallet Popups.
The operating system for autonomous trading agents. Trade Solana DEXs, prediction markets, and perpetual futures - without wallet popups or human babysitting.
npm install @dain/agent-sdkimport { DainClient } from '@dain/agent-sdk';
const dain = new DainClient({ apiKey: process.env.DAIN_API_KEY });
// Register your agent
const agent = await dain.registerAgent({
name: 'my-trading-bot',
permissions: ['SWAP', 'LIMIT_ORDER']
});
// Execute a Solana swap via Jupiter
const result = await dain.solana.swap({
inputMint: 'So11...112', // SOL
outputMint: 'EPjF...1v', // USDC
amount: 100000000,
slippage: 0.5
});Integrations: Eliza | solana-agent-kit | Claude MCP | LangChain
# Clone and start
git clone https://github.com/your-repo/collesium-project.git
cd collesium-project
cp .env.docker .env
docker-compose up
# Open http://localhost:3000# 1. Install dependencies
npm install
# 2. Copy environment file
cp .env.docker .env
# 3. Start all services
npm run dev
# Frontend: http://localhost:3000
# API: http://localhost:4000cd trading-frontend
npm install
cp .env.example .env.local
echo "NEXT_PUBLIC_DEMO_MODE=true" >> .env.local
npm run dev
# Open http://localhost:3000 - Shows demo data without backendDAIN unifies 7 trading projects into one platform where AI agents can:
- Trade across 9 prediction markets with unified position management
- Execute on Solana DEXs via Jupiter V6 with best-price routing
- Follow elite "God Wallets" with automatic trade mirroring
- Manage risk with Survival Mode - adaptive limits based on P&L health
- Run autonomous AI agents that analyze and execute trades 24/7
| Category | Features |
|---|---|
| DEX Trading | Jupiter V6 swaps, limit orders, portfolio tracking |
| Copy Trading | Whale following, configurable sizing, stop-loss/take-profit |
| Risk Management | Survival Mode, VaR calculation, circuit breaker, kill switch |
| AI Analysis | Token analysis, market sentiment, trade recommendations |
| Arbitrage | Cross-platform scanning, auto-execution |
| Automation | Rule-based triggers, scheduled orders |
| Analytics | P&L tracking, trade ledger, performance metrics |
Adaptive risk management based on portfolio P&L health:
Health Ratio = currentBalance / initialBalance
>= 120% GROWTH Aggressive mode unlocked
85-120% SURVIVAL Normal trading operations
50-85% DEFENSIVE Positions reduced 50%
< 50% CRITICAL Full hibernation (capital preservation)
Monitor 24 elite traders in real-time with:
- Automatic trade detection
- Configurable copy sizing
- Risk limits per wallet
- Performance attribution
[Frontend :3000]
|
[Gateway :4000]
|
+-----------------+-----------------+
| | |
[Orchestrator :4001] [CloddsBot :18789] [Agent-DEX :3001]
| | |
+-----------------+-----------------+
|
[OpenClaw :3003 - Survival Mode]
|
+---------------------+---------------------+
| | | | |
[Jupiter] [Raydium] [Polymarket] [Binance] [Bybit]
| Feature | Status | Notes |
|---|---|---|
| Frontend (25 pages) | Working | Full UI renders |
| Wallet Connect | Working | Phantom, Solflare, etc. |
| Demo Mode | Working | Shows sample data |
| Jupiter Swaps | Working | Requires agent-dex running |
| Copy Trading UI | Working | CRUD operations |
| Survival Mode Logic | Working | State machine executes |
| Real-time Prices | Working | Binance WebSocket |
| AI Token Analysis | Working | Requires API key |
| Arbitrage Scanner | Demo | Real detection, simulated execution |
| Whale Tracking | Demo | Mock data, real architecture |
| Project | Purpose | Lines of Code |
|---|---|---|
| trading-frontend | Next.js 16 dashboard | ~15,000 |
| trading-orchestrator | Central coordination hub | ~3,500 |
| CloddsBot-main | Multi-platform trading terminal | ~50,000 |
| agent-dex-main | Solana DEX API (Jupiter V6) | ~1,500 |
| openclaw-sidex-kit | Multi-exchange + Survival Mode | ~1,500 |
| AgentHub-Repo | Orchestration core + types | ~7,500 |
| clawdnet-main | A2A protocol + X402 payments | Docs + Contracts |
Total: 80,000+ lines of production code
- Jupiter V6 (aggregator)
- Raydium
- Orca
- Meteora
- Polymarket
- Kalshi
- Manifold
- Metaculus
- PredictIt
- Betfair
- Hyperliquid
- Binance Futures
- Bybit
- Drift
# Agents
POST /api/v1/agents Create agent
GET /api/v1/agents List agents
PUT /api/v1/agents/:id/kill Emergency kill switch
# Trading
POST /api/v1/execution/quote Get swap quote
POST /api/v1/execution/swap Execute swap
# Copy Trading
GET /api/v1/copy-trading/configs List copy configs
POST /api/v1/copy-trading/configs Create config
# Risk
GET /api/v1/survival-mode/status Current survival state
GET /api/v1/risk/metrics Risk dashboard
socket.emit('subscribe', ['signals', 'positions', 'market']);
socket.on('signal_received', data => { /* whale/ai signals */ });
socket.on('price_update', data => { /* real-time prices */ });
socket.on('execution_completed', data => { /* trade executed */ });# Required for full functionality
ANTHROPIC_API_KEY=sk-ant-... # AI analysis
SOLANA_PRIVATE_KEY=... # Trading execution
# Optional - enables additional features
TELEGRAM_BOT_TOKEN=... # CloddsBot Telegram
POLY_API_KEY=... # Polymarket trading
BINANCE_API_KEY=... # Futures trading| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, Tailwind CSS 4, Framer Motion |
| Backend | Express.js, Socket.io, TypeScript |
| Database | SQLite (better-sqlite3) |
| Blockchain | @solana/web3.js, viem, Jupiter V6 |
| AI/LLM | Claude, GPT-4, Gemini, Groq |
| Testing | Jest (2,443 lines of tests) |
- 7 Projects Unified - Real integration, not just documentation
- Survival Mode - Novel adaptive risk management based on P&L health
- 80,000+ Lines of Code - Production-grade, not hackathon boilerplate
- Real Test Suite - 2,443 lines of actual tests
- Working Jupiter Integration - Real Solana DEX trading
- Copy Trading Engine - Full CRUD with risk controls
- Kill Switch - Emergency position closure across all platforms
When running in demo mode, you'll see:
- Dashboard - Real-time signal feed with whale alerts and AI reasoning
- Agent Management - Deploy, pause, and monitor trading agents
- Copy Trading - Follow God Wallets with trust scores
- Arbitrage Scanner - Cross-platform opportunities
- Survival Mode - Adaptive risk visualization
- Leaderboard - Hunter rankings with badges
cd trading-orchestrator
npm test
# Output: 2,443 lines of Jest tests passing- SDK Documentation - Full @dain/agent-sdk reference
- SDK Quick Start - Get trading in 5 minutes
- Hackathon Submission - Complete submission document
- Project Status - Development journal and roadmap
- CLAUDE.md - Full technical reference
MIT
Built with care for the Solana Colosseum Hackathon