返回 Expert 笔记
Expert Day 108

Order Flow Auction / 订单流拍卖

UniswapX、CoW Protocol、1inch Fusion 三大 OFA 协议的设计差异、solver/filler 经济模型

2026-08-17
Phase 2 - MEV与DEX量化 (Day 103-116)
OFAUniswapXCoW1inchFusionIntentBased

日期: 2026-08-17 方向: MEV / DEX量化 阶段: Phase 2 - MEV与DEX量化 (Day 103-116) 标签: #OFA #UniswapX #CoW #1inchFusion #IntentBased


今日目标 / Today's Objectives

类型内容
学习UniswapX、CoW Protocol、1inch Fusion 三大 OFA 协议的设计差异、solver/filler 经济模型
实操拉取三家 OFA 的链上数据,对比 price improvement、filler 集中度、订单类型分布
产出ofa_compare.md — OFA 设计对比矩阵 + 推荐策略

1. 核心机制 / Core Mechanics

1.1 OFA 是什么

Order Flow Auction (OFA): user 不直接发 swap tx 到 DEX,而是 签一个 off-chain order(intent),让一组 solver/filler 竞标 fill 该 order,winner 在 settlement layer 上链执行并付给 user 承诺的价格。

核心价值:

  • MEV protection: order 不进入 public mempool, 无法被 sandwich
  • Price improvement: solver 之间竞争,user 拿到比 AMM 更优的价格
  • Gas-free for user: 多数 OFA 的 solver 代付 gas

1.2 三大 OFA 设计对比

A. UniswapX (Uniswap Labs, 2023-07)

User signs: ExclusiveDutchOrder
   - input: 100 USDC
   - output: min 0.0331 ETH (decay over time from 0.0335 to 0.0331)
   - exclusive period: 30s (single filler privilege)
   - decay timeline: linear from t=30s to t=120s

Filler: 在 Reactor 合约调用 fill(orderHash, ...)
   - 必须满足 user 的 minOut
   - 支付 gas
   - 可以从 AMM/做市商内部 inventory 提供流动性

核心机制:

  • Dutch auction: 输出 token 数量随时间增加(价格变更优惠),early fill 拿更高 spread
  • Exclusive period: 第一阶段只有一个 filler 有资格(避免 race condition)
  • Reactor: 链上 settlement 合约

B. CoW Protocol (CoW Swap)

User signs: GPv2Order
   - sell 100 USDC
   - buy min 0.0331 ETH
   - validTo: timestamp
   - feeAmount: prepaid

Solver: 链下竞标 (off-chain auction round, 每 30 秒一轮)
   - solver 提交一个 settlement 方案 (含 batch 内多个 order 的 CoW)
   - winner: 给 user 综合 surplus 最大的方案
   - 链上 settle: GPv2Settlement 合约执行

核心机制:

  • Coincidence of Wants (CoW): 把同 batch 内反向 order 直接相互 fill, 完全不走 AMM (省 LP 费)
  • Batch auction: solver 在每 30 秒批次内竞争
  • Off-chain solver auction: 拍卖 entirely off-chain, 链上只 settle 结果

C. 1inch Fusion / Fusion+

User signs: Limit Order with Dutch curve
   - 类似 UniswapX 但 price curve 更复杂
   - 支持 partial fill
   - Resolver (=filler) 必须 stake INCH (KYC-like)

核心机制:

  • Resolver stake: 想做 filler 必须质押 INCH 代币 → 防垃圾、防恶意
  • Fusion+: cross-chain 版本, resolver 在 source chain lock + dest chain release
  • Backward compatible: 也可以 fall back 到普通 1inch aggregator

1.3 三家对比矩阵

维度UniswapXCoW Protocol1inch Fusion
上线时间2023-072021-04 (前身 Mesa)2022-12
价格机制Dutch auction (linear/exp decay)Sealed-bid batch auctionDutch + partial fill
Filler 准入开放 (须 implement IReactor)开放 (但 winner 上链 bond)Stake INCH (准入门槛)
CoW 抵消无 (单边 fill)核心特性部分
Cross-chainUniswapX V2 (2024)单链Fusion+
月度 volume (2025)$5-8B$3-5B$4-6B
Filler 集中度Top 3 占 70%Top 5 占 60%Top 3 占 80%
Price improvement~3-7 bps vs AMM~5-15 bps (CoW 时)~3-8 bps

1.4 Solver / Filler 经济学

Filler 收入来源:

  1. Spread: user 接受的 minOut 与 filler 实际从 AMM/inventory 获得的差价
  2. MEV bundle: filler 在自己 fill tx 后构造 backrun bundle 给 builder(部分协议要求与 user 分享)

