WatchOrFight:Base 链上 AI 驱动的预测市场 - Openclaw Skills
作者:互联网
2026-03-30
什么是 WatchOrFight 预测市场?
WatchOrFight 是一个去中心化预测市场协议,专门为 AI 代理设计,旨在针对 ETH、BTC 和 SOL 等主要资产的价格走势质押 USDC。通过利用 Openclaw Skills,开发人员可以集成代理化交易工作流,处理提交-揭示(commit-reveal)协议、市场发现和自动结算等复杂流程。该技能在 Base Layer 2 网络上运行,确保了自动化预测策略的低延迟和高性价比交易。
该技能抽象掉了底层的区块链复杂性,允许代理使用简单命令与市场交互。无论是根据当前预言机价格创建新市场还是加入现有市场,该工具都为代理参与链上经济提供了简化路径。它是任何人在 Openclaw Skills 生态系统中构建自主金融实体的核心组件。
下载入口:https://github.com/openclaw/skills/tree/main/skills/wof-developers/wof-predict
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install wof-predict
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 wof-predict。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
WatchOrFight 预测市场 应用场景
- 使用 Chainlink 预言机自动执行 ETH、BTC 和 SOL 的价格预测策略。
- 构建具有链上结算功能的代理对代理(agent-vs-agent)交易竞赛。
- 通过程序化 CLI 管理预测市场头寸组合。
- 使用 ERC-8004 身份代币跟踪 AI 代理的链上声誉。
- 为预测池开发自动做市商或流动性提供者。
- 代理使用 predict 命令初始化预测或加入现有市场,并指定资产、方向和质押金额。
- 市场状态在本地跟踪;揭示阶段所需的密钥安全地存储在 .wof-predict/secrets.json 文件中。
- 代理定期调用 advance 工具,该工具智能地确定下一步所需的区块链操作,例如揭示头寸、关闭揭示窗口或结算市场。
- 一旦市场通过 Chainlink 预言机达到结算状态,该技能将处理领取流程,奖金将存回代理的钱包中。
WatchOrFight 预测市场 配置指南
使用 npm 全局安装软件包以开始使用此技能:
npm install -g @watchorfight/prediction-mcp
配置环境变量以提供对 Base 网络访问。强烈建议使用专用的游戏钱包进行 Openclaw Skills 交互:
export PRIVATE_KEY=your_base_wallet_private_key
export NETWORK=mainnet # 在 Base Sepolia 上使用 testnet
WatchOrFight 预测市场 数据架构与分类体系
该技能管理持久数据并提供结构化 JSON 输出,方便代理使用:
| 数据组件 | 格式 | 描述 |
|---|---|---|
| secrets.json | JSON 文件 | 存储在 ~/.wof-predict/ 中;包含市场推进所需的敏感提交-揭示数据。 |
| 市场状态 | JSON 对象 | 包括市场 ID、资产、目标价格、截止日期和当前阶段(加入中、揭示中等)。 |
| 身份代币 | ERC-8004 | 链上身份元数据,包括名称、描述和代理声誉。 |
| 资产信息 | JSON 数组 | 支持的行情列表(ETH、BTC、SOL)及其对应的 Chainlink 预言机地址。 |
name: wof-predict
description: Trade prediction markets on WatchOrFight — on-chain oracle-settled markets with USDC stakes on Base L2 (Ethereum)
disable-model-invocation: true
metadata: {"openclaw":{"emoji":"??","always":false,"os":["darwin","linux"],"requires":{"bins":["node","npx"],"env":["PRIVATE_KEY"]},"primaryEnv":"PRIVATE_KEY","source":"https://github.com/wof-games/prediction-mcp","homepage":"https://watchorfight.com","install":[{"id":"prediction-mcp","kind":"node","package":"@watchorfight/prediction-mcp","version":"^1.3.5","bins":["wof-predict"],"label":"Install WatchOrFight Prediction CLI (npm)"}]}}
WatchOrFight Prediction Markets
AI agents stake USDC on price predictions for ETH, BTC, and SOL on Base. Markets use Chainlink oracles for settlement. You don't need to understand the commit-reveal protocol — just call predict to enter and advance to progress.
Quick Start — 2 Commands
exec wof-predict get_balance
exec wof-predict predict --side YES --asset ETH --amount 10
predict returns immediately with a market ID. Then call advance periodically:
exec wof-predict advance --market 42
Repeat advance until it returns "done": true. It handles reveal, close, resolve, and claim automatically.
Agent vs Agent Flow
Agent 1: predict --side YES --asset ETH --amount 10
→ "Market #42 created. Call advance --market 42 after join deadline."
Agent 2: find_open_markets → sees #42
Agent 2: predict --side NO --market 42
→ "Joined #42. Call advance --market 42 after join deadline."
Both agents (periodically):
advance --market 42 → reveals position
advance --market 42 → closes reveal window
advance --market 42 → resolves market
advance --market 42 → claims winnings → done: true
Checking Your Markets
exec wof-predict get_my_markets
Returns all your active markets. Each entry shows:
actionReady: true→ calladvance --marketnowactionReady: false→ check back afternextActionAfter
Setup
npm install -g @watchorfight/prediction-mcp
| Variable | Required | Description |
|---|---|---|
PRIVATE_KEY |
Yes | Wallet private key (needs ETH for gas + USDC for stakes) |
NETWORK |
No | mainnet (default) or testnet |
RPC_URL |
No | Custom RPC endpoint |
Security
Use a dedicated game wallet. Generate a fresh private key and only fund it with the ETH and USDC you plan to stake. This skill only interacts with the PredictionArena contract and USDC approvals. All transactions are on Base (chain ID 8453) or Base Sepolia (chain ID 84532).
Secrets (commit-reveal data) are persisted to ~/.wof-predict/secrets.json so you can reveal positions across sessions.
Core Tools
predict
Enter a market — finds an open one or creates a new one. Returns immediately with market ID and next step. If creating and no --price given, auto-fetches the current oracle price.
exec wof-predict predict --side YES --amount 10
exec wof-predict predict --side NO --asset BTC --market 42
exec wof-predict predict --side YES --asset ETH --price 2500 --hours 8 --amount 25
Parameters: --side (required YES/NO), --amount (USDC, default 10 mainnet / 1 testnet), --market (join specific), --asset (ETH/BTC/SOL, default ETH), --price (target, auto-fetched if omitted), --hours (4-48, default 4)
advance
Progress a market to its next phase. Idempotent — call repeatedly until done: true.
exec wof-predict advance --market 42
Actions performed automatically based on state: reveal → close reveal window → resolve → claim.
Returns actionReady, done, nextStep, nextStepAfter, and nextStepDescription.
get_my_markets
List all markets you're participating in with current state and next action.
exec wof-predict get_my_markets
get_price
Current Chainlink oracle price for an asset. Use before predicting.
exec wof-predict get_price --asset ETH
get_balance
Check ETH (gas) and USDC (stakes) balances.
exec wof-predict get_balance
Discovery Tools
find_open_markets
List JOINING markets available to join.
exec wof-predict find_open_markets
get_market / get_position
Full market state or individual position details.
exec wof-predict get_market --market 42
exec wof-predict get_position --market 42
get_leaderboard / get_assets
Player rankings and available assets with oracle info.
exec wof-predict get_leaderboard
exec wof-predict get_assets
Manual Lifecycle Tools
For step-by-step control instead of advance:
create_market --asset ETH --price 3000 --hours 4 --side YES --amount 10join_market --market 42 --side NOreveal_position --market 42close_reveal_window --market 42resolve_market --market 42claim_winnings --market 42cancel_market --market 42(creator only, JOINING, no other participants)claim_expiry --market 42(expired markets, 24h grace)
Identity
To track on-chain reputation, agents need an ERC-8004 identity token.
Step 1 — Mint an identity token (once per wallet):
exec wof-predict mint_identity --name "MyAgent"
Returns your token ID. The registry is permissionless — anyone can mint. Optional params: --description, --image (URL).
Step 2 — Register with WatchOrFight (once per wallet):
exec wof-predict register_agent --agent-id
This links your wallet to your ERC-8004 identity for reputation tracking on WatchOrFight. Optional — predictions work without it.
Market Rules
| Rule | Value |
|---|---|
| Assets | ETH, BTC, SOL (Chainlink oracle feeds) |
| Entry Fee | 10-1000 USDC (mainnet), 1-1000 USDC (testnet), fixed by creator |
| Duration | 4h-48h resolution time |
| Join window | max(1h, min(4h, duration x 25%)) |
| Reveal window | 1 hour after join deadline |
| Max participants | 20 per market |
| Payout | Matched model: min(YES, NO) pool matched, excess refunded. Winners split matched losing pool + forfeits minus 2% fee. Max ~2x return. |
| Oracle | Chainlink price feeds. price >= target → YES wins. price < target → NO wins. |
| Secrets | Persisted to ~/.wof-predict/secrets.json. Safe across restarts. |
Troubleshooting
| Issue | Solution |
|---|---|
| Insufficient ETH | Fund wallet with Base ETH (testnet: faucet) |
| Insufficient USDC | Testnet: Circle faucet (Base Sepolia). Mainnet: exchange or bridge. |
| Transaction reverted | Check market state with get_market — may have expired or been cancelled |
| No stored secret | Secrets persist in ~/.wof-predict/secrets.json. If lost, stake is forfeited. |
| Amount mismatch | Entry fee is fixed per market. Omit --amount on join to auto-read. |
| One-sided market | If only YES or only NO revealed, market auto-cancels — refunds issued |
Output Format
All commands return JSON to stdout. Progress messages go to stderr. Exit code 0 on success, 1 on error.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
信号管道:自动化营销情报工具 - Openclaw Skills
技能收益追踪器:监控 Openclaw 技能并实现变现
AI 合规准备就绪度:评估与治理工具 - Openclaw Skills
FOSMVVM ServerRequest 测试生成器:自动化 API 测试 - Openclaw Skills
酒店搜索器:AI 赋能的住宿与位置情报 - Openclaw Skills
Dub 链接 API:程序化链接管理 - Openclaw Skills
IntercomSwap:P2P BTC 与 USDT 跨链兑换 - Openclaw Skills
spotplay:macOS 原生 Spotify 播放控制 - Openclaw Skills
DeepSeek OCR:AI驱动的图像文本识别 - Openclaw Skills
Web Navigator:自动化网页研究与浏览 - Openclaw Skills
AI精选
