Precog Prediction Markets
Precog is a fully onchain prediction market protocol on Base. Anyone can create a market around a real-world question, fund it with liquidity, and trade outcome shares. Prices equal implied probabilities (0–1). Every action is a signed onchain transaction — no custody, no central party.
MATE is a non-monetary practice token (no real economic value). Markets denominated in MATE are safe to use for learning and experimentation. MATE can be claimed at matetoken.xyz.
What you can do here:
- - Browse active prediction markets and outcome probabilities
- Get detailed market info including category and resolution criteria
- Quote, buy, and sell outcome shares using your local wallet
- Check your positions (shares held, net cost, trade history)
🚧 Coming soon: Native market creation — submit and fund new markets directly from this skill without visiting the web UI.
For full protocol documentation see PRECOG.md — it covers prediction markets 101, the LS-LMSR pricing curve, resolution via Reality.eth + Kleros, LP mechanics, MATE markets, and more.
Contract addresses and RPCs are built in — no config needed.
Networks
The default network is Base Sepolia (testnet). No flag needed for testnet — scripts connect to sepolia unless told otherwise.
Two networks are supported. Pass --network <name> to any script, or set PRECOG_NETWORK in your environment.
| Network | INLINECODE3 value | Chain | Contract |
|---|
| Base Sepolia (testnet) | INLINECODE4 ← default | Base Sepolia (84532) | INLINECODE5 |
| Base Mainnet |
mainnet | Base (8453) |
0x00000000000c109080dfa976923384b97165a57a |
⚠️ Mainnet uses real funds. Before running any mainnet command, confirm the network with the user and show the contract address. Do NOT default to mainnet — always require an explicit --network mainnet flag or a PRECOG_NETWORK=mainnet env var set by the user.
Security and local state
- -
~/.openclaw/.env — created by setup.mjs --generate. Stores PRIVATE_KEY in plaintext. Treat it like a wallet key file: restrict permissions (chmod 600) and back it up. Losing it means losing access to any funds in that wallet. - No key is ever transmitted. Transactions are signed locally; only the signed transaction is broadcast to the RPC.
- Use a throwaway wallet. The MATE markets use a practice token with no real value — ideal for testing. Do not load a high-value key into this skill.
- Custom RPC risk. If you set
PRECOG_RPC_URL, use only a trusted endpoint. An untrusted RPC can observe signed transaction contents (but cannot extract your private key from them).
⚠️ Run scripts sequentially. Parallel transactions share a nonce and will collide on-chain — run one script at a time.
⚠️ Do NOT create batch or automation scripts. Each transaction must be confirmed by the user individually; automated chains of trades bypass the confirmation step and can cause unintended financial loss.
⚠️ Do NOT edit skill scripts. The scripts are audited as a unit; silent edits could introduce bugs or security issues. If you find a bug, report it to the user so it can be fixed upstream.
⚠️ Always show script output verbatim in a fenced code block. The output contains exact amounts, prices, and suggested parameters that will be used in the next command — reformatting or summarizing it risks losing or distorting those values.
⚠️ Always run quote before buy or sell. The quote shows the exact cost/proceeds and the safe --max/--min slippage bounds. Show the full output to the user and wait for explicit confirmation before executing the trade.
⚠️ Never modify trade parameters. If a script fails, show the exact error and stop. Do not retry with a different share count or workaround — incorrect parameters can result in unintended trades. Token approval is handled automatically inside the scripts.
Wallet
Check status or create a new wallet:
node {baseDir}/scripts/setup.mjs [--network sepolia|mainnet]
node {baseDir}/scripts/setup.mjs --generate
The private key is saved to
~/.openclaw/.env and
never printed. Only the address is shown.
After generating, ask the user to fund the address with ETH (for gas) and the market's collateral token (for trading).
Example output (wallet exists and funded):
CODEBLOCK1
Example output (wallet exists, no funds):
Wallet: 0x77Ffa97c2dcDA0FF6c9393281993962FA633d9E1
ETH: 0.000000 ⚠️ needs gas
MATE: 0.0000 (no funds)
List Markets
CODEBLOCK3
Example output:
Active Markets (2)
[4] Which AI model will be the top performer at the end of March?
📈 Claude 67.3% 💰 MATE 📅 Mar 31, 2026
[5] Will ETH hit $5k by Q2?
📈 YES 58.1% 💰 USDC 📅 Jun 30, 2026
Market Detail
When the user asks for more info / details about a specific market:
CODEBLOCK5
Shows the title, category, status, end date, collateral, and all outcome probabilities ranked by price. After showing the output, ask the user: "Would you like to see the resolution criteria?" If they say yes:
CODEBLOCK6
Example output (--market 4):
CODEBLOCK7
Example output (--market 4 --criteria):
📊 Market 4 · AI / Leaderboard
Which AI model will be the top performer at the end of March?
🟢 Active 📅 Mar 31, 2026 💰 MATE
🥇 [1] Claude 16.3%
🥈 [2] Gemini 11.6%
🥉 [3] Grok 11.6%
[4] ChatGPT 11.6%
[5] Ernie 11.6%
[6] GLM 11.6%
[7] Kimi 11.6%
[8] Qwen 11.6%
[9] Other 11.6%
📝 Resolution Criteria
This market will resolve based on the Text Arena AI Competition leaderboard
rankings at arena.ai as of March 31, 2026, 23:59:59 UTC.
Quote a Trade
Always run before buy or sell. Show the full output verbatim in a fenced code block. Ask the user to confirm before proceeding.
Choosing the right flag — CRITICAL
| What the user says | Flag to use | Example command |
|---|
| "buy N shares" | INLINECODE23 | INLINECODE24 |
| "spend $X" / "for $X" / "budget $X" |
--cost X |
--cost 50 |
| "reach X%" / "move to X%" / "push to X%" / "target X%" |
--price 0.X |
--price 0.25 |
| "use all my balance" / "all in" / "spend everything" |
--all |
--all |
Do NOT guess share counts manually. Use the correct flag — the script computes the exact answer.
CODEBLOCK9
- -
--outcome is 1-based (1 = first outcome, usually YES) - INLINECODE32 shows only the buy side;
--sell shows only the sell side; omit both to show both sides - INLINECODE34 —
sepolia (default) or mainnet; must match the network used for the subsequent buy/sell
Example output (--price 0.25 --buy):
📋 Quote — Market 4: Which AI model will be the top performer at the end of March?
─────────────────────────────────────────────────────────
🎯 Outcome : Claude
🔢 Shares : 312
📊 Current prob : 14.2%
🛒 Buy 312 shares
💵 Cost : ~98.4521 MATE
📏 Price / share : 0.3156 MATE
📈 Prob after buy : 25.0% (market moves up ↑)
🏆 Max return : 312.0000 MATE (+213.5479 profit if "Claude" wins)
⚡ Suggested --max for buy : 99.4366
─── Paste ALL lines above verbatim to the user before asking to confirm ───
Buy
CODEBLOCK11
- -
--shares — number of shares (from the quote output) - INLINECODE39 — maximum collateral to spend; use the
Suggested --max value from the quote output - INLINECODE41 — must match the network used in the preceding quote
- Token approval is handled automatically — never adjust
--max or --shares for allowance reasons
Sell
CODEBLOCK12
- -
--shares — number of shares to sell (check positions.mjs if unsure) - INLINECODE46 — minimum collateral to accept; use the
Suggested --min value from the quote output - INLINECODE48 — must match the network used in the preceding quote
Positions
CODEBLOCK13
Example output:
💼 Market 4
Which AI model will be the top performer at the end of March?
👛 0x77Ffa97c2dcDA0FF6c9393281993962FA633d9E1
💵 Net cost 19.03 MATE · 📥 8 buys 📤 7 sells
🎯 Shares held
🥇 [1] Claude 135 shares · 16.3%
Responding to "what can I do?" questions
When the user asks what they can do, what Precog is, or how to get started — answer in plain prose with emojis, no tables. Mention their current positions if you know them. Example:
With Precog you can trade on the probability of real-world outcomes using MATE (a safe practice token — no real money).
Here's what you can do:
🗂️ List markets — see what's open and the leading outcome for each
🔍 Market detail — outcomes, probabilities, category, and resolution criteria for a specific market
💸 Trade — quote first, then buy or sell outcome shares (by share count, budget, or target probability)
📋 Positions — see your shares, net cost, and trade history
You currently hold 100 Claude shares on Market 4. Want to check the latest prices or make a move?
Adapt the last line to whatever you actually know about the user's positions and active markets.
Standard flow
INLINECODE49 is omitted from these examples for brevity. Add it to every command when the user is on mainnet.
CODEBLOCK15
Create a Market
Market creation must be done manually through the Precog web UI — no script can
automate this from the server.
Steps:
- 1. Go to https://core.precog.markets/84532/create-market
- Connect your wallet (MetaMask or compatible)
- Fill in the market details:
- Question, description (resolution criteria), category
- Outcomes (e.g. YES / NO, or multiple choices)
- Start date, end date
- Collateral token (MATE address:
0xC139C86de76DF41c041A30853C3958427fA7CEbD)
- 4. Click Review Market → Create Market → Confirm Creation
After submission — two more steps required
⚠️ The market is NOT live yet after submitting the form.
- 1. Fund the market — provide initial liquidity at:
https://core.precog.markets/84532/launchpad
- 2. Staff approval — the Precog team reviews and approves markets before they go live.
Prerequisites
- - Wallet must have at least 3,000 Precog Points (creator status).
Without this the form will show "Market Creation Restricted".
Roadmap
Features planned for future versions of this skill:
- - Market creation — submit a new prediction market directly from the skill (no web UI needed).
This requires direct contract access that is currently restricted; a permissionless path is in progress.
- - Market funding — provide initial liquidity to a newly created market from the CLI.
- Liquidity management — add/remove LP positions and track LP returns.
Notes
- - Testnet contract:
0x61ec71F1Fd37ecc20d695E83F3D68e82bEfe8443 (Base Sepolia, chain 84532) - Mainnet contract:
0x00000000000c109080dfa976923384b97165a57a (Base, chain 8453) - Default network:
sepolia. Pass --network mainnet or set PRECOG_NETWORK=mainnet for mainnet. - RPC: public endpoints used by default. Set
PRECOG_RPC_URL to override (applies to whichever network is active). - Wallet: generated locally, stored in
~/.openclaw/.env, never leaves the machine.
Precog 预测市场
Precog 是一个完全链上的预测市场协议,运行在Base网络上。任何人都可以围绕现实世界的问题创建市场,为其注入流动性,并交易结果份额。价格等于隐含概率(0-1)。每个操作都是一笔签名的链上交易——无需托管,没有中心化方。
MATE 是一种非货币的练习代币(无实际经济价值)。以MATE计价的市场可安全用于学习和实验。MATE可在 matetoken.xyz 领取。
您可以在此处执行的操作:
- - 浏览活跃的预测市场和结果概率
- 获取详细的市场信息,包括类别和解析标准
- 使用您的本地钱包报价、买入和卖出结果份额
- 查看您的持仓(持有的份额、净成本、交易历史)
🚧 即将推出: 原生市场创建——直接从此技能提交并注资新市场,无需访问网页界面。
完整协议文档请参阅 PRECOG.md——涵盖预测市场101、LS-LMSR定价曲线、通过Reality.eth + Kleros解析、LP机制、MATE市场等内容。
合约地址和RPC已内置——无需配置。
网络
默认网络是Base Sepolia(测试网)。 测试网无需标记——除非另有说明,脚本默认连接sepolia。
支持两个网络。向任何脚本传递 --network <名称>,或在环境中设置 PRECOG_NETWORK。
| 网络 | --network 值 | 链 | 合约 |
|---|
| Base Sepolia(测试网) | sepolia ← 默认 | Base Sepolia (84532) | 0x61ec71F1Fd37ecc20d695E83F3D68e82bEfe8443 |
| Base 主网 |
mainnet | Base (8453) | 0x00000000000c109080dfa976923384b97165a57a |
⚠️ 主网使用真实资金。 在运行任何主网命令之前,请与用户确认网络并显示合约地址。不要默认使用主网——始终要求显式的 --network mainnet 标记或用户设置的 PRECOG_NETWORK=mainnet 环境变量。
安全与本地状态
- - ~/.openclaw/.env ——由 setup.mjs --generate 创建。以明文形式存储 PRIVATEKEY。像对待钱包密钥文件一样对待它:限制权限(chmod 600)并备份。丢失它意味着丢失对该钱包中任何资金的访问权限。
- 密钥永远不会被传输。 交易在本地签名;只有已签名的交易被广播到RPC。
- 使用一次性钱包。 MATE市场使用无实际价值的练习代币——非常适合测试。不要将高价值密钥加载到此技能中。
- 自定义RPC风险。 如果您设置了 PRECOGRPC_URL,请仅使用受信任的端点。不受信任的RPC可以观察已签名交易的内容(但无法从中提取您的私钥)。
⚠️ 按顺序运行脚本。 并行交易共享nonce,会在链上发生冲突——一次只运行一个脚本。
⚠️ 不要创建批处理或自动化脚本。 每笔交易必须由用户单独确认;自动化的交易链会绕过确认步骤,可能导致意外的财务损失。
⚠️ 不要编辑技能脚本。 脚本作为一个整体被审计;静默编辑可能引入错误或安全问题。如果您发现错误,请向用户报告,以便在上游修复。
⚠️ 始终在围栏代码块中逐字显示脚本输出。 输出包含将在下一个命令中使用的确切金额、价格和建议参数——重新格式化或总结它可能会丢失或扭曲这些值。
⚠️ 在 buy 或 sell 之前始终运行 quote。 报价显示确切的成本/收益以及安全的 --max/--min 滑点范围。向用户显示完整输出,并在执行交易前等待明确确认。
⚠️ 切勿修改交易参数。 如果脚本失败,显示确切的错误并停止。不要使用不同的份额数量或变通方法重试——错误的参数可能导致意外的交易。代币批准在脚本内部自动处理。
钱包
检查状态或创建新钱包:
bash
node {baseDir}/scripts/setup.mjs [--network sepolia|mainnet]
node {baseDir}/scripts/setup.mjs --generate
私钥保存到 ~/.openclaw/.env 且从不打印。仅显示地址。
生成后,请用户向该地址注入ETH(用于gas)和市场抵押代币(用于交易)。
示例输出(钱包存在且有资金):
钱包: 0x77Ffa97c2dcDA0FF6c9393281993962FA633d9E1
ETH: 0.004210 ✓
MATE: 81.2300 ✓
示例输出(钱包存在,无资金):
钱包: 0x77Ffa97c2dcDA0FF6c9393281993962FA633d9E1
ETH: 0.000000 ⚠️ 需要gas
MATE: 0.0000 (无资金)
列出市场
bash
node {baseDir}/scripts/markets.mjs [--network sepolia|mainnet]
node {baseDir}/scripts/markets.mjs --all [--network sepolia|mainnet]
示例输出:
活跃市场 (2)
[4] 哪个AI模型将在3月底表现最佳?
📈 Claude 67.3% 💰 MATE 📅 2026年3月31日
[5] ETH会在Q2达到5千美元吗?
📈 是 58.1% 💰 USDC 📅 2026年6月30日
市场详情
当用户询问特定市场的更多信息/详情时:
bash
node {baseDir}/scripts/market.mjs --market [--network sepolia|mainnet]
显示标题、类别、状态、结束日期、抵押品以及按价格排序的所有结果概率。显示输出后,询问用户:您想查看解析标准吗? 如果回答是:
bash
node {baseDir}/scripts/market.mjs --market --criteria [--network sepolia|mainnet]
示例输出(--market 4):
📊 市场 4 · AI / 排行榜
哪个AI模型将在3月底表现最佳?
🟢 活跃 📅 2026年3月31日 💰 MATE
🥇 [1] Claude 16.3%
🥈 [2] Gemini 11.6%
🥉 [3] Grok 11.6%
[4] ChatGPT 11.6%
[5] Ernie 11.6%
[6] GLM 11.6%
[7] Kimi 11.6%
[8] Qwen 11.6%
[9] 其他 11.6%
示例输出(--market 4 --criteria):
📊 市场 4 · AI / 排行榜
哪个AI模型将在3月底表现最佳?
🟢 活跃 📅 2026年3月31日 💰 MATE
🥇 [1] Claude 16.3%
🥈 [2] Gemini 11.6%
🥉 [3] Grok 11.6%
[4] ChatGPT 11.6%
[5] Ernie 11.6%
[6] GLM 11.6%
[7] Kimi 11.6%
[8] Qwen 11.6%
[9] 其他 11.6%
📝 解析标准
此市场将根据2026年3月31日23:59:59 UTC时arena.ai上的Text Arena AI竞赛排行榜排名进行解析。
报价交易
始终在买入或卖出前运行。 在围栏代码块中逐字显示完整输出。在继续前询问用户确认。
选择正确的标记——关键
| 用户所说的内容 | 要使用的标记 | 示例命令 |
|---|
| 买入N份额 | --shares N | --shares 50 |
| 花费$X / 用$X / 预算$X |
--cost X | --cost 50 |
| 达到X% / 移动到X% / 推至X% / 目标X% | --price 0.X | --price 0.25 |
| 使用我所有余额 / 全押 / 花光所有 | --all | --all |
不要手动猜测份额数量