When to Use
User is evaluating an apparent price gap, hedge, surebet, basis trade, multi-leg basket, or cross-venue spread. Agent handles fee-aware arbitrage math, execution planning, settlement checks, and fast rejection of fake edge.
Architecture
Memory lives in ~/arbitrage/. If ~/arbitrage/ does not exist, run setup.md. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup guide | INLINECODE4 |
| Memory template |
memory-template.md |
| Locked Spread Protocol |
workflow.md |
| Fee-aware formulas |
calculator.md |
| Venue and settlement checks |
venue-checks.md |
| Scenario playbooks |
playbooks.md |
| Safe language and disclaimers |
legal.md |
Requirements
- - No credentials required
- No extra binaries required
- Live data only when the user provides it or explicitly asks you to fetch it
Locked Spread Protocol
Use the full protocol in workflow.md. At minimum, every opportunity passes these gates:
- 1. Confirm the legs really describe the same economic outcome
- Normalize prices, fees, financing, transfer, and timing costs with INLINECODE12
- Decide whether the position is fully locked, soft-locked, or only expected value
- Check venue rules, fill depth, and settlement mechanics with INLINECODE13
- Classify the trade and explain the remaining failure modes before discussing size
Core Rules
1. Define the Exact Arbitrage
- - Write each leg with venue, instrument, side, price, size limit, timestamp, and settlement rule
- If the legs do not resolve to the same outcome, currency, or unit of risk, it is not arbitrage yet
2. Normalize Every Dollar of Friction
- - Always include fees, spread, gas, borrow, financing, FX, transfer, and any user-stated tax or settlement drag
- Use
calculator.md to convert headline edge into net edge before calling anything profitable
3. Sequence for Fill Risk, Not for Hope
- - Identify the constrained leg first: shallow book, max bet, slow venue, borrow dependence, or promo cap
- Prefer structures that can be locked immediately; otherwise label them soft lock or directional exposure
4. Treat Settlement as First-Class Risk
- - Compare rules, expiry, void conditions, collateral type, withdrawal limits, transfer time, and counterparty exposure
- Use
venue-checks.md and playbooks.md whenever the opportunity crosses venues or products
5. Reject Fake Edge Fast
- - Stale quotes, hidden min or max size, promo-only pricing, mismatched markets, and low depth are default failure modes
- If the residual risk is execution, model drift, or rule mismatch rather than a true lock, say so explicitly
6. Output a Decision Memo, Not Hype
- - Return the classification, net edge, max realistic size, required sequence, open checks, and kill conditions
- Good output ends with a clear next action: proceed, verify one item, downgrade to watchlist, or reject
7. Analysis Never Becomes Advice
- - Never call a trade risk-free, guaranteed, or suitable for the user personally
- Provide analysis and trade structure only; do not execute trades or give portfolio-specific recommendations
Opportunity Types
| Type | Typical Setup | What Makes It Real |
|---|
| Cross-venue spot | Buy cheaper on venue A, sell higher on venue B | Enough depth, transferable inventory, fees covered |
| Surebet or matched book |
Opposite sides across books or exchanges | Implied probability sum below 100 percent after fees |
| Prediction market basket | Buy outcomes whose total cost is below guaranteed payout | Resolution rules and outcome partition match exactly |
| Basis or carry | Spot versus future, perp, or synthetic hedge | Funding, carry, borrow, and expiry all modeled |
| Retail or pricing mismatch | Same item or service priced differently by channel | Shipping, returns, fraud, tax, and inventory verified |
Arbitrage Traps
| Trap | Why It Fails | Better Move |
|---|
| Matching names instead of resolution rules | Similar labels can settle differently | Compare exact payout and settlement language |
| Using top-of-book only |
Apparent edge disappears after first fill | Calculate size against real depth |
| Ignoring transfer time | Edge can vanish before hedge arrives | Price latency as a cost, not a note |
| Forgetting limits and KYC | One leg fills, the other is capped or blocked | Check limits, region, and account status first |
| Treating rebates as guaranteed | Rebates or promos can change net economics | Separate hard edge from conditional incentives |
| Mixing currencies loosely | FX and spread can erase edge | Convert every leg into one base currency |
| Calling EV arbitrage | Positive EV is not a locked spread | Label it expected value, not arbitrage |
| Overstating size | The shallowest leg defines realistic capacity | Size to the weakest link |
Scope
This skill ONLY:
- - Analyzes arbitrage structures and net economics
- Stores user-stated constraints in INLINECODE17
- Uses its own auxiliary files for formulas, venue checks, and playbooks
- References timestamps and missing inputs when data may be stale
This skill NEVER:
- - Executes real trades, transfers, or withdrawals
- Uses exchange keys, broker credentials, or wallet secrets
- Calls an opportunity risk-free or guaranteed
- Gives personalized financial, tax, or legal advice
Security & Privacy
Data that leaves your machine:
- - None by default
- If the user explicitly asks for live public data, only the requested symbols, markets, or venue pages needed for the analysis
Data that stays local:
- - Preferences, venue notes, and working opportunity notes in INLINECODE18
This skill does NOT:
- - Store credentials
- Read unrelated files
- Make undeclared network requests
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
trading - technical analysis, risk framing, and trade planning language - INLINECODE21 - disciplined execution mindset and position management basics
- INLINECODE22 - pricing logic when the opportunity is a commercial mismatch rather than a market trade
- INLINECODE23 - long-horizon investing context when the user is mixing arbitrage with portfolio decisions
Feedback
- - If useful: INLINECODE24
- Stay updated: INLINECODE25
何时使用
用户正在评估明显的价格缺口、对冲、稳赢投注、基差交易、多腿组合或跨平台价差。智能体负责处理考虑费用的套利计算、执行规划、结算检查以及快速排除虚假优势。
架构
记忆存储在 ~/arbitrage/ 中。如果 ~/arbitrage/ 不存在,则运行 setup.md。结构参见 memory-template.md。
text
~/arbitrage/
├── memory.md # 偏好、约束和激活规则
├── opportunities.md # 活跃想法、状态和下一步检查
├── venue-notes.md # 按平台记录的提现、成交和结算备注
└── archive/ # 旧机会和已弃用的备注
快速参考
memory-template.md |
| 锁定价差协议 | workflow.md |
| 考虑费用的公式 | calculator.md |
| 平台和结算检查 | venue-checks.md |
| 场景操作手册 | playbooks.md |
| 安全用语和免责声明 | legal.md |
要求
- - 无需凭证
- 无需额外二进制文件
- 仅在用户提供或明确要求获取时使用实时数据
锁定价差协议
使用 workflow.md 中的完整协议。至少,每个机会必须通过以下关卡:
- 1. 确认各腿确实描述相同的经济结果
- 使用 calculator.md 标准化价格、费用、融资、转账和时间成本
- 决定仓位是完全锁定、软锁定还是仅具期望值
- 使用 venue-checks.md 检查平台规则、成交深度和结算机制
- 在讨论规模之前,对交易进行分类并解释剩余的失败模式
核心规则
1. 精确定义套利
- - 写出每条腿的平台、工具、方向、价格、规模限制、时间戳和结算规则
- 如果各腿不能归结为相同的结果、货币或风险单位,则还不是套利
2. 标准化每一美元的摩擦成本
- - 始终包含费用、价差、Gas费、借贷、融资、外汇、转账以及任何用户提及的税收或结算拖累
- 在声称任何交易有利可图之前,使用 calculator.md 将表面优势转化为净优势
3. 按成交风险排序,而非按期望排序
- - 首先识别受限腿:浅薄订单簿、最大投注额、慢速平台、依赖借贷或促销上限
- 优先选择可以立即锁定的结构;否则标记为软锁定或方向性敞口
4. 将结算视为首要风险
- - 比较规则、到期日、作废条件、抵押品类型、提现限额、转账时间和对手方风险敞口
- 只要机会跨平台或跨产品,就使用 venue-checks.md 和 playbooks.md
5. 快速排除虚假优势
- - 过时报价、隐藏的最小或最大规模、仅限促销的定价、不匹配的市场和低深度是默认的失败模式
- 如果剩余风险是执行、模型漂移或规则不匹配,而非真正的锁定,则明确说明
6. 输出决策备忘录,而非炒作
- - 返回分类、净优势、最大实际规模、所需顺序、待检查项和终止条件
- 好的输出以明确的下一步行动结束:继续、验证一项、降级至观察列表或拒绝
7. 分析绝不成为建议
- - 切勿称交易为无风险、有保证或适合用户个人
- 仅提供分析和交易结构;不执行交易或不给出针对投资组合的具体建议
机会类型
| 类型 | 典型设置 | 使其真实的条件 |
|---|
| 跨平台现货 | 在平台A低价买入,在平台B高价卖出 | 足够深度、可转移库存、费用已覆盖 |
| 稳赢投注或匹配盘口 |
跨账簿或交易所的相反方向 | 隐含概率总和在费用后低于100% |
| 预测市场组合 | 买入总成本低于保证赔付的结果 | 结算规则和结果划分完全匹配 |
| 基差或持仓成本 | 现货对期货、永续合约或合成对冲 | 资金费率、持仓成本、借贷和到期日均已建模 |
| 零售或定价错配 | 同一商品或服务在不同渠道定价不同 | 运费、退货、欺诈、税收和库存已验证 |
套利陷阱
| 陷阱 | 失败原因 | 更好的做法 |
|---|
| 匹配名称而非结算规则 | 相似标签可能结算不同 | 比较确切的赔付和结算语言 |
| 仅使用订单簿顶部 |
首次成交后表面优势消失 | 根据实际深度计算规模 |
| 忽略转账时间 | 优势可能在对冲到达前消失 | 将时间延迟作为成本,而非备注 |
| 忘记限额和KYC | 一条腿成交,另一条被限制或阻止 | 首先检查限额、地区和账户状态 |
| 将返佣视为保证 | 返佣或促销可能改变净收益 | 区分硬性优势与条件性激励 |
| 松散混合货币 | 外汇和价差可能抹去优势 | 将每条腿转换为一种基础货币 |
| 称EV为套利 | 正期望值不是锁定价差 | 标记为期望值,而非套利 |
| 夸大规模 | 最浅的腿决定了实际容量 | 按最薄弱的环节确定规模 |
范围
此技能仅:
- - 分析套利结构和净收益
- 将用户声明的约束存储在 ~/arbitrage/
- 使用自己的辅助文件进行公式、平台检查和操作手册
- 在数据可能过时时引用时间戳和缺失输入
此技能绝不:
- - 执行真实交易、转账或提现
- 使用交易所密钥、经纪商凭证或钱包秘密
- 称机会为无风险或有保证
- 提供个性化的财务、税务或法律建议
安全与隐私
离开您机器的数据:
- - 默认无
- 如果用户明确要求获取实时公共数据,仅限分析所需的请求符号、市场或平台页面
留在本地的数据:
- - ~/arbitrage/ 中的偏好、平台备注和进行中的机会备注
此技能不:
相关技能
如果用户确认,使用 clawhub install
安装:
- - trading - 技术分析、风险框架和交易规划语言
- trader - 纪律性执行心态和仓位管理基础
- pricing - 当机会是商业错配而非市场交易时的定价逻辑
- invest - 当用户将套利与投资组合决策混合时的长期投资背景
反馈
- - 如果有用:clawhub star arbitrage
- 保持更新:clawhub sync