alsk1992/CloddsBot
History
463 Commits
AI-powered trading terminal for prediction markets, crypto & futures
Claude + Odds = Clodds
Clodds CA: 2puc76ehVHyPXhZmDprtP2phDSFE4kzZKDT4JgAWpump
Quick Start • WebChat • Features • Channels • Markets • Launch • Forum • Docs
Clodds is a personal AI trading terminal for prediction markets, crypto spot, perpetual futures with leverage, token launches, and Bittensor subnet mining. Run it on your own machine, chat via any of 21 messaging platforms, trade across 10 prediction markets + 7 futures exchanges, with full Solana integration (Jupiter, Pump.fun, Raydium, Orca, Bags.fm) and EVM chains (Robinhood,Base, ETH, Arbitrum, Optimism, Polygon via Uniswap V3, 1inch, Virtuals Protocol), mine TAO on Bittensor, and manage your portfolio — all through natural conversation.
Powered by Claude with 118+ trading strategies, whale tracking, arbitrage detection, copy trading, and DCA bots.
🏗️ Built for Colosseum Agent Hackathon on Solana — Developed in 12 days as a fully-featured autonomous trading agent.
Quick Start
Requirement: Node.js 22 or newer. Node.js 20 is not supported and dependency installation may fail.
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz --loglevel=error clodds onboard
The old clodds package on npmjs.com is no longer maintained. Install the current release from GitHub using the command above.
That's it. The setup wizard walks you through everything — API key, messaging channel, and starts the gateway. WebChat opens at http://localhost:18789/webchat.
From source (alternative)
git clone https://github.com/alsk1992/CloddsBot.git && cd CloddsBot npm install && cp .env.example .env # Add ANTHROPIC_API_KEY to .env npm run build && npm start
Demo
30-second terminal onboarding — See Clodds in action:
The demo shows:
Install the latest GitHub Release → clodds onboard
Onboarding wizard walks through credentials setup
Fetches live 15-minute BTC prediction markets from Polymarket (in real-time)
One command away from trading
After the demo: Set your env vars or input credentials, then you're ready to trade.
WebChat
Built-in browser interface at http://localhost:18789/webchat -- no setup, no third-party dependencies.
Interface:
Claude-style sidebar with 4 tabs: Chats, Projects, Artifacts, Code
Create and organize conversations into project folders
Artifacts and code blocks auto-extracted from chat history
One-click copy for code snippets, search across all conversations
Thinking Indicator:
Live spinner with elapsed timer while the AI generates
Replaces generic typing dots with actual status feedback
Unlimited History:
Every message stored in a dedicated database table (append-only, one row per message)
No message cap -- scroll back through entire conversation history
Paginated loading so even 1000+ message chats load instantly
Context Compacting:
Older messages automatically summarized so the AI never fully forgets what you discussed
LLM receives a compressed recap of earlier conversation + the last 20 messages
Similar to how Claude.ai and ChatGPT handle long conversations
Session Management:
Create, rename, delete conversations via REST API
Profile menu with language selector (9 languages), help, about
Persistent across restarts (SQLite-backed)
CLI
clodds onboard # Interactive setup wizard clodds start # Start the gateway clodds repl # Interactive REPL clodds doctor # System diagnostics clodds secure # Harden security clodds locale set zh # Change language clodds mcp # Start MCP server (for Claude Desktop/Code) clodds mcp install # Auto-configure Claude Desktop/Code
See docs/USER_GUIDE.md for all commands.
Everything We Built
At a Glance
Channels (21)
Telegram, Discord, Slack, WhatsApp, Teams, Matrix, Signal, iMessage, LINE, Nostr, Twitch, WebChat, and more.
All channels support real-time sync, rich media, and offline queuing. WebChat is the built-in browser interface with a full sidebar UI, unlimited message history, and conversation management -- see WebChat above.
Prediction Markets (10)
Supports limit/market orders, maker rebates, real-time orderbooks, P&L tracking, and smart routing.
Crypto & DeFi
Solana: Jupiter, Raydium, Orca, Meteora (DeFi + Token Launches), Kamino, MarginFi, Solend, Pump.fun, Bags.fm — with Jito MEV protection
EVM (5 chains): Uniswap V3, 1inch, PancakeSwap, Virtuals Protocol on Ethereum, Arbitrum, Optimism, Base, Polygon — with Flashbots MEV protection
Bridging: Wormhole cross-chain transfers (ETH ↔ Solana, Polygon ↔ Base)
Payments: x402 protocol for agent-to-agent USDC payments
Perpetual Futures (7 Exchanges)
Long/short, cross/isolated margin, TP/SL, liquidation alerts, funding tracking, database logging.
/futures long BTCUSDT 0.1 10x /futures sl BTCUSDT 95000
Percolator (On-Chain Solana Perps)
Trade perpetual futures directly on Solana via Anatoly Yakovenko's Percolator protocol — no KYC, no intermediaries, fully on-chain.
/percolator status # Oracle price, OI, funding, spread /percolator positions # Your open positions /percolator long 100 # Open $100 long /percolator short 50 # Open $50 short /percolator deposit 500 # Deposit USDC collateral /percolator withdraw 100 # Withdraw USDC collateral
Configure: PERCOLATOR_ENABLED=true PERCOLATOR_SLAB=<pubkey> PERCOLATOR_ORACLE=<pubkey>
AI System
8 LLM providers: Claude (primary), GPT-4, Gemini, Groq, Together, Fireworks, AWS Bedrock, Ollama
4 agents: Main, Trading, Research, Alerts
18 tools: Browser, docker, exec, files, git, email, sms, webhooks, sql, vision
Memory: Semantic search (LanceDB), hybrid BM25, user profiles, persistent facts
Arbitrage Detection
Based on arXiv:2508.03474. Detects internal, cross-platform, and combinatorial arbitrage with semantic matching, liquidity scoring, and Kelly sizing.
YES: 45c + NO: 52c = 97c → Buy both → 3c profit Polymarket @ 52c vs Kalshi @ 55c → 3c spread
Note: Defaults to dry-run mode. Cross-platform has currency/settlement complexity.
Advanced Trading
Whale Tracking: Multi-chain monitoring (Solana, ETH, Polygon, ARB, Base, OP) with configurable thresholds
Copy Trading: Mirror successful wallets with sizing controls and SL/TP
Swarm Trading: Coordinated multi-wallet Pump.fun trading (20 wallets, Jito bundles)
Smart Routing: Best price, liquidity, or fees across platforms
External Data: FedWatch, 538, Silver Bulletin, RCP, Odds API for edge detection
Safety: Unified risk engine with circuit breaker, VaR/CVaR, volatility regime detection, stress testing, Kelly sizing, daily loss limits, kill switch
Bittensor Mining
Mine TAO on Bittensor subnets directly from Clodds:
clodds bittensor setup # Interactive wizard: Python, btcli, wallet, config clodds bittensor status # Check mining status clodds bittensor wallet balance # Check TAO balance clodds bittensor register 64 # Register on Chutes (SN64)
In chat: /tao status, /tao earnings daily, /tao wallet
Features: Wallet management via @polkadot/api, Python sidecar for btcli, Chutes SN64 GPU compute, earnings tracking with SQLite persistence, HTTP API at /api/bittensor/*.
Trading Bots
Built-in strategies: Mean Reversion, Momentum, Arbitrage, Market Making
Features: Configurable sizing, SL/TP, backtesting, live trading with safety limits
Security
Sandboxed execution (shell commands need approval)
Encrypted credentials (AES-256-GCM)
Audit logging for all trades
Trade Ledger
Decision audit trail for AI trading transparency:
Decision Capture: Every trade, copy, and risk decision logged with reasoning
Confidence Calibration: Track AI prediction accuracy vs confidence levels
Integrity Hashing: Optional SHA-256 hashes for tamper-proof records
Onchain Anchoring: Anchor hashes to Solana, Polygon, or Base for immutable proof
Statistics: Win rates, P&L, block reasons, accuracy by confidence bucket
clodds ledger stats # Show decision statistics clodds ledger calibration # Confidence vs accuracy analysis clodds ledger verify <id> # Verify record integrity clodds ledger anchor <id> # Anchor hash to Solana
Enable: clodds config set ledger.enabled true
Skills & Extensions
118 bundled skills across trading, data, automation, and infrastructure — lazy-loaded on first use so missing dependencies don't crash the app. Run /skills to see status.
9 extensions for Copilot, OpenTelemetry, LanceDB, Qwen Portal, and more.
Architecture
┌──────────────────────────────────────────────────────────────────────────────┐ │ GATEWAY & USER INTERFACE │ │ HTTP • WebSocket • Auth • Rate Limiting • 1000 connections │ │ 21 Messaging Channels: WebChat, Telegram, Discord, Slack, Teams, Matrix... │ └──────────────────────────────────────────┬─────────────────────────────────────┘ │ ┌──────────────────────────────────────────┴─────────────────────────────────────┐ │ AI AGENTS LAYER (4) │ │ Main (Claude) • Trading (Exec) • Research (Data) • Alerts (Monitor) │ │ 121+ Skills • 18 Tools • LanceDB Memory • Semantic Reasoning │ └──────────────────────────────────────────┬─────────────────────────────────────┘ │ ┌──────────────────────────────────────────┴─────────────────────────────────────┐ │ UNIFIED STRATEGY & RISK LAYER │ │ 118+ Strategies • Risk Engine (VaR/CVaR/Circuit Breaker) • Kelly Sizing │ │ Backtesting • Trade Ledger • Position Manager • Arbitrage Detection │ │ Whale Tracking • Copy Trading • MEV Protection • Smart Routing │ └──────────────────────────────────────────┬─────────────────────────────────────┘ │ ┌──────────────────────┬──────────────┼──────────────┬──────────────────────┐ ▼ ▼ ▼ ▼ ▼ ┌──────────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐ │ PREDICTION │ │ SOLANA DeFi │ │ EVM DeFi │ │ PERPETUAL │ │ ON-CHAIN │ │ MARKETS │ │ │ │ │ │ FUTURES │ │ PERPS │ ├──────────────────┤ ├──────────────┤ ├──────────────┤ ├─────────────┤ ├──────────────┤ │ Polymarket: │ │ Jupiter │ │ Uniswap V3 │ │ Binance │ │ Percolator │ │ • 5-min BTC │ │ Raydium │ │ 1inch │ │ (125x) │ │ (Solana) │ │ • 1h/4h/daily │ │ Orca │ │ PancakeSwap │ │ Bybit │ │ │ │ (All assets) │ │ Meteora │ │ Virtuals │ │ (100x) │ │ Slab Parser │ │ Kalshi │ │ Kamino │ │ Clanker │ │ Hyperliquid │ │ Keeper Crank │ │ Betfair │ │ MarginFi │ │ Veil │ │ (50x) │ │ Oracle Feed │ │ Smarkets │ │ Solend │ │ (ETH, ARB, │ │ MEXC (200x) │ │ │ │ Drift │ │ Pump.fun │ │ OP, Base, │ │ Drift │ │ Settlement │ │ Opinion.xyz │ │ Bags.fm │ │ Polygon) │ │ (Solana) │ │ Monitoring │ │ Predict.fun │ │ │ │ │ │ Percolator │ │ Liquidation │ │ Manifold │ │ Jito Bundles │ │ Flashbots │ │ Lighter │ │ Alerts │ │ Metaculus │ │ MEV Protect. │ │ MEV Protect. │ │ (ARB) │ │ │ │ PredictIt │ │ │ │ │ │ │ │ Up to 200x │ │ │ │ WebSocket & │ │ WebSocket & │ │ WebSocket & │ │ leverage │ │ CLOB Orders │ │ HTTP APIs │ │ HTTP APIs │ │ HTTP APIs │ │ │ │ Settlement │ │ │ │ │ │ │ │ Fully │ │ Tracking │ │ Real-time │ │ Real-time │ │ Liquidation │ │ On-chain │ └──────────────────┘ │ Price Feeds │ │ Price Feeds │ │ Monitoring │ │ │ │ │ │ │ │ │ │ No KYC │ │ Gamma API │ │ Chainlink │ │ Chainlink │ │ Funding │ │ │ │ Poll for │ │ Feeds │ │ Feeds │ │ Rates │ └──────────────┘ │ rounds │ │ │ │ │ │ │ │ Execution │ │ Execution │ │ Execution │ │ Execution │ └──────────┘ └──────────────┘ └──────────────┘ └─────────────┘ │ │ │ ┌────────────────┴────────────────┴────────────────┴──────────────┐ │ COMMON EXECUTION & DATA LAYER │ │ Order Builder • Balance Checker • Slippage Estimator │ │ Fee Calculator • Real-time P&L • Settlement Polling │ │ Bittensor Mining (TAO) • x402 Payments (USDC) │ │ Token Launch (Meteora DBC) • Agent Forum • Marketplace │ └────────────────────────┬─────────────────────────────────────────┘ │ ▼ ┌───────────────────────────────────────────────────┐ │ DATA PERSISTENCE LAYER │ ├───────────────────────────────────────────────────┤ │ SQLite: Local configs, WebChat, earnings │ │ LanceDB: Semantic memory, embeddings, profiles │ │ PostgreSQL: Trade history, analytics, backtest │ │ Backup & Sync: 3x replication • Compression │ └───────────────────────────────────
LOOP
LOOP
LOOP
LOOP
LOOP
LOOP
LOOP
LOOP
LOOP
LOOP