# ClearTrace — Open Dataset

Neutral, reproducible measurement of DEX **execution quality**, **revert rates**,
and **quote accuracy** — sliced by aggregator *and* by the **originating frontend**
that actually sent the trade. The attribution slice is the part no conflicted
incumbent can publish about itself.

Produced by [ClearTrace](https://cleartracedata.com) (a Rantum asset). Regenerate
with `python scripts/export_dataset.py`.

## Files

| File | What | Source / volume |
|---|---|---|
| `execution_by_frontend.csv` | Median realized slippage (bps) by **originating frontend**, with an execution-quality score (100 − toxicity). | On-chain (`dex.trades` + oracle prices), ≥300 trades/cell. |
| `revert_rates.csv` | Router **revert rate** (%) per project, over *all* routing txs. | On-chain, tens of thousands of txs/cell. |
| `execution_slippage.csv` | Median realized slippage by aggregator project. | On-chain, thousands of trades/cell. |
| `leaderboard.json` | The joined board: on-chain execution + revert + quote accuracy per aggregator, plus the by-frontend execution view. | Join of the above + the quote sample. |
| `v4_pools.csv` / `.json` | **Which Uniswap V4 pools a sampled aggregator route actually settled through**, each pool's hook, and what that hook is **capable of**. Identity and capability — **no cost figure**. | Fork-sim sampler route logs + the pool's own `Initialize` event. Regenerate with `python scripts/export_v4_pools.py`. |

## Reading `v4_pools` without drawing the wrong conclusion

Uniswap V4 moves fee logic from the venue into the individual **pool**, via a
**hook** contract. This file says which pools a real routing engine actually sent a
real trade through, and what each pool's hook is permitted to do. Four things it
does **not** say:

1. **Capability is not malice.** V4 encodes a hook's 14 permission bits in the low
   bits of its own address; we decode them from first principles (verified against
   all 2,004 entries of Uniswap's `hooklist` registry: 2,004 agree, 0 disagree).
   **~63.5% of that registry can take a delta cut of a swap**, well-known hooks
   included. These flags are what a hook CAN do, never what it has done.
2. **`can_take_delta_cut = false` is not "charges nothing."** It rules out an
   arbitrary *delta* cut. A hook with `beforeSwap` on a dynamic-fee pool can still
   set the LP fee, and that path leaves no flag behind — `dynamic_fee_possible`
   carries it separately.
3. **An unresolved pool is unknown, not clean.** `coverage.pools_unresolved` is
   published even when it is zero, so the denominator is never invisible.
4. **There is no cost figure here, on purpose.** Per-pool cost is a *measurement*
   and is held to the same rated thresholds as every other number on this site
   (≥30 samples **and** ≥7-day span). `fills_observed` is a **coverage** count —
   how often we routed through a pool — and must never be read beside a price.

## Methodology (in one screen)

**Each metric comes from where it is actually credible.**

- **Execution slippage** — per fill, the absolute relative gap between the
  minute-level oracle USD value of the bought leg vs the sold leg, in bps; we
  report the per-cohort **median** (robust to outliers). Computed over *all*
  on-chain trades, not a sample.

- **Revert rate** — reverted routing txs ÷ total routing txs, counted from raw
  transactions (a reverted tx produces no trade row), deduped so a shared router
  isn't double-counted across projects, and computed **after a sender-level bot
  filter** (methodology v5, 2026-07-05): senders with zero successful txs in the
  window, senders reverting ≥50% of 5+ txs, and senders with 100+ reverts at a
  ≥10% personal rate are excluded as competing solver/keeper bots — their failed
  fill races are not user execution failures. (Data exported before 2026-07-05 used the looser
  v4 filter and overstates rates for solver-heavy routers. Known residual: the
  Odos/Ethereum cell remains inflated by address-rotating spam — its user-only
  rate is published live in `user_revert_rate_pct`; the 2026-07-05 diagnostic
  measured ≈0.2% at the time.) Since methodology v6 (2026-07-07) each cell also carries
  a **user-only** rate (`user_revert_rate_pct`, with `user_reverted_txs` /
  `user_txs`): the same computation restricted to senders whose personal revert
  rate is under 10%, i.e. whose own transactions succeeded at least 90% of the
  time over the window. That is a threshold on the outcome being measured, not a
  classification of who the sender is: bounded under 10% by construction, so read
  it as the failure rate among consistently-succeeding senders, not as the share
  of all attempts that fail. It is the number to read for residual cells, subject
  to that caveat.

- **Quote accuracy** — the only *sampled* metric. We capture live aggregator
  quotes for a small basket (major pairs × size cohorts), then **fork-simulate
  the aggregator's own swap calldata** against current chain state and read the
  realized output. `quote_gap = (quoted − realized) / quoted`. This is a
  forward-captured **characterization sample** (each costs compute), flagged
  `preliminary` until enough samples accrue — never presented as a precise rating
  from a handful of points. Trades routed through RFQ/PMM market-maker legs can't
  be fork-simulated (they need off-chain signed orders) and are excluded, not
  counted as failures.

**Originating-frontend attribution.** Each swap tx is mapped to one originating
frontend via four vectors — calldata-suffix fingerprint, fee-recipient skim,
aggregator-router match, and router naming — with a confidence tier
(suffix = high, router/fee = medium, inferred = low). A raw pool swap with no UI
signal is **`unattributed`**, never force-labeled. Under-claiming beats
over-claiming: that's the neutrality the whole asset rests on.

## Honest limitations

- Frontend attribution is **Ethereum-first**; other chains currently fall to
  `unattributed`.
- Quote-accuracy cells are **preliminary** until sample counts grow.
- `confidence` columns carry the attribution strength — filter to `high`/`medium`
  for the strictest view.

## License

Data: CC0 / public domain. Use it, cite ClearTrace.
