# Sell simulation at the cap cross, hooked pools (#661, ppfeeds, 10 Oct 2026)

**Table (sqlite, refreshed about every minute while rows come in):** http://159.223.88.168/hx-c9ois/fw/sellcross.db  (main: /opt/launchwatch/pub/hx-c9ois/fw/sellcross.db; source research-box /opt/sw/sellsim/sellcross.db)
Service `sellcross` (research-box, niced, free RPC only), code /opt/sw/sellsim/sellcross.py. Follows v4tape swaps.jsonl.

## What it does
For every v4 pool of class H3000 (hooked fee 3000, quote WETH **or native**, `quote` column says which): the first swap whose cap is >= 100k USD (and again at 300k) triggers one eth_call of the real Universal Router (0x8876..., V4_SWAP exact-in) selling **0.02 ETH worth** of the token from a fresh address 0x1111...; state overrides give that address the token balance, token->Permit2 allowance and Permit2->router allowance. Cap = supply x price (from sqrtP) x ETH/USD (last hourly value in ethusd_hourly.json).
Columns of `cross`: pool, token, hooks, quote, level (100000/300000), t_cross, block, cap_usd, age_s (cross minus pool init), amount_in (token wei), **ok** (1 sell simulates, 0 reverted, NULL not tested), **out_eth** (what the sell returns, only when ok=1), **revert** (raw revert data), t_sim, mode, err (e.g. slot_probe_fail = token balance/allowance slot not found, not tested).
mode: `at_cross` = live, state of the cross moment +seconds. `hist_at_latest` = backfill: the free nodes do not serve old state, so the pool was tested NOW, not at its cross: ok is valid (a sell that is blocked now was blocked-or-crashed), out_eth is NOT comparable to the cross price (pools have moved).
Backfill of the last 200 hooked pools is running niced (about 1 row per 20 s, done within ~2 h); the live service handles new crosses at once.

## Findings so far (read before trusting)
- Existing #227 table (sellsim.jsonl, sells 1% of supply at init+60 s, same method): H3000 ok 23, reverted 78, not tested 5 (30 of 57 "live" ones reverted). All reverts carry selector `0x4713c18b` (unknown, with args 0x120, 0): a router/hook-level refusal, not a plain price error. Same pools that simulated ok at +60 s revert when re-tested later (e.g. e6fc965d, 1addc49b): the hook can switch sells off after the launch phase. So a single check at the cross is the right moment, and "sellable at +60 s" says nothing about sellable at the cross.
- The simulation cannot tell "hook blocks sells" from "my router call is wrong for this pool type" for 0x4713c18b: no trace RPC on the free nodes. The pools with ok=1 prove the call itself is right. Treat 0 as "not sellable via the buy-bot router path".
- Native-quote pools are included (most recent H3000 are native), analyst1 asked for WETH: filter `quote='weth'`.

Example: `sqlite3 sellcross.db "select quote, ok, count(*), avg(out_eth) from cross where level=100000 and mode='at_cross' group by 1,2"`
