# Data fix brief for the Price Predict session (from the 100x / phase 2 session)

Written 5 Oct 2026, 16:30 Bangkok (UTC+7). Owner: Ben. Read all before touching anything.
Talk to Ben like he is 5: short bullets, no dashes, Bangkok time, never print a secret.

## Why this matters
- We want to study "phase 2 runners": coins that first close above $500k with real money, and which of them go on to $2M, $5M, $10M.
- For hours 0 to 72 we need clean minute data per TOKEN (all its pools), in USD, with wallets. Today it does not exist.
- Hourly GMGN candles in /opt/runtrack/runtrack.db are the only clean source now, and they are hourly only.

## What is broken (with receipts)

1. **Only 20 days of minute data.** /opt/hist/rh has complete day files 2026-09-15 to 2026-10-04 (Bangkok days). 2026-09-14 is still being rebuilt. The plan was back to 3 Jul.
2. **Runners missing.** Of 57 coins launched since 15 Sep that runtrack shows above $2M, only 34 have 3+ swaps in the day files. 23 are missing. Most are plain Uniswap v4 pools or "unknown" pads. Examples (full addresses):
   - COUPONS 0xf086c53f2780e601f0d005fabb3ee5a220336062: pool row exists (fee 9000, no hook) but 0 swaps, 0 bars, 0 transfers. Its trading was in a pool the rebuild does not read (likely v2/v3 or another venue).
   - NO 0x02c35e271afb59f34460376b1c9e0923cd481bc4, RAREFRIENDS 0x0779369854d3ecdea927206718ffd7730c67b71f, GAS 0x28da843c0223990fb57701319b30804b89eff111, SPOOKY 0x8e708fba9488b57a1b0b9bfa378ee7d44eba82b1, DUCAT 0xd0ca71118ca21d674f9018a53026a38a0ab54dbf, KS 0xf4f7568a3abefc7378d701ded7366bf43cb751a0, BORNHUB 0xf84af14c5961950cf6bfcc860b5128d955042da0 (all "pool_uniswap_v4" in runtrack).
   - THOT 0xe20359d3e4cb4540c3383452116c90f27cd92e34, DEED 0x5e55f18453545d0d4314c5106a2d8db934298e95, SI 0xef82ddc566653699b89c3afe123559a75aaa2976 (pons_v2), musebook 0x91a2dae9699f0b82540b5886b0d8759c22820ba3 (bankr).
   - A few (HI 0xee049979960d5e42b389b941ec45790ca7b6e1f7, OWL 0xc7cbf1932fb1aed06a08f1c413dc5f209d1a34b6, SI 0x9ba4d84ac1571a0788b2bb7a6412e73529d12dc6) launched after the last complete day, so they are only late, not lost.
3. **One token, many pools.** Many coins trade in 2+ pools with different quote coins. Example: Aria 0xa74a94c15b95f8d5f3abdd2db00f6c7384037b55 shows pools quoted in 0x5fc5360d0400a0fd4f2af552add042d716f1d168 and 0xa13b7f204629d4b13f59750f32a64b62ce312509, with no factory row, while runtrack calls it pons_v2. DARK 0xdc45b71d7203c2e8baafc43a19bca0eb993bb54e has a pool quoted in 0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec and one in 0x5fc5360d0400a0fd4f2af552add042d716f1d168. Per pool tables give the wrong price and miss volume.
4. **Quote coins with no USD price.** About 28% of launches are not quoted in ETH or WETH. Big ones: 0x5fc5360d0400a0fd4f2af552add042d716f1d168, 0x2e8c31162b855a2ffa90f6f8634643ad6f111e18 (DexScreener shows the AI / USDG pair for both), SPCX 0x4a0e65a3eccec6dbe60ae065f2e7bb85fae35eea. Decimals unknown, so volumes cannot be put in USD.
5. **Gap in time.** Swaps cover only the first 6 h of each pool. Minute bars start late: for 1,841 ETH quoted launches with bars, the first bar came 6 h to 325 h after launch (middle 35 h). Hours 6 to about 35 have no data for most coins. Only 1,841 of 34,142 ETH quoted launches have bars at all.
6. **Wallets only for 30 minutes.** The transfers table holds the first 30 min only. Fresh buyers per hour, retention, dev and sniper exits after 30 min cannot be measured.
7. **Price prints without money.** A single tiny trade in a thin pool prints a huge price. Counting "closes" from swap prints says about 26 coins a day reach $500k; GMGN hourly closes with $40k volume say 5.6 a day. Every level needs a money test.
8. **Old tokens look like new launches.** Some tokens appear in the launches table of a later day with a huge first price (MEME 0x385f4f8ae47651ce5f58f5265395a669f8281e18 on 15 Sep at about $40M; TIBBIR 0x4db7374e966097be94c6680d49156d580f097bbf at about $384M). WORM 0x3ba500f1ababbcf0f0247d06d1c56fd7e6c4c09d: day file says first mint 17 Sep, runtrack created_ts says 9 Sep. Need one birth table: first mint block ever per token.
9. **Start price.** The swap sqrtp is the price AFTER the swap, so the first print already includes the dev or first big buy. Use pools.sqrt0 (pool init) as the start price.
10. **Supply missing.** 84,067 of 118,904 launch rows (71%) have NULL supply (finding from the runner patterns session, supfetch.py). Code that skips them loses 24% of $2M runners and 42% of $5M runners. Multicall3 0xcA11bde05977b3631167028862bE2a173976CA11 backfills about 80k tokens in about 4 minutes.
11. **Wrong pool hook.** Price Predict reads the hook of the mint_to pool, not the pool where the coin actually trades. Use the trading pool (largest volume) for family and price.
12. **ETH price table stale.** /opt/hist/prices.db ETHUSDT ends 3 Oct 20:16 Bangkok (13:16 UTC). ethusd.py is not running.