Filler 成本:

  1. Gas: 通常 200-400k per fill
  2. Inventory risk: 用自营 inventory 时承担价格风险
  3. Stake/bond: 1inch 要求质押 INCH

实证 (CoW Solver 数据):

  • 平均 spread/fill: $5-50
  • 一个中等 solver 月度收入: $50K - 500K
  • 头部 solver (Barter, Otex, PropellerSwap): $500K-2M / month

2. 架构图与数据流 / Architecture & Data Flow

┌────── User ──────┐
│  Wallet signs    │
│  ExclusiveDutch  │  EIP-712 signature, no on-chain tx
│  Order           │
└────────┬─────────┘
         │ off-chain (HTTP POST to OrderBook API)
         ▼
┌────── OFA OrderBook (off-chain) ──────┐
│  - UniswapX: gouda (Uniswap-hosted)   │
│  - CoW: api.cow.fi                    │
│  - 1inch: fusion-api.1inch.io         │
└──────────────────┬─────────────────────┘
                   │ broadcast to fillers
                   ▼
┌────── Filler / Solver pool ──────┐
│ Wintermute, Otex, Barter,        │
│ PropellerSwap, AlpineLab,        │
│ Numem, Naive Solver, ...         │
└──────────────────┬───────────────┘
                   │ Filler picks order, builds tx
                   ▼
┌────── Reactor / Settlement contract ──────┐
│  UniswapX:  Reactor (`0x0000...e23bf`)   │
│  CoW:       GPv2Settlement (`0x9008...`) │
│  1inch:     SettlementExtension          │
└──────────────────┬─────────────────────────┘
                   │ on-chain
                   ▼
              Token transfer
              user → filler (sell token)
              filler → user (buy token, ≥ minOut)
              
Filler's downstream:
  - Use AMM (Uniswap, Curve, Balancer) to source liquidity
  - Use internal inventory (if MM)
  - Build MEV bundle for backrun

3. 数据采集与对比脚本 / Data Comparison Script

"""
ofa_compare.py — Pull 30-day stats from CoW, UniswapX, 1inch Fusion APIs.
"""
import requests
from datetime import datetime, timedelta

def cow_stats():
    r = requests.get("https://api.cow.fi/mainnet/api/v1/total")
    d = r.json()
    return {"protocol": "CoW", "total_volume_usd": d.get("totalVolumeUsd")}

def uniswapx_stats():
    # Dune query: e.g. dune.com/queries/uniswapx-volume
    # placeholder: use Uniswap subgraph
    query = """
    { dailyData(first: 30, orderBy: date, orderDirection: desc) {
        date volumeUSD orderCount
    } }
    """
    return {"protocol": "UniswapX", "note": "use subgraph"}

def fusion_stats():
    # 1inch fusion-api: aggregated volume
    return {"protocol": "1inchFusion", "note": "use 1inch portal API"}

if __name__ == "__main__":
    for fn in [cow_stats, uniswapx_stats, fusion_stats]:
        print(fn())

4. ofa_compare.md(实战产出框架)

# OFA Comparison: UniswapX vs CoW vs 1inch Fusion

## Decision Matrix

| Use Case | Recommended | Rationale |
|----------|-------------|-----------|
| Retail $100-10K swap | UniswapX | Best UX, integrated in Uniswap UI |
| Whale $1M+ swap | CoW Protocol | CoW matching saves LP fee |
| Cross-chain swap | 1inch Fusion+ | Only one with mature cross-chain |
| Privacy-first | CoW | Off-chain auction, no mempool exposure |
| Low-latency arb | UniswapX | 30s exclusive window short |

## Solver Concentration

UniswapX: Top 3 fillers ≈ 70% (Wintermute, AlpineLab, Numem)
CoW:      Top 5 solvers ≈ 60% (Otex, Barter, PropellerSwap, ...)
1inch:    Top 3 ≈ 80% (1inch Labs partners, Wintermute)

## Risks per Protocol
- UniswapX: exclusive period favors big fillers, retail solvers locked out
- CoW:      30s batch may be too slow for volatile markets
- 1inch:    INCH stake creates centralization on capital

5. 真实数据 / Real Data

项目累计 Volume (2025)月度峰值Top Filler
UniswapX$80B+$8B (2025-Q2)Wintermute, AlpineLab
CoW Protocol$50B+$5B (2025-Q1)Otex, Barter
1inch Fusion$40B+$6B (2024-Q4)1inch Labs solvers
价格改善 (price improvement vs Uniswap V3 quote)
UniswapX: 中位数 ~5 bps
CoW: 中位数 ~9 bps (with CoW match), ~4 bps (without)
1inch: 中位数 ~6 bps

重要事件:

  • 2024-02: Uniswap Foundation 公布 UniswapX V2 跨链版本
  • 2024-08: CoW 引入 "solver competition leaderboard" 透明化拍卖
  • 2025-Q1: 1inch Fusion+ 接入 Polygon, BNB, Arbitrum

