> **UPDATE 15:26 Bangkok (A1.18):** time stop is now **4 h** (was 2 h). H2 1.67x vs 1.35x, $946 vs $491 a day. Trailing stops all lose. See http://159.223.88.168/hx-c9ois/fw/a1-mc5-exits.md

# mc5 rule: one-page coder spec (FW Analyst 1, 6 Oct 2026, 15:09 Bangkok). PAPER ONLY until Ben says go.

Research behind it:
- http://159.223.88.168/hx-c9ois/fw/a1-v3-mc5-rule.md
- http://159.223.88.168/hx-c9ois/fw/a1-v3-mc5-fragility.md
- http://159.223.88.168/hx-c9ois/fw/a1-mc5-overlap.md
- http://159.223.88.168/hx-c9ois/fw/a1-mc5-selfbuy.md

Reference code: http://159.223.88.168/hx-c9ois/fw/a1code/v3sim.py and v3frag.py (`series_t`, `tr`).

## 1. Universe
- Uniswap v3 pools from factory 0x1f7d7550b1b028f7571e69a784071f0205fd2efa where one side is WETH 0x0bd7d308f8e1639fab988df18a8011f41eacad73.
- Any fee tier.
- One pool per token: the first WETH pool that trades.
- **T0 = block time of the pool's first Swap** (not pool creation time).

## 2. Entry check at T0 + 300 s
- Take the last Swap with block time < T0 + 300 s. Read its `sqrtPriceX96`.
- Price in WETH per token = (sqrtPriceX96 / 2^96)^2 × 10^dec / 1e18 if the token is token0. If the token is token1, use the inverse.
- Market cap = price × totalSupply / 10^dec × ETH/USD.
- **Buy only if $250,000 ≤ market cap < $1,000,000.**
- If no Swap happened in the 300 s, skip.
- **Dust guard (A1.20):** skip unless, before T0 + 300 s, at least one swap of 0.001+ WETH moved the price, and pool WETH is 0.1 or more. Price Predict bought a $271k "cap" with 0.0004 WETH in the pool, which went to 0.09x.
- If the bot first sees the pool after T0 + 330 s, skip and log `seen_late`. +4 and +6 min are measurably worse.
- No other filters: rep1, rep3 and fresh-buyer filters were tested and are not stable.

## 3. Fill ($100)
- Swap $100 of WETH through the real pool, using a quoter or the current tick liquidity.
- Costs: pool fee, plus GMGN 1% each way, plus gas (about $0.05).
- Log the quote, the fill and the fill delay from T0 + 300 s. Target: 6 s or less.
- Paper fill = pool state at the fill block, not at the check block.

## 4. Exit (first that happens)
- **a. Stop 0.5x:**
  - On every Swap of 0.01+ WETH in the pool, compute net sell value: quote the full token amount back to WETH through current liquidity, minus fees and gas, capped at 90% of the WETH in the pool.
  - If net value ≤ 0.5 × cost, sell all at the next block. Expected fill is about 3 s later.
  - Dust swaps (under 0.01 WETH) never trigger.
- **b. Time stop: sell all at entry + 4 h.** 3 to 4.5 h is a plateau. Past 5 h it loses; 12 h is 0.86x.
- **c. Pull = 0:**
  - A pull is the first Burn whose liquidity units are ≥ 50% of the liquidity units minted in the pool so far.
  - **Use the Burn `amount` (uint128 liquidity), never WETH amounts.** Most launches mint 0 WETH, so a WETH-based rule never fires. This was the A1.13 bug.
  - Count only positions whose tick range covers the current price. A2.14 found an out-of-range 1-tick burn that looked like a false pull.
  - On a pull, mark 0 and try to sell anyway.
- **No take profit and no trailing stop.** Trails armed at 2x (0.5, 0.6 or 0.7 of the peak) and "half at 3x" all lose (A1.18).
- The old reason still holds: Every target tested (1.5x, 2x, 3x) killed the edge, because the result lives on about 1 coin in 30 doing 10x or more.

## 5. Overlap with w2_v3_1m (2nd window, $1M gate)
- 42 of w2's 58 trades are mc5 coins. The same coin would be held twice ($100 + $500).
- Choose one, and make it a config value:
  - (A) w2 skips coins mc5 holds, or
  - (B) a max $ per token across both books.
- Log both books with a `token` column so overlap can be counted live.

## 6. Logging (per coin, including skips)
- Fields: pool, token, T0 (Bangkok), cap at +300 s, pool WETH, action (buy / skip reason), fill delay, fill price, x at exit, exit reason (stop / time / pull), peak x, Burns seen.
- Daily line: trades, mean, median, total $, green day yes/no.

## 7. Expectations (backtest, $100; 4 h numbers from A1.18, 13 Sep to 5 Oct)
- About 13 buys a day recently.
- 4 h stop: mean 2.56x (H1) / 1.67x (H2), about $650 to $950 a day. **Median about 0.48x. About 75% of trades lose.**
- Worst day minus $721. Worst 3 trading days minus $457.
- Judge only after 30+ trades. A red week is normal.
- Kill if, after 60 trades, the mean is under 1.0x AND no trade has hit 5x or more.
