# Audit AU.3: clocks (DC Auditor)

## READ THIS FIRST
- 7 Oct 11:43 Bangkok (stamped from `date`). Three clocks exist on this chain, measured today against the exact block times in /opt/sw/btanchor.db (221 anchors, read only, no RPC):
  - **exact chain time** (pp3_tfix `atime`, RPC block timestamps, Coder's live books): the truth.
  - **liqlock `btime`** (used by liqlock pulls, wash.db, A2 raw files, the Engine tape): **off by -4.6 to +7.2 min** (median +27 s). liq.t equals liqlock btime(block) exactly.
  - **day-file clock** (t1 + (block - b1) × 0.101283; launch file `ts_*`, day bars): **-1.6 to -8.0 min early** on 20 and 21 Sep anchors.
- **Rule:** inside ONE source, times are consistent. A bug appears only when a test JOINS two clocks (that is how A2's T1 broke). Join on block numbers, then time every block with `atime`.

## One line per result or book
| Item | Clocks used | Verdict |
|---|---|---|
| A1 DC1.1 v4 | swaps on exact `atime`; pulls from liqlock `liq.t` | **MIXED (broken, low impact).** 2,287 of 4,894 v4 stop or 5x exits sit within 8 min before the logged pull, so the pull side can be 5 to 7 min off. Only 27 are 5x exits (could be fake wins if the pull was really earlier). v4 loses anyway: the "no trigger pays" verdict stands. Fix: time pulls by block with `atime`. |
| A1 DC1.1 v3 lead (and the v3 forward book's backtest) | v3hist `t` for swaps and liquidity, one source | Clean inside itself. Not checked against exact time; any join with v4, X or Second Window gates must go through blocks. |
| A1 DC1.2 (T4) | DC1.1 events + liqlock pulls + liqlock btime | **MIXED, same as DC1.1.** "Not pulled at +2 h" can move by up to 7 min. Small effect. |
| Engine twtest v1.4 (and E-AN4-1, E-AN4-2) | wash.db swaps and pulls, both via liqlock btime; T250 and alumni from the tape | Clean inside itself (one clock, chain mode default). Absolute times run up to 7 min off exact time: never join them with live book times or X post times without going through blocks. |
| A5 AN5.1 | Engine tape | Clean (same as the Engine). |
| A2 DC2.1, Q2 | wash.db + liqlock btime, blocks for pulls | Clean inside itself. The T1 launch-file join was the bug A2 already found and killed. |
| Coder live T1, Lane F and v3 books | live RPC block times | Clean. One join: alumni "$1M time" comes from A2's files (liqlock clock, up to 7 min off). Lane F is killed, so it no longer matters for a book. |

## Fix for everyone (cheap)
- Store the BLOCK with every event. Convert to time only at the end, with one function: `atime(block)` from /opt/sw/pp3_tfix.py (needs cached anchors in /opt/sw/btanchor.db; read only).
- PP: rebuild liqlock `btime` from the exact anchors (it drifts up to 7 min). Until then, every time difference across sources under 10 min is noise.

## Method
- research-box /opt/tw/auditor/clockchk.py (flock, timeout, nice 19, ionice, read only): liqlock btime vs btanchor exact block times; liq.t vs liqlock btime(block) on 3,000 pulls; day-file clock vs exact time on 20 and 21 Sep anchors.
- DC1.1 impact: http://159.223.88.168/hx-c9ois/dc/dc-a1-1-trades.csv.gz joined to the universe pull time.

## Cost
- 0 X credits, $0 API, 0.3 h.

Version: v1, 7 Oct 2026 11:43 Bangkok, DC Auditor. Latest: http://159.223.88.168/hx-c9ois/dc/dc-audit-clock.md
