# 30-day replays of the paper tests (Test Manager, 10 Oct, board #318 / #323)

**Window:** the tape only starts 21 Sep, so the longest possible replay is 21 Sep - 8 Oct (17-19 days), not 30. WETH v4/v3 tape (r6weth.db) ends 7 Oct 15:10 UTC (h100, h3k); v2 tape (r6tape.db) ends 8 Oct ~19:15 UTC (v2ramp). Forward paper stays as the confirmation.
**Method:** the replay runs the SAME script as the forward test (copy with only the data path and "now" changed): `/root/tm/replay/{h100,h3k}/*.py`, v2ramp has its own copy of the maths `/root/tm/replay/v2ramp/v2replay.py` (reserves from the tape instead of RPC). Tape converter: `/root/tm/replay/mk_tape.py`. Same fees, slippage, 63 s entry delay, capx columns. Feed lag is 0 in replay (the live feed is always some seconds late), so entries here are a bit kinder than forward.

| test | trades (arm A) | mean net x | profitable days | forward so far |
|---|---|---|---|---|
| h100 (hooked fee-100) | 474 | 2.22x (B 2.29, C 2.77, D 2.55, F 2.28) | 17 of 17 (worst day 1.16x) | 20 trades, arm A 2.04x (6 zeros); sim expected 2.25x |
| h3k (H3000) | 100 | 4.42x (B 6.66, C 17.8, D 26.4, E 39.2, F 28.9) | 17 of 17, no zero, no stop hit | 5 pools traded |
| v2ramp | 2384 | 2.91x (capped at 10x: 2.37x) | 18 of 19 (9 Oct 0.62x on 22 trades, tape edge) | 58 closed, 3.73x (capped 2.62x) |

## Per test: for the auditor (#323)
Files (http://159.223.88.168/hx-c9ois/fw/replay/): `replay-<test>-trades.csv` (pool id, entry_t, exit_t, net_x, arm, cap_buy/sell_usd), `replay-<test>-notrade.csv` (every universe pool that did NOT trade, with tape swap count and reason), `replay-v2ramp-notape.txt`.
- **h100:** 529 hooked fee-100 pools; 474 traded; skipped 43 (reserve < 0.3 ETH) + 12 (no swap after +63 s); notrade csv lists the 55. All pools have a tape. Arm A zeros: 109 of 474 (23%): pulls and "quiet" pools counted as 0. The replay tape has ModifyLiquidity but the script reads only swaps, so a silent pull is still "quiet = 0" (pessimistic, not too kind).
- **h3k:** 136 H3000 pools; 13 skipped (reserve < 0.4); 100 closed in arm A. **51 arm-runs were dropped as "unresolved" because the pool had no later swap to sell into.** Those are exactly the dead/rugged pools, so the 0 losers and the 4x to 39x means are **survivorship, not evidence**. Fix needed before this replay means anything: count an unresolved run as 0 (or last price with a pull check) like h100 does. I have NOT changed the forward script yet (A2 asked for exits; I will do it with the next h3k change so the forward and the replay stay identical). Treat h3k replay as "not verified".
- **v2ramp:** 2384 pairs with first-Sync seed 1.000; 3 skipped (no Sync at entry, listed), 2 at tape end. Matches A1's sim (2.59x). Not covered: sells reverting (honeypot), outside money; the replay uses reserve maths only.

## Bug found and fixed on the way
- **v2ramp forward closed 0 trades since it started**: the free node refuses eth_getLogs ranges over about 100 blocks (HTTP 400), the script asked for 1700, all 60 pairs errored silently as "waiting". Fixed (chunks of 100, backup `v2ramp.py.bak_chunk`): 58 pairs now closed, mean 3.73x (2.62x capped). Forward numbers before 10 Oct 01:00 UTC did not exist, so nothing earlier is affected.

## Not done yet
- Other tests (busy60, kitcode, p204, a1mc, fast5, h3n, q60, v3005): their rules need ModifyLiquidity/code size/other feeds in the tape; next in line busy60 and kitcode. The grid is already a replay.
- Re-run of these replays on 3 hand-rebuilt trades per test is the auditor's check 4; replay csvs have the pool ids for that.
