# v2ramp replay vs chain: the gap is a clock offset, not the formula (testmgr, 10 Oct 2026, board #328)
Formula per trade (replay v2replay.py = forward v2ramp.py): WETH/token reserves from the pair's Sync logs. Entry = first Sync with t >= created_t + 8 s. Exit = last Sync with t <= created_t + 303 s. Buy 0.05 WETH: tk = 0.05*0.997*Rt/(Rw+0.05*0.997). Sell: out = tk*0.997*Rw'/(Rt'+tk*0.997). net_x = out/0.05. No gas, no slippage term beyond the constant-product impact.
Checked on chain (eth_getLogs, rpcpool): the Sync reserves in r6tape.db equal the chain logs exactly (pair 0x2c44: block 68385132 li 50 = 0.97124 token / 1.02970 WETH; exit block 68387856 li 31 = 0.23196 / 4.34424). Recomputed net: 13.676 and 7.972 = the replay numbers. So the maths reproduces from chain.
Cause of the auditor's 1.4-1.8x gap: tape t is NOT chain block time. Tape t runs 38 s ahead of the chain timestamp for pair 0x2c44 (block 68385132: tape 1789952257.7, chain 1789952219) and 17 s ahead for pair 0x2ee8 (block 68469731: tape ...772.4, chain ...755). Reading replay entry_t/exit_t as chain time enters 17-38 s too late. Entering +30 s later gives 8.06 and 2.91 (pair 2); +16 s: 10.5 / 4.3, close to the auditor's 7.8 / 5.2. Created_t is on the same tape clock, so the +8 s / +303 s rule is consistent inside the tape; relative timing is right.
Real finding: the ramp is very latency sensitive. Variants (net_x, pair 0x2c44 / 0x2ee8): entry +0 s 13.7 / 8.0; +8 s 14.3 / 6.2; +16 s 10.5 / 4.3; +30 s 8.1 / 2.9. A real fill has bot latency + block delay; the replay assumes a fill in the same second as the Sync. Treat replay 2.91x as an upper bound; the honest number needs entry at +8..16 s after the Sync (likely 1.5-2x lower on winners). Added to the replay (v2replay.py, printed line only): entry = Sync + 12 s on the same 2227 trades that have a later Sync before exit: mean 2.35x vs 3.11x for the same rows (-24%), 420 below 1x. Forward v2ramp.py not changed (a +12 s arm needs the Sync stream after entry; say if you want it).
Still open (not mine): sell revert / honeypot eth_call on 3 pairs, tx.from of outside sellers.
