AI Skill Hub 推荐使用:DRADIS 是一款优质的AI工具。AI 综合评分 6.3 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
DRADIS 是一款基于 Rust 开发的开源工具,专注于 installable、arbitrage、bot 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
DRADIS 是一款基于 Rust 开发的开源工具,专注于 installable、arbitrage、bot 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:cargo install(推荐) cargo install dradis # 方式二:从源码编译 git clone https://github.com/mbordash/DRADIS cd DRADIS cargo build --release # 二进制在 ./target/release/dradis
# 查看帮助 dradis --help # 基本运行 dradis [options] <input> # 详细使用说明请查阅文档 # https://github.com/mbordash/DRADIS
# dradis 配置说明 # 查看配置选项 dradis --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export DRADIS_CONFIG="/path/to/config.yml"
Direct Reaction And Dynamic Intelligence System — Low-latency Rust prediction-market trading bot for Polymarket. Six autonomous strategies (Momentum, Maker, Arbitrage, Time Decay, Basis, GBoost ML), real-time Next.js Control Tower, and an LLM Advisor that delivers optimization recommendations via Ollama (local or remote) + Telegram & OpenClaw.
WARNING: This is ALPHA software. You will probably lose money. Start in GHOST mode and tune before going live. Make sure to regularly pull updates as our own LLM advises on config and Viper strategy impls daily.
---
DRADIS is not just a bot; it is a comprehensive trading automation platform for prediction markets like Polymarket. Built in Rust for maximum concurrency and memory safety, it evaluates the selected markets every 50ms, coordinating multiple autonomous strategies to preserve capital and place orders where it sees inefficiencies.
Unlike standard linear scripts, DRADIS uses a Tokio-powered orchestrator to manage telemetry (WebSockets), signal processing (Raptors — the recon layer that scouts external signals like Binance price feeds and funding rates), and tactical execution across six distinct Viper strategy classes. A built-in LLM Advisor periodically analyzes completed trades and delivers actionable optimization recommendations directly to your Telegram channel — using any locally-running Ollama model you choose. You can also build your own Viper using our implementation guide.
---
| Panel | What it shows |
|---|---|
| **Status Bar** | Engine online/offline indicator, GHOST mode badge, active market, current BTC Raptor price, session P&L |
| **P&L Chart** | Rolling equity curve across recent snapshots (Recharts area chart) |
| **Viper Squadron Cards** | One card per strategy — live enabled/disabled toggle, all tunable parameters editable inline without a restart |
| **Trade Log** | Last N completed trades with strategy, side, entry/exit prices, shares, P&L, and exit reason |
---
chmod +x deploy-multi.sh && ./deploy-multi.sh
After ~5 minutes the stack is live:
| Service | URL |
|---|---|
| **Control Tower** | `http://<host>:3002` |
| **DRADIS REST API** | `http://<host>:9000/api/health` |
| **Ollama** | `http://<host>:11434/api/tags` (internal) |
**Verify Ollama is healthy** (run from your local machine):bash curl -s http://<host>:11434/api/tags | python3 -m json.tool ```
Prerequisites: Docker on the remote host, Rust 1.95+ only needed for local builds. See the Control Tower section for dashboard setup and the Setup section for all tunable parameters.
---
Open these ports in your AWS Security Group first:
| Port | Service | Visibility |
|---|---|---|
9000 | DRADIS axum API | Internal only (optional to expose) |
3002 | Control Tower UI | Public (browser access) |
Both containers share a private Docker network (dradis-net) — the UI calls the API via internal DNS (http://dradis-btc:9000) so port 9000 never needs to be public-facing.
./deploy-multi.sh
This will: 1. SCP all source files to your server 2. Build the DRADIS Rust image on the server (cross-compiles natively) 3. Build the Control Tower Next.js image (3-stage: deps → build → minimal runner) 4. Start both containers with --restart unless-stopped 5. Tail the BTC engine logs
After deploy: - Dashboard: http://YOUR_SERVER_IP:3002 (login with CT_USERNAME / CT_PASSWORD from .env) - API Health: http://YOUR_SERVER_IP:9000/api/health
Check container logs remotely:
ssh -i ~/.ssh/your-key.pem ubuntu@YOUR_SERVER_IP "docker logs -f dradis-btc --tail 50"
ssh -i ~/.ssh/your-key.pem ubuntu@YOUR_SERVER_IP "docker logs control-tower --tail 50"
---
profiles.toml) — named configurations that each bind a market, a viper subset, capital allocation, and risk overrides; the current config.rs becomes the implicit "default" profile with zero behavior changeprofile_id so A/B tests across viper combinations have independent ledgersDynamicConfig patches via a Telegram approval gate (reply YES to apply)```bash
| Strategy | Capital Budget | Risk Model | Primary Venue | ||
|---|---|---|---|---|---|
| MomentumStrategy | $15 | Gross one-sided | **Hourly** | ||
| MakerStrategy | $12 | Net \ | YES−NO\ | **Window** | |
| ArbitrageStrategy | $35 per leg | Gross hedged | **Window** | ||
| TimeDecayStrategy | $36 per leg | Gross hedged | **Hourly** | ||
| BasisStrategy | $15 | Gross one-sided | **Window** | ||
| GboostStrategy | $4 | Gross one-sided | **Window** |
---
git clone https://github.com/youruser/dradis.git && cd dradis cp .env.example .env # fill in POLYMARKET_PRIVATE_KEY, POLYGON_RPC_URL, TELEGRAM tokens, etc. cp deploy-multi.sh.example deploy-multi.sh # fill in HOST, USER, KEY
bash
Every parameter shown in the Viper cards maps directly to the runtime DynamicConfig. Editing a value and pressing Enter (or toggling the switch) sends a PATCH /api/config request to the DRADIS engine — no restart required. Changes take effect on the next 50ms tick.
CT_USERNAME=starbuck CT_PASSWORD=your-strong-password
// src/config.rs
pub const ENABLE_LLM_ADVISOR: bool = true; // master switch (default: false)
pub const LLM_ADVISOR_INTERVAL_SECS: u64 = 1800; // how often to run (30 min default)
pub const LLM_ADVISOR_TRADES_LOOKBACK: i64 = 20; // trades per analysis window
pub const LLM_OLLAMA_URL: &str = "http://localhost:11434"; // Ollama base URL
pub const LLM_OLLAMA_MODEL: &str = "llama3.2"; // model name
Override the URL and model at runtime without rebuilding:
```bash
OLLAMA_URL=http://192.168.1.10:11434 # remote Ollama instance (GPU box, etc.) OLLAMA_MODEL=mistral # any model installed in your Ollama ```
The advisor requires the same TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID env vars already used for trade alerts. If Telegram credentials are absent, the full analysis is written to the engine log instead.
The auto-settlement feature (merging/redeeming positions after market resolution) requires a reliable, paid Polygon (EVM) RPC endpoint. Free public RPCs (polygon-rpc.com, Ankr, PublicNode) are unsuitable — they will fail with API key or nonce errors during settlement.
⚠️ Helius is a Solana-only RPC — do not use it for DRADIS. Using a Solana endpoint will result in "Method not found" errors.
Recommended providers (all with free tiers, all support Polygon): - Alchemy — recommended; excellent free tier, easy Polygon mainnet setup - QuickNode — reliable, industry standard - Infura — simple setup, generous free tier
Once you have an API key, add it to .env: ```bash
src/config.rs is NOT included in this repository. It is your personal trading configuration and is intentionally gitignored so your own tuning stays private.
Three ready-to-use starting profiles are provided. You must copy one to src/config.rs before you can build.
| Profile | File | Wallet Size | Risk | Strategies Active |
|---|---|---|---|---|
| Conservative | src/config.conservative.rs.example | < $100 | Low | Maker, Time Decay only |
| Balanced | src/config.balanced.rs.example | $100–$300 | Medium | All six, moderate sizing |
| Aggressive | src/config.aggressive.rs.example | $200+ | High | All six, maximum sizing |
```bash
TELEGRAM_BOT_TOKEN=123456789:AABBCCdd... TELEGRAM_CHAT_ID=-100123456789
rust // src/config.rs pub const ENABLE_TELEGRAM: bool = true; ```
---
DRADIS_API_KEY=replace-with-a-strong-random-secret
**How it works end-to-end:**
OpenClaw ──► X-API-Key: <secret> ──► DRADIS :9000 ✅ allowed curl (no key) ──► DRADIS :9000 ❌ 401 Unauthorized Control Tower (browser) ──► Next.js proxy ──► injects key server-side ──► DRADIS :9000 ✅ allowed
The Control Tower proxy (`/api/[...path]/route.ts`) reads `DRADIS_API_KEY` as a **server-side env var** and forwards it automatically — the key never appears in the browser JS bundle. Local development with no `DRADIS_API_KEY` set works exactly as before with no login prompt.
Generate a strong key:bash openssl rand -hex 32
#### Example Cloudflare Tunnel setup
bash
POLYGON_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/YOUR_API_KEY ```
The startup will fail with a clear error if POLYGON_RPC_URL is not set.
OpenClaw is a personal AI assistant that executes tasks from plain English via WhatsApp, Telegram, or any chat app. Because DRADIS exposes a clean REST API, it can be registered as an OpenClaw skill — giving you full voice/text control of your trading bot from your phone, no dashboard required.
openclaw skills install dradis-tactical-command
Once installed, OpenClaw maps natural language to DRADIS API calls automatically:
| You say | OpenClaw calls | Effect |
|---|---|---|
| *"Pause GBoost"* | PATCH /api/config {"enable_gboost": false} | Stops GBoost entries on next tick |
| *"Enable ghost mode"* | PATCH /api/config {"ghost_mode": true} | Switches to paper trading instantly |
| *"Go live"* | PATCH /api/config {"ghost_mode": false} | Enables real order execution |
| *"What's my P&L today?"* | GET /api/trades → summarize | Returns session profit/loss |
| *"Show open positions"* | GET /api/positions | Lists all in-flight positions |
| *"What is DRADIS doing right now?"* | GET /api/status | Reports active strategies and current market |
| *"Tighten GBoost stop loss to 8%"* | PATCH /api/config {"gboost_stop_loss_pct": "0.08"} | Updates risk parameter live |
| *"Turn off everything except Arbitrage"* | PATCH /api/config (multi-field) | Disables all non-Arb strategies |
OpenClaw needs to reach your DRADIS API over the internet. Port 9000 is internal by default — expose it securely using one of:
cloudflared tunnel) — zero open inbound ports, free tier available, recommended9000 to a specific IP only (your phone's egress)DRADIS has built-in optional API key enforcement. Set DRADIS_API_KEY in your .env file and every request to the engine must include a matching X-API-Key header:
```bash
Why Rust instead of Python?
Rust provides fearless concurrency. Evaluating five strategies concurrently every 50ms requires a multi-threaded runtime without a Global Interpreter Lock (GIL) or unpredictable Garbage Collection (GC) pauses.
Why isn't the bot trading?
Check in order: 1. Is GHOST_MODE true? 2. Fees: Taker strategies skip high-fee (1000 bps) markets. 3. Thresholds: Check your thresholds in config.rs. Momentum and Basis require specific volatility/skew to fire. 4. Venue: Maker/Arb/Basis require a Window or Daily market to be active.
I see Momentum and Maker trading the same token — is that a bug?
No. Each strategy has its own independent position book. They can "co-habitate" on the same token without collision.
How do I adjust risk?
Edit the per-strategy constants in src/config.rs, specifically the _MAX_EXPOSURE_USDC values.
How can I optimize my host for maximum performance?
See docs/PERFORMANCE_TUNING.md for a full guide covering kernel sysctl tuning, CPU frequency governor, CPU/IRQ affinity pinning, Docker ulimits, and instance selection tips for AWS and OCI.
Why doesn't DRADIS include a backtesting framework?
Short answer: Ghost mode running against live markets is a better substitute than it first appears, and a traditional backtester would introduce more problems than it solves for prediction-market trading.
Here's why:
| Concern | Backtester | Ghost Mode |
|---|---|---|
| Market data fidelity | Requires storing full L2 orderbook snapshots (expensive, lossy) | Real-time Polymarket CLOB feed — 100% authentic |
| Strategy fidelity | Must mock async execution, cooldown maps, drawdown guards | Full production code path runs unchanged |
| Fill simulation | Assumes fills that may never occur in thin prediction markets | No fills in ghost mode — no wishful thinking |
| Regime coverage | Only covers periods you've collected data for | Every session captures current live regime |
| Build/maintain cost | Significant — separate data pipeline, replay harness, fill model | Zero — GHOST_MODE = true in config.rs |
The recommended workflow instead:
GHOST_MODE = true in config.rs and run overnight or across a full session.session.file and run tools/session_parser.py (see tools/README.md) for a per-trade breakdown with market context.config.rs constants → run another ghost session.This loop uses real market data, real strategy logic, and zero capital risk — which is exactly what a backtester promises but rarely delivers cleanly for illiquid, event-driven prediction markets.
I pulled an update and GBoost is producing garbage predictions / the model won't load.
The GBoost model is incompatible across feature vector changes. The model file name in GBOOST_MODEL_PATH is intentionally versioned (e.g. gboost_model_v14f.json) so that a stale on-disk model with the wrong input dimension is never silently loaded against code expecting a different one.
If you pull an update and NUM_FEATURES in src/strategies/gboost_impl.rs has changed, you must:
1. Check whether the suffix in GBOOST_MODEL_PATH (in src/config.rs / your example profile) matches the new feature count. 2. If it doesn't — or if the old model file still exists under the old name — delete the old file and let the bot retrain from scratch:
rm -f logs/gboost_model_*.json
3. Rebuild and restart. The model will cold-start, collect GBOOST_MIN_TRAINING_SAMPLES ticks (~16 seconds at 50 ms), then begin predicting.
The safe pattern when adding a new feature: bump the suffix in GBOOST_MODEL_PATH (e.g. v14f → v15f). The old file is ignored, no manual cleanup needed.
How do I tune strategy parameters without restarting?
Use the Control Tower dashboard (http://localhost:3002 locally, or your server IP in production). Click any parameter value in a Viper card to edit it inline — changes are applied live via PATCH /api/config on the next engine tick. Toggle switches enable/disable strategies instantly. No rebuild or restart needed.
The Control Tower shows "Offline".
The UI polls GET /api/health every 5 seconds. "Offline" means the DRADIS engine isn't reachable. Check: 1. Is DRADIS running? (ps aux | grep dradis or docker ps) 2. Is the API port open? (curl http://localhost:9000/api/health) 3. In Docker — is the Control Tower container on the same dradis-net network as dradis-btc?
How do I enable the LLM Advisor?
ollama pull llama3.2src/config.rs, set ENABLE_LLM_ADVISOR: bool = truecargo build --releaseTELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID are set in your .env (same as trade alerts)OLLAMA_URL if your Ollama instance is on a different hostThe advisor will fire after the first interval (LLM_ADVISOR_INTERVAL_SECS, default 30 min) once at least one trade has been recorded. If Telegram creds are absent, the full analysis is written to the engine log instead.
The LLM Advisor isn't sending messages.
Check in order: 1. Is ENABLE_LLM_ADVISOR = true in config.rs? (default is false) 2. Is Ollama running and reachable? curl http://localhost:11434/api/tags 3. Is the model installed? ollama list — if not, ollama pull llama3.2 4. Are TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID set? If not, check the engine log — the analysis is printed there instead. 5. Have enough trades completed? The advisor skips cycles where the DB has no completed trades yet. 6. Has the first interval elapsed? The advisor skips the first tick at startup and waits one full LLM_ADVISOR_INTERVAL_SECS before the first analysis.
Can the LLM Advisor apply config changes automatically?
Not yet — recommendations are advisory only. The automatic apply path (Telegram approval gate → PATCH /api/config) is on the roadmap. For now, take the suggestions and apply them manually via the Control Tower UI or by editing src/config.rs.
DRADIS 是一个低延迟的 Rust 预测市场交易机器人,基于 Polymarket 构建,支持六种自主策略(动量、制造者、套利、时间衰减、基准、GBoost ML)以及实时的 Next.js 控制中心和 LLM 咨询员。
DRADIS 不仅仅是一个机器人,它是一个综合的交易自动化平台,支持预测市场如 Polymarket。它使用 Tokio 驱动的协调器评估所选市场,每 50ms 运行一次,协调多个自主策略以保留资本并在它看到的不合理的地方下单。
环境依赖与系统要求:Rust 1.95+(或 Docker)、Polygon 钱包、USDC 和 MATIC、Polygon RPC 端点(用于自动结算)、Telegram 机器人令牌(可选)
安装步骤:使用 Docker 部署(构建 Rust 引擎 + 控制中心,启动 Ollama)
使用教程:快速启动,策略隔离(示例配置)
配置说明:环境变量(.env)、MCP、关键参数
API/接口说明:Alchemy、Infura、Polygon RPC URL
工作流 / 模块说明:OpenClaw 集成(实时自然语言控制)
FAQ:为什么使用 Rust?为什么机器人不交易?
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ GPL 3.0 — 强 Copyleft,衍生作品须开源,含专利保护条款,不可闭源使用。
总体来看,DRADIS 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | DRADIS |
| 原始描述 | 开源AI工具:Direct Reaction And Dynamic Intelligence System — Low-latency Rust prediction-ma。⭐8 · Rust |
| Topics | installablearbitragebotmakermomentumopenclawrust |
| GitHub | https://github.com/mbordash/DRADIS |
| License | GPL-3.0 |
| 语言 | Rust |
收录时间:2026-05-18 · 更新时间:2026-05-18 · License:GPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。