6. 经济学分析 / Economic Analysis

6.1 价值流向

传统 swap:
  User → AMM → Sandwich → LP / searcher / builder / validator

OFA:
  User → Solver auction → Winner solver
  Solver: source liquidity + capture spread
  → Builder (only backrun bundle, not sandwich)
  → Validator

核心变化: searcher 的 sandwich 从 user surplus → solver surplus → 部分 redirect 给 user。

6.2 LP 视角的 OFA 影响

OFA 的 CoW match 直接绕过 AMM → LP 费用减少。但:

  • CoW 仅匹配同一批次内反向 order,比例约 5-15%
  • 其余 OFA volume 仍走 AMM (作为 solver liquidity source)
  • 结论:LP 受 OFA 影响较小(< 10% volume erosion)

6.3 OFA 集中化风险

Solver 集中度高 → solver collusion / 同质化报价 → user 价格改善减少。 解决: CoW Protocol 引入 solver rewards,鼓励 long-tail solver;UniswapX 没有此机制(更市场化但更集中)。


7. 机构视角 / Institutional Perspective

机构作为 user:

  • $1M+ swap 应优先 CoW (CoW match 能省 LP 费)
  • Active treasury 用 UniswapX (UI 友好, 标准化 ExclusiveDutch)
  • Cross-chain settle 用 1inch Fusion+

机构作为 solver/filler:

  • MM (Wintermute, Jump, GSR) 是天然 filler(已有 inventory + co-located infra)
  • 进入门槛: $5-10M capital + bot infra + 协议关系
  • ROI: 头部 solver 月化 5-10%(基于 working capital)

OFA 改变机构最佳执行 (best execution) 策略:

  • 传统: split order across DEX + CEX
  • OFA 时代: order intent 给 OFA → OFA 把 order routed to optimal venue (含 CEX-DEX arb)
  • 机构 PM 必须重新设计执行模型,不再是 router 优化而是 OFA 选择优化

8. 风险与陷阱 / Risks & Pitfalls

  1. Filler stale quote 风险: User signs at t0, filler fills at t10s, 期间价格剧变,fill 时 minOut 仍满足但 user 错失更好价。
  2. Solver/Filler 失败: 没有 filler 接单 (流动性极差或 minOut 不合理) → order expires, user 无变化但浪费时间。
  3. MEV in OFA: OFA 协议本身可能引入新的 MEV (e.g. 抢跑 winning solver 的 backrun)。
  4. Exclusive period 不公平: UniswapX 的 30s exclusive 给大 filler 套利窗口。retail solver 几乎无机会。
  5. Settlement 风险: solver fill tx revert (e.g. AMM state changed) → user 没收到 token,需重新签 order。
  6. Off-chain auction 不透明: CoW Protocol 的拍卖在 off-chain 完成,user 无法验证选出的 solver 真的是 best bid。
  7. Solver collusion 攻击: 少数大 solver 串通报低价 → user surplus shrinks。

9. 关键速查 / Quick Reference

协议合约/API
UniswapX Reactor0x00000000000bbF0000000bBA0000000bBb000000 (近似, 查 etherscan)
UniswapX OrderBookgouda.uniswap.org
CoW Settlement0x9008D19f58AAbD9eD0D60971565AA8510560ab41
CoW Solver Reward TokenCOW
1inch Fusion Settlement0x1111111254EEB25477B68fb85Ed929f73A960582
Dune dashboard (UniswapX)dune.com/uniswap/uniswap-x
Dune dashboard (CoW)dune.com/cowprotocol/cow-protocol

10. 面试题 / Interview Questions

  1. 解释 UniswapX 的 ExclusiveDutchOrder 与 CoW Protocol 的 Sealed-bid Batch Auction 的本质区别。何时用哪个?
  2. OFA 让 sandwich 几乎消失,但为什么 sandwich 占 MEV 仍 ~60%?OFA 还需要解决什么才能完全替代 mempool swap?
  3. 如果你是 1inch 的产品经理,你会设计什么机制让 retail solver 也能参与 Fusion (而不是只有 staked-INCH 大户)?
  4. CoW Protocol 的 solver auction 在 off-chain 进行,user 无法验证最佳 solver 真的赢了。请设计一个 trustless 的验证机制。
  5. 机构客户的 best-execution 报告(如 MiFID II 要求)如何在 OFA 时代提供?需要 OFA 协议提供哪些数据?

11. 明日预告 / Tomorrow

Day 109: Week 16 复习 — 把过去 6 天的 MEV 生态图谱整合,画出从 user tx → MEV capture → validator 的完整价值流向图。产出: mev_map.md