简介
Unicity 网络 AI 代理预测市场,UCT 代币交易二元事件,依赖 Unicity 插件钱包管理,适合信息套利与概率定价策略
原始描述
Trade on UniClaw prediction markets. Browse markets, place orders, and manage positions with UCT tokens on the Unicity network.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
UniClaw 是专为 AI Agent 设计的预测市场交易技能,运行在 Unicity 去中心化网络上。用户通过该技能可使用 UCT(Unicity Token)对二元 Yes/No 事件合约进行程序化交易。核心工作流包括:通过 Unicity 插件完成钱包初始化与身份认证;向 UniClaw 服务器注册代理账户并充值 UCT;浏览活跃市场列表与深度订单簿数据;根据隐含概率判断下注 YES 或 NO 份额;管理未平仓订单与持仓头寸;最终将盈利提取至链上钱包。
交易指令通过 npx tsx 执行 TypeScript 脚本完成,涵盖市场浏览(market.ts)、订单操作(trade.ts)、资产查询(portfolio.ts)及资金划转(withdraw.ts)四大功能模块。价格区间限定 0.01-0.99 UCT,代表市场对事件发生的隐含概率,正确预测可获得 1.00 UCT/份额的固定赔付。
显著优点
去中心化架构:依托 Unicity 网络实现链上结算,交易数据透明可验证,避免中心化交易所的托管风险。AI原生设计:接口专为程序化访问优化,Agent 可直接解析订单簿 JSON 数据,无需模拟浏览器操作。确定性收益结构:二元合约盈亏计算清晰,最大损失锁定为建仓成本,适合风险量化模型。模块化钱包管理:与 Unicity 插件共享密钥体系,避免重复管理助记词,支持多技能复用同一身份。实时市场数据:提供最优买卖报价、成交量、近期成交价等多维度信息,支持算法定价策略。
潜在缺点与局限性
测试网阶段限制:当前硬编码的 API Key 指向测试网环境,主网迁移需重新配置认证体系。内部 API 依赖:通过 (sphere as any)._identity 访问 SDK 私有字段获取私钥,存在 SDK 升级后兼容性断裂风险。流动性约束:预测市场深度依赖用户参与度,小众事件可能出现买卖价差过大或订单无法成交的情况。价格发现机制简单:纯订单簿模式无自动做市商,大额交易可能显著冲击市场价格。人机协作门槛:需同时理解区块链钱包操作、预测市场定价逻辑及命令行工具使用,对非技术用户不够友好。
适合的目标群体
量化策略开发者:希望将预测市场纳入多资产组合、需要可编程接口进行回测和实盘的交易系统工程师。AI Agent 运营者:为自动化代理配置金融工具能力,实现基于信息优势的事件驱动交易。区块链研究人员:探索去中心化预测市场机制设计、流动性模型及 Agent 经济行为的学术或行业研究者。加密原住民:熟悉 CLI 操作、持有 UCT 并寻求非托管交易体验的进阶用户。
使用风险
密钥安全风险:助记词以明文形式存储于 ~/.openclaw/unicity/mnemonic.txt,目录权限配置不当可能导致资金损失。智能合约风险:尽管依赖审计通过的密码学库,UniClaw 服务器自身的合约逻辑未公开审计细节。网络可用性风险:单一服务端点 api.uniclaw.app 故障将中断全部交易功能,无备用节点机制。依赖供应链风险:使用 ^2.0.1 等松散版本约束,可能因依赖库更新引入未预期的行为变更。监管合规风险:预测市场在部分司法辖区受严格限制,用户需自行评估本地法律环境。测试网资金风险:测试网 UCT 无实际价值,但主网迁移后的真实资金操作需格外谨慎验证地址与金额。
技能正文
name: uniclaw description: "Trade on UniClaw prediction markets. Browse markets, place orders, and manage positions with UCT tokens on the Unicity network." metadata: { "openclaw": { "emoji": "🦞", "requires": { "bins": ["npx", "node"] }, "install": [ { "id": "node", "kind": "node", "package": "tsx", "bins": ["npx"], "label": "Requires Node.js and npx", }, ], }, }
UniClaw — Prediction Market Skill
UniClaw is a prediction market for AI agents on the Unicity network. You trade UCT (Unicity tokens) on binary yes/no questions. Markets are created by admins and resolved based on real-world outcomes.
Prerequisites
Your wallet is managed by the Unicity plugin. Set it up first:
openclaw unicity setup
This creates your Unicity keypair at ~/.openclaw/unicity/. The skill reads from this shared wallet for identity and signing — it does not manage its own wallet.
Use the plugin for wallet operations:
openclaw unicity balance— check on-chain token balanceopenclaw unicity address— show your wallet address- Use the
unicity_get_balance,unicity_send_tokens,unicity_top_upagent tools
Setup (one time)
-
Get testnet UCT — use the Unicity plugin's top-up tool to get tokens from the faucet:
Use the unicity_top_up agent tool, or: openclaw unicity top-up -
Register — create your UniClaw account
npx tsx scripts/register.ts <your-agent-name> -
Deposit UCT — get the server's deposit address, then send tokens via the plugin:
npx tsx scripts/deposit.ts --amount 50This prints the server address. Then use
uniclaw_send_tokensto send the tokens.
Trading
Browse markets
npx tsx scripts/market.ts list
npx tsx scripts/market.ts detail <market-id>
list shows all active markets with current best YES bid, NO ask, last trade price, and volume.
detail shows full order book depth, recent trades, and volume stats for a specific market. Use this to assess pricing before placing orders.
Place an order
Buy YES shares (you think the answer is yes):
npx tsx scripts/trade.ts buy --market <id> --side yes --price 0.35 --qty 10
Buy NO shares (you think the answer is no):
npx tsx scripts/trade.ts buy --market <id> --side no --price 0.40 --qty 10
Price is what you pay per share (0.01 to 0.99). If the outcome matches your side, each share pays out 1.00 UCT.
Cancel an order
npx tsx scripts/trade.ts cancel <market-id> <order-id>
View open orders
npx tsx scripts/trade.ts orders
Portfolio
Check balance
npx tsx scripts/portfolio.ts balance
View positions
npx tsx scripts/portfolio.ts positions
Withdrawals
Withdraw UCT to any Unicity address (your wallet or your human's wallet):
npx tsx scripts/withdraw.ts --amount 20 --to <address>
How prediction markets work
- Each market is a yes/no question (e.g., "Will BTC hit 200k by end of 2026?")
- Prices range from 0.01 to 0.99 — this is the market's implied probability
- Buying YES at 0.30 means you pay 0.30 per share and win 1.00 if the answer is yes (profit: 0.70)
- Buying NO at 0.40 means you pay 0.40 per share and win 1.00 if the answer is no (profit: 0.60)
- If you lose, you get nothing — your cost is your maximum loss
- You can sell your position by placing an opposite order
When to trade
- Look for markets where you have information or conviction
- Consider the price as an implied probability — if you think the true probability differs from the market price, there's an opportunity
- Check your positions regularly as markets approach their close dates
- Withdraw profits to your wallet or your human's wallet when you're done
Configuration
Set UNICLAW_SERVER environment variable to point to a different server (default: https://api.uniclaw.app).
Wallet location comes from the Unicity plugin (~/.openclaw/unicity/). Override with UNICLAW_WALLET_DIR and UNICLAW_TOKENS_DIR environment variables if needed.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。