{
 "notes": "EPISODE 4 (2026-11-09). Read 16 round-2 results plus late port-2 and arb-3. Batch results are public at https://api.imd.fun/artifacts/<sha256 of result.md> (checked live: net-1 66ed32a0..., port-3 0dbcc10a...). Hashes used in briefs: net-1 66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55, port-2 e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c, spline-1 2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a, qm-spline 17d249ab0c33fc44931d9b105cf3f9e3846a560bd518b67310c2a56defacdecc, lattice-2 394ca4b916405a51e7a08b13d6e4bfdfe49cc70a6429e2c7e4524438197dd1b0, a1 9efcbb4cb9a623a484b63469c879f99d5f128527ec5c93014379d57fd31ac2d0.\nFINDINGS. (1) PORT-3 IS CONFIRMED AND SUBMITTABLE: r2-confirm-a/b, 7 of 8 blocks of 256 (b3 failed: Darwin arm64 seat, setup blocked; its seeds 9601536..9601791 were never run): port-3 minus t03 per block +0.618/+0.746/+0.532/+0.617/+0.592/+0.652/+0.647 (se ~0.085 each) -> pooled n=1,792 mean +0.629, se ~0.033; minus IB ~+1.41; engine afterSwap peak over all blocks 207,453, 0 OOG, 18,466 bytes. Code: port-3 artifact, Strategy.sol sha256 62930b8e68277c69fc1acfba18de781e684d7fc6daac8dc562b8210dc3932ac1. The requester's >= +0.3 bar is met; a 1-item rerun of the b3 block (r3-confirm-p3-b3) completes n=2,048. (2) LEADERS: net-1 (port-3 filter + fixed-net 2-pass, sha256 5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f, 16,368 B) +1.228 se 0.103 vs t03 n=128, +2.009 vs IB, gate F 3e-9 bps, BUT engine peak 245,377 (377 over), 0 OOG; gate Q unmeasured (10 s per seed pair). port-2 (finer 41x25 table, ONE aggregated silent-step trunc = a policy change; no sha256 published; 18,484 B, name TaylorGaussianPlain2) +1.414 se 0.199 n=64 (seeds also used in debugging), engine peak 225,081, gate F 5.6e-4 bps, its own Q: compressed-vs-full -0.083 se 0.010 with the same aggregated filter (filter cost itself unmeasured). spline-1: final source (sha256 27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed, 21,106 B, name TaylorGaussianPlainSpline) passes Q (-0.0097 se 0.009) and F (0.0089 bps), pyrevm peak 193,623, but was NOT engine-tested; its earlier v24 scored +1.314 se 0.124 n=128 with engine peak 249,342. spline-2 did nothing (write-boundary refusal). Engine peak ~= pyrevm replay peak + ~48k (net-1: 197,653 -> 245,377; spline v24 similar). (3) qm-spline: 3-D cubic B-spline per table, 10,167 B, loss vs full qm 0.063 se 0.007 (so ~+3.71 vs HA on replica, about +0.9 above the plain policy); mirror symmetry holds in all but one cell; lookup ~570 mults + 48 divs per pair and 64-100 coefficient reads; full precomputed basis tables would be ~13 KB more, so size (24,576) is the risk unless bases are computed at runtime; the net fit of qm (second r2-qm-compress item) is still running. (4) LATTICE DOES NOT FIT: lattice-2 ported it exactly (1e-8 bps match): mean 453k gas, peak 10.5M, 64% of callbacks over 245k; best reduction (31 cells x 10 bps, cap 1) still peaks 258-269k in pyrevm and loses -0.18 vs the full lattice; lattice-1 blocked on macOS. Line stopped. (5) ARB LINE: arb-3 (router likelihood) +0.049 se 0.012 on the report set, 2% of the 2.7; arb-2 +0.024. Line stays closed. (6) Two items failed because the seat was macOS (b3, lattice-1): every Linux brief now says to return blocked at once on a non-Linux platform.\nROUND 3 (this episode, 30 items, 9 batches, none over 5 items so no canary holds): r3-confirm-net-a/-b (net-1 unchanged, 2 blocks of 1,024 as 4x256), r3-confirm-p2-a/-b (port-2, same), r3-confirm-spl-a (spline-1 final, 1 block: tells its engine peak and score), r3-confirm-p3-b3 (port-3 on the unrun b3 block); all one generic brief: byte-exact extraction, sha/size/name checks, paired vs t03 and IB, gas_stats, per-seed CSV. r3-trim-net (2 copies): net-1 gas trim keeping fees (target pyrevm peak <= 185k, engine <= 240k), aggregated silent steps only as last resort and declared; gate F; engine 128 seeds. r3-gate-q (5 replica items): net2 policy on choose 60000..61023 and report 10000..11023 / 11024..12047; agg (port-2's filter change alone, full tables) on the two report halves. r3-qm-port (2 copies, no engine run: size and pyrevm gas decide feasibility, engine peak ~= pyrevm peak + 48k): qm-spline lookup in port-3's shell (copy 2 with port-2's aggregated filter for gas room); gate P on the qm column, reference = real.py qm variant with the decoded tables, gate F; must report size and per-lookup gas even if it fails. Cancelled stale round-1 batches r1-ref, r1-baseline, r1-arb (all their questions are answered elsewhere). Read next: r2-net/net-2 if it lands.\nSEED REGISTRY (engine, fresh from 9500000, never reuse): 9500000..9501023 r1-baseline; 9510000..9510191 r1-port; 9520000..9520127 spline-1; 9521000..9521127 spline-2 (unused, keep burned); 9522000..9522127 net-1; 9523000..9523127 net-2; 9524000..9524063 lattice-1; 9525000..9525063 lattice-2 (unused); 9530000..9530127 trim-1; 9531000..9531127 trim-2; 9600000..9601023 r2-confirm-a; 9601024..9602047 r2-confirm-b (9601536..9601791 rerun by r3-confirm-p3-b3); 9602048..9603071 net-a; 9603072..9604095 net-b; 9604096..9605119 p2-a; 9605120..9606143 p2-b; 9606144..9607167 spl-a. NEXT FREE: 9532000 and 9607168. Replica seeds: choose 60000..61023, report 10000..12047, gate F replays 70000..70049.\nNEXT EPISODE (5): (1) Pool each confirmation block (mean of all 1,024 diffs, se = sd/sqrt(n)); the requester submits any contract with >= +0.3 over t03 on 2,048 seeds, peak <= 245,000, 0 OOG: port-3 already qualifies (give code URL + sha256 62930b8e... in the notes and write-up); net-1 qualifies on score but only if its confirmed peak is <= 245,000 (it was 377 over on 128 seeds, so expect not); port-2 qualifies if its 2,048-seed score holds and peak stays under; spline-1 final if its peak is under. (2) From r3-trim-net pick the copy with gate F passed, engine peak <= 240,000, 0 OOG, policy unchanged if possible; spawn its 2,048-seed confirmation (two blocks of 1,024 as 4x256 from 9607168 and 9608192). (3) From r3-gate-q report the net2 loss (full minus net2) and the agg filter cost on n=2,048 each; if agg costs more than ~0.1, prefer the fee-preserving trim or spline over port-2. (4) From r3-qm-port: if a copy fits size (<= 24,576 B) and gas (pyrevm peak <= 190,000) with gate F passed, give it a 128-seed engine check and a 2,048-seed confirmation (blocks from 9532000 for the check, 9608192 and 9609216 for the confirmation); if size/gas fails, use the qm net fit (r2-qm-compress second item) in the trimmed shell instead, 2 copies. (5) Episode 6: confirm the qm contract; episode 7: finish and write up (best contract's complete code + sha256, paired vs t03 and IB with n, mean_diff, se, worst5, gas_stats, gates P/Q/F evidence, what is missing). Budget after this episode: 87 items, 4 episodes. Keep every brief under 3,000 characters filled (these are 2,300-2,950).",
 "spawn": [
  {
   "name": "r3-confirm-net-a",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9602048",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9602048",
      "end": "9602303"
     }
    },
    {
     "key": "s9602304",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9602304",
      "end": "9602559"
     }
    },
    {
     "key": "s9602560",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9602560",
      "end": "9602815"
     }
    },
    {
     "key": "s9602816",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9602816",
      "end": "9603071"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-confirm-net-b",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9603072",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9603072",
      "end": "9603327"
     }
    },
    {
     "key": "s9603328",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9603328",
      "end": "9603583"
     }
    },
    {
     "key": "s9603584",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9603584",
      "end": "9603839"
     }
    },
    {
     "key": "s9603840",
     "vars": {
      "cand": "net-1",
      "art": "https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55",
      "section": "## Strategy.sol (shipped, verbatim; sha256 5c40c67a...)",
      "sha": "5c40c67a9c5c3c2cb3f1aea95d6f605ef110a87b7674759b65836b5c9ec1609f",
      "name": "TaylorGaussianPlainNet2",
      "bytes": "16,368",
      "start": "9603840",
      "end": "9604095"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-confirm-p2-a",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9604096",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9604096",
      "end": "9604351"
     }
    },
    {
     "key": "s9604352",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9604352",
      "end": "9604607"
     }
    },
    {
     "key": "s9604608",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9604608",
      "end": "9604863"
     }
    },
    {
     "key": "s9604864",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9604864",
      "end": "9605119"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-confirm-p2-b",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9605120",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9605120",
      "end": "9605375"
     }
    },
    {
     "key": "s9605376",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9605376",
      "end": "9605631"
     }
    },
    {
     "key": "s9605632",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9605632",
      "end": "9605887"
     }
    },
    {
     "key": "s9605888",
     "vars": {
      "cand": "port-2",
      "art": "https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c",
      "section": "### Strategy.sol",
      "sha": "not published by its author: compute it, report it, and rely on the size and name checks",
      "name": "TaylorGaussianPlain2",
      "bytes": "18,484",
      "start": "9605888",
      "end": "9606143"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-confirm-spl-a",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9606144",
     "vars": {
      "cand": "spline-1 final",
      "art": "https://api.imd.fun/artifacts/2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a",
      "section": "### contracts/src/Strategy.sol",
      "sha": "27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed",
      "name": "TaylorGaussianPlainSpline",
      "bytes": "21,106",
      "start": "9606144",
      "end": "9606399"
     }
    },
    {
     "key": "s9606400",
     "vars": {
      "cand": "spline-1 final",
      "art": "https://api.imd.fun/artifacts/2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a",
      "section": "### contracts/src/Strategy.sol",
      "sha": "27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed",
      "name": "TaylorGaussianPlainSpline",
      "bytes": "21,106",
      "start": "9606400",
      "end": "9606655"
     }
    },
    {
     "key": "s9606656",
     "vars": {
      "cand": "spline-1 final",
      "art": "https://api.imd.fun/artifacts/2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a",
      "section": "### contracts/src/Strategy.sol",
      "sha": "27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed",
      "name": "TaylorGaussianPlainSpline",
      "bytes": "21,106",
      "start": "9606656",
      "end": "9606911"
     }
    },
    {
     "key": "s9606912",
     "vars": {
      "cand": "spline-1 final",
      "art": "https://api.imd.fun/artifacts/2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a",
      "section": "### contracts/src/Strategy.sol",
      "sha": "27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed",
      "name": "TaylorGaussianPlainSpline",
      "bytes": "21,106",
      "start": "9606912",
      "end": "9607167"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-confirm-p3-b3",
   "brief": "Confirm {{cand}} unchanged on fresh engine seeds {{start}}..{{end}} (256 seeds), paired vs t03 and IB. SOURCE: in {{art}} the fenced solidity block under '{{section}}'; copy it byte for byte (keep its trailing newline) to contracts/src/Strategy.sol. Expected sha256: {{sha}}. `amm-match validate` must succeed naming '{{name}}'; deployed bytes must be {{bytes}}. If a check differs, report the difference and stop. SETUP (Linux x86_64 only: on any other platform, or on any setup failure, return blocked={step,error} at once and stop): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in the Setup section of https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 as scratch/setup.sh; run `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment work, state under scratch/. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i (default_rng(i) draws retail size, arrival rate, GBM sigma in that order); chunks of 32 seeds; amm_sim_rs.gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no tuning, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...); IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). RESULT (markdown) must contain: a setup table (or blocked={step,error}); the sha256 you measured and the deployed bytes of all three sources, and the validate line; mean edge per strategy (n=256); paired {{cand}} minus t03 and {{cand}} minus IB, each with n, mean_diff, se (sample sd / sqrt n), wins, worst5 (seed, diff); gas_stats for role Submission, callback afterSwap, summed over chunks, for all three strategies: calls, oog, peak, mean, revert, other_halt, tx_error, bad_return; and the per-seed CSV `seed,cand,t03,ib` (256 rows, 3 decimals). Every figure must be your own measurement from this run; copy nothing from the source artifacts' results.",
   "items": [
    {
     "key": "s9601536",
     "vars": {
      "cand": "port-3",
      "art": "https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067",
      "section": "### contracts/src/Strategy.sol",
      "sha": "62930b8e68277c69fc1acfba18de781e684d7fc6daac8dc562b8210dc3932ac1",
      "name": "TaylorGaussianPlainCoarse",
      "bytes": "18,466",
      "start": "9601536",
      "end": "9601791"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 32000
   }
  },
  {
   "name": "r3-trim-net",
   "brief": "Trim net-1's gas under the 245,000 afterSwap peak, keeping its fees, copy {{copy}} of 2. net-1 = https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55: port-3's Gaussian filter + fixed-net 2-pass fee, Strategy.sol sha256 5c40c67a...; reference netref.py Net2 over port-3's standalone.py Coarse; gen.py; Taylor's replica: gtmcknight/amm-sim@4812a638 research/solved. Engine peak 245,377, pyrevm replay peak 197,653: target pyrevm peak <= 185,000, engine <= 240,000. Peak path: long silent gap (12 trunc), update, two net passes. Fees identical to netref.Net2 within gate F: (1) cheaper arithmetic on the same formulas (fewer ln terms given the range reduction, cheaper cdf tail, no memory structs in the loop, shared ask/bid work); (2) cheaper data access (fewer PUSH32 words touched, tighter exact packing via gen.py); (3) ONLY if the pyrevm peak stays above 185,000: port-2's aggregated silent steps (add 893025000000 per silent step, one trunc; _trunc_port in https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c); that changes the policy: change netref the same way and say so. Keep `contract Strategy is AMMStrategyBase`, Taylor (gtmcknight) credited, no assembly, deployed <= 24,576 B, `amm-match validate` passing. SETUP (Linux x86_64 only; on another platform or a setup failure return blocked={step,error} at once): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in port-3's Setup section as scratch/setup.sh; `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment, state under scratch/. GATE F: 50 replica runs seeds 70000..70049, first 2,000 own-pool callbacks each driven by the reference, replayed on a fresh pyrevm deployment at 245,000 gas per call: max |fee diff| <= 0.01 bps. ENGINE: each strategy alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs with seed i; chunks of 32; gas_stats_reset() before and gas_stats() after each chunk; only the named seeds, each once, no reruns. t03 = zlib(base64(code_zb64)) of https://api.imd.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336 (sha256 cb6d9455...), IB likewise from https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557 (sha256 30194182...). Seeds: {{seeds}} (128): trimmed contract, t03, IB. RESULT (markdown): each change and the pyrevm gas it saved on one fixed trace; gate F max/mean diff, pyrevm peak/mean; engine paired vs t03 and vs IB {n, mean_diff, se, worst5}; gas_stats Submission afterSwap (calls, oog, peak, mean); deployed bytes, validate line; whether fees are net-1's (policy unchanged) or changed; complete Strategy.sol verbatim + sha256; Python reference if changed.",
   "items": [
    {
     "key": "trim-1",
     "vars": {
      "copy": "1",
      "seeds": "9530000..9530127"
     }
    },
    {
     "key": "trim-2",
     "vars": {
      "copy": "2",
      "seeds": "9531000..9531127"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 64000
   }
  },
  {
   "name": "r3-gate-q",
   "brief": "Gate Q on Taylor's (gtmcknight) replica: policy {{policy}} paired against Taylor's full plain policy on seeds {{seeds}}. REPLICA: clone https://github.com/gtmcknight/amm-sim at 4812a6382311624e1506aca131ca35c378f930d9, work in research/solved (README first), plain `python3 -I`, no other setup, any machine. GATE P first: unmodified `python3 -I gates.py` must print the README's gate block (gaussian+plain 443.455598 / 571.463409 / 525.168028). FULL arm: real.RealPolicy(real.load('pol_mid.json'), {'soft': 1}) through replica2.run(seed, policy), edge per seed. POLICY net2: the fixed-net 2-pass policy exactly as shipped in net-1 (https://api.imd.fun/artifacts/66ed32a0fd17a43295542d22510b004a5323688a74b4321629ae875bb4592e55): its netref.py class Net2 (mode 2) and payload.bin (2,730 bytes, sha256 9727ecc8...; payload published in the fixed-net result https://api.imd.fun/artifacts/cc8778a3d8f1f86ffbfc77e971b5ed598b27fee68d61c338e8f3cb2057a363d0) over port-3's standalone.py Coarse filter (https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067); check the payload sha256 and that netref matches fixed-net's decoder on a few grid cells before scoring. POLICY agg: port-2's filter approximation alone: PortReal from reference.py in https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c (Taylor's per-silent-step truncation replaced by one truncation after accumulating the silent steps' variance, cap 12) with the FULL pol_mid.json tables, soft=1, so the loss measured is the filter change only. Each seed once, both arms on their own trajectories, paired by seed. No command over 8 minutes: chunks of 64 seeds with multiprocessing, append (seed, full, policy) to a CSV under scratch/, resume from it. RESULT (markdown) must contain: gate P output; the policy and the sha256 of every code and data file used; n completed (if fewer than all seeds, say which and why; never fill in); paired policy minus full: n, mean_diff, se = sample sd / sqrt(n), worst5 (seed, diff); mean edge of each arm; seconds per seed pair; the per-seed CSV.",
   "items": [
    {
     "key": "net2-choose",
     "vars": {
      "policy": "net2",
      "seeds": "60000..61023"
     }
    },
    {
     "key": "net2-report-a",
     "vars": {
      "policy": "net2",
      "seeds": "10000..11023"
     }
    },
    {
     "key": "net2-report-b",
     "vars": {
      "policy": "net2",
      "seeds": "11024..12047"
     }
    },
    {
     "key": "agg-report-a",
     "vars": {
      "policy": "agg",
      "seeds": "10000..11023"
     }
    },
    {
     "key": "agg-report-b",
     "vars": {
      "policy": "agg",
      "seeds": "11024..12047"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 48000
   }
  },
  {
   "name": "r3-qm-port",
   "brief": "Port Taylor's (gtmcknight) qm tables into the Gaussian contract with the qm-spline compression, copy {{copy}} of 2. READ port-3 https://api.imd.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067 (shell, filter, slots, PUSH32 data, standalone.py, check.py replay, engine.py) and qm-spline https://api.imd.fun/artifacts/17d249ab0c33fc44931d9b105cf3f9e3846a560bd518b67310c2a56defacdecc (QMS1 blob 10,167 B sha256 3ac7cb88..., layout, decoder, how real.py's qm variant reads the tables). Taylor's files: github.com/gtmcknight/amm-sim at 4812a6382311624e1506aca131ca35c378f930d9, research/solved (README first), under plain `python3 -I`. GATE P: `python3 -I gates.py` prints the gaussian+qm column 443.522608 / 571.623551 / 525.865859 before any change. BUILD contracts/src/Strategy.sol = port-3 with the qm lookup in place of fees(): inputs w, R, phase, sd = sqrt(v) in bps, synced tracked as real.py does; evaluate the decoded spline as the reference does at the 4 grid nodes x 2 sd levels (ask) and the mirrored nodes (bid). Precompute what fits (8x4 sd basis, node basis values) but deployed bytes <= 24,576: if basis tables do not fit, store knots and evaluate the cubic basis at runtime. Copy 1: port-3's filter unchanged. Copy 2: port-2's aggregated silent steps (one trunc after summing their variance; reference.py in https://api.imd.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c) to buy gas, reference changed the same way. REFERENCE: real.RealPolicy(pol_mid.json, {'soft': 1, 'qm': <decoded JSON>}): exactly the shipped tables. Keep `contract Strategy is AMMStrategyBase`, Taylor credited, no assembly, `amm-match validate` passing. SETUP (Linux x86_64 only; on another platform or a setup failure return blocked={step,error} at once): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704 in your workspace (never /tmp); save the setup script quoted verbatim in port-3's Setup section as scratch/setup.sh; `sh scratch/setup.sh` once from the checkout root; prefix later commands with `. scratch/env.sh && `. No command over 8 minutes: segment, state under scratch/. GATE F: 50 replica runs seeds 70000..70049, first 2,000 own-pool callbacks each, replayed on a fresh pyrevm deployment at 245,000 gas per call; max |fee diff| <= 0.01 bps; pyrevm peak/mean (the real engine adds about 48,000 to the pyrevm peak, so a pyrevm peak over 190,000 will not fit). No engine run in this item; the next step confirms on fresh engine seeds. If size or gas fails, still report deployed bytes, the pyrevm gas of one qm lookup pair and the gap. RESULT (markdown): gate P/F figures, size, validate line, pyrevm gas, complete Strategy.sol verbatim + sha256, reference and decoder code, how the decoded JSON was made, problems.",
   "items": [
    {
     "key": "qm-1",
     "vars": {
      "copy": "1"
     }
    },
    {
     "key": "qm-2",
     "vars": {
      "copy": "2"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 64000
   }
  }
 ],
 "read": [
  "r2-net/net-2"
 ],
 "cancel": [
  "r1-ref",
  "r1-baseline",
  "r1-arb"
 ],
 "wake": {
  "batches": [
   "r3-confirm-net-a",
   "r3-confirm-net-b",
   "r3-confirm-p2-a",
   "r3-confirm-p2-b",
   "r3-confirm-spl-a",
   "r3-confirm-p3-b3",
   "r3-trim-net",
   "r3-gate-q",
   "r3-qm-port"
  ],
  "afterMinutes": 150
 },
 "finish": false
}