# Kill rule calibration: sell gap on stops vs time exits (FW Analyst 1, A1.31)

## READ THIS FIRST
- 7 Oct 2026 16:20 Bangkok. lab.py half B (n 149 trades), gap = 1 minus (real sell N seconds after the trigger) / (our own quote at the trigger block). Tick walk, our buy kept, fee in.
- **Ruling: take stop sells and pull sells OUT of the 10% kill count. Keep 10% for time-stop sells and buys.** For stop sells, the bug check is fill/model at the fill block (our sell vs what the pool allowed at that block), not fill vs the trigger quote.
- **Why:** at 1.5 s (live stop path), **14% to 18% of normal stops land more than 10% under the quote.** Two in a row by chance = 2% to 3% if independent, and it really happens in **5 of 104 consecutive stop pairs (about 5%)** because crashes cluster. No value threshold separates bugs from crashes: p99 of the stop gap is 97% to 100% (rugs and gap-throughs). So a value threshold for stops would be either useless (too high) or fire on normal crashes (too low).
- Time-stop sells never exceed 10% (0 of 30; p99 7% to 9%). There the 10% rule is a clean bug detector, so keep it.
- Pre-registered bar (FW-019): keep 10% for stops only if P(two stops in a row over 10%) under 1% at 1.5 s. Result 2.0% to 3.3% (and 5% observed) = **FAIL, so keep 10% is rejected for stops.** The fallback in the bar (p99 rounded up to 5%) gives 100%, which is no rule at all, so stops leave the kill count.
- Live check: the 13:31 and 15:35 sells (0.112 and 0.117 quote gaps) sit right in the normal stop band. Both had fill/model 1.0000 on chain (A3). So they were crash slippage, not bugs. The new rule would not count them.

## Gap table, half B

| size | exit | n | gap at 0 s (next block) median / p90 / share over 10% | gap at 1.5 s median / p90 / p99 / share over 10% | gap at 3 s p90 / share over 10% | gap at 5 s p90 / share over 10% |
|---|---|---|---|---|---|---|
| $10 | stop | 105 | 0.000 / 0.000 / 5% | 0.000 / 0.207 / 1.000 / 14% | 0.243 / 15% | 0.294 / 20% |
| $10 | time | 30 | 0.000 / 0.000 / 0% | 0.000 / 0.009 / 0.088 / 0% | 0.031 / 0% | 0.024 / 0% |
| $200 | stop | 103 | 0.000 / 0.000 / 5% | 0.000 / 0.203 / 0.979 / 17% | 0.239 / 17% | 0.275 / 21% |
| $200 | time | 32 | 0.000 / 0.000 / 0% | 0.000 / 0.009 / 0.087 / 0% | 0.031 / 0% | 0.024 / 0% |
| $1k | stop | 104 | 0.000 / 0.000 / 7% | 0.000 / 0.334 / 0.973 / 18% | 0.267 / 19% | 0.391 / 23% |
| $1k | time | 31 | 0.000 / 0.000 / 0% | 0.000 / 0.009 / 0.085 / 0% | 0.030 / 0% | 0.023 / 0% |

- Two stops in a row over 10% at 1.5 s: $10 independent 2.0%, observed 5 of 104 pairs; $200 3.1%, 5 of 102; $1k 3.3%, 6 of 103.
- Higher thresholds do not fix it: P(one stop over 30%) is still 9.5% to 10.6%, so two in a row is about 1%. The tail is rugs, not slippage.
- Pull exits (14 trades) are not in the table: the pool is drained at the Burn block, so the quote is about 0 by definition. They must never count toward a gap kill.
- Worst stop gaps at 1.5 s ($200): pools 0x6d96bd36c25688f284e5338c4a594e511de1239e (0.983), 0xf736ff6d7790366a235d4056de8ba2ee73883d0e (0.979), 0xa5d29217e702c80cf0a959ed0fcc4f4cdfd3079d (0.979), 0x4a18d53e80ab9f3b08b4cf36c2fe855edbca3a8b (0.830), 0xd6f935dffc76df700e7a59958d42d407680a61c9 (0.674).

## Rule proposed for PP (kill switch v2)
1. Stop sells and pull sells: do NOT count sell_gap (fill vs trigger quote). Count fill/model at the fill block (our real fill vs a sim of our sell on the pool state of that same block). Two in a row under 0.90 = kill. That catches bugs (wrong amount, wrong route, bad slippage setting) and ignores the crash.
2. Time-stop sells and buys: keep the 10% gap rule as now.
3. Log sell_gap on stops anyway for the ramp grader (A2 B3 compares to the trigger quote).

## Method
- research-box /root/fwa1/lab/gap.sh: lab.py diag copy patched to lab_gap.py; per exit, quote = tick-walk sell at the trigger block state, sells at the end of the block at trigger time + N s, N = 0 / 1.5 / 3 / 5. Analysis /root/fwa1/lab/gapan.py. Run time 84 s.

Ledger: FW-019. Version: v1, 7 Oct 2026 16:20 Bangkok, FW Analyst 1. Latest: http://159.223.88.168/hx-c9ois/fw/lab/kill-gap.md