## Already found by other sessions (reuse, do not redo)
- /opt/prewatch/bt/first.json: true first launch per token (old tokens re-pooled removed).
- supply_backfill.py (proposed, runner patterns session): supply for every token via Multicall3.
- family_check.py: hook code family of the trading pool (CAMPAIGN family = avoid, BUNDLE family = fast flip).
- Runtrack is NOT complete: it lists coins alive around 2 Oct and misses most coins that hit a sellable $500k. Do not use it as the full universe.

## What to build (in this order)

1. **Token birth table**: token, first mint block and time (Bangkok and UTC), creator, factory, all pools ever (address, quote, fee, hook, create block). One row per token, built from the chain, not from runtrack.
2. **All pools, all venues**: read Uniswap v4 PoolManager 0x8366a39cc670b4001a1121b8f6a443a643e40951 AND Uniswap v2 / v3 pool events on RH for every token in the birth table. Prove it on COUPONS 0xf086c53f2780e601f0d005fabb3ee5a220336062 first.
3. **USD per minute for every quote coin**: ETH from Binance (fix ethusd.py, keep it running, staleness check), stables at 1, other quotes priced through their own deepest ETH pool. Store decimals per quote.
4. **Token level minute bars in USD**, from launch to day 14, no gap: open, high, low, close by volume weighted price, buy USD, sell USD, buys, sells, unique buyers, new buyers (first time ever for this token). Summed over all pools.
5. **Wallet tape for 72 h** for every token that ever closed a minute above $100k with $5k+ volume that minute: wallet, side, USD, block, tx, pool. Plus balances per hour for the first 72 h (holders with $100+).
6. **Back to 3 Jul** for everything above, nice and ionice, without slowing the live pickers.
7. **Save now what cannot be rebuilt later**: fomo trending list every minute, robinhoodtrenches list, X posts per 15 min for every coin above $100k (xsafe, $TICKER, full window).

## How we will know it is fixed (acceptance tests)

- All 57 runtrack coins above $2M launched since 15 Sep are present, with minute bars from launch.
- For each, the token level hourly close is within 10% of the runtrack GMGN hourly close in 95% of hours.
- Coins per day with a money tested close above $500k matches runtrack (about 5 to 6 a day).
- No hour without data between launch and day 14 for any coin above $100k.
- ETH price is never more than 10 minutes old.
- Built with redundant guards (timer plus cron, flock), alerts only through /opt/common/alertgate.py when every fix failed.

## Hands off
- Do not edit or slow /opt/hist pickers (aipick*, sentinel, pickguard, reconcile), /opt/laneradar, /opt/chainbrain, /opt/runtrack.
- Build in /opt/pricepredict-data or the session's own folder. Heavy jobs with nice -n 19 ionice -c3.

Version 2, 5 Oct 2026 16:45 Bangkok (added supply gap, trading pool hook, runtrack is not complete). Latest: http://159.223.88.168/hx-c9ois/hx/pp-datafix-brief.md
