# Root merge 4 of 6: 25 results (b33–b44) The goal: take this network from 20th to 1st on paradigm.xyz/puzzles/amm. IB = 522.00 on the board; 10th place is +2.7 over IB and 1st is +6.4. The Track A bar is **+2.7 over IB on 4,000 fresh engine seeds**. A Track B idea is promoted into A's next port only if it gains ≥ +0.3. Every figure below is quoted from the input file named next to it in brackets. The inputs are under `.imd/reads/artifacts/` and their SHA-256 values were checked against the brief. Short names used here: - **M09**: the mix-2 Strategy.sol with only `THR` changed from 0.5 to 0.9 (source sha `a44cca4b…`). - **PB**: BlendGaussian. - **Q2**: QmGaussianPort. - **IB**: inputs_b. - **thr09 base**: the replica policy `thrpol:ThrLattice thr=0.9 qm=qm_k1e-5.json`. Paired statistics are written as mean_diff ± se, where se is the sample SD over √n, unless a file says otherwise. ## 0. Summary 1. **Track A: M09 qualified and is confirmed on the engine.** - Two independent copies, [b33-m09-1] and [b33-m09-2], each reproduced the same source bytes. Both report fee parity of 2.7e-9 bps max over 216,453 callbacks, 0 OutOfGas, 0 reverts, and `amm-match validate` passing. - Engine runs on fresh seeds were in 10 files: 2 pilots of 64 seeds and 8 blocks of 256. Pooled, they cover **2,176 seeds: M09 − IB = +3.768 ± 0.032** (my pooling of the per-file sum and sumsq). - That is above the +2.7 bar, but on 2,176 of the 4,000 seeds the bar requires. **1,824 seeds remain to be run.** - One 256-seed block, 12007168..12007423, was **not run**. Its seat had no network [b39-eng-12007168], so those seeds are still fresh. 2. **Track B: none of the 11 ideas reached the +0.3 bar.** - Best: the per-step joint price/rival router likelihood [b40-joint-1], **+0.0798 ± 0.0088** over the thr09 base on the 2,048-seed holdout. - Then the empirical fill-law KDE [b37-fresh5-2], +0.0302 ± 0.0057, and the posterior-integrated rival projection [b37-fresh5-1], +0.0178 ± 0.0053. - Four ideas lost and the rest were null. Details are in §3. 3. **The thr09 base's lead over the lattice reference is inherited.** The unchanged thr09 base scores **+0.3229 ± 0.0107** over ref/lattice_qm.json on 10000..12047 (n=2048, sum 661.2827). Six files reproduce this exactly: [b35-probe-2], [b36-same-step], [b37-fresh5-2], [b40-joint-1], [b41-values-1] and [b42-value-residual]. [b43-fresh6-1] reproduces it as well. Every Track B gain below is measured on top of it. ## 1. Track A: qualifying M09 (b33-m09-1, b33-m09-2) The two copies agree on every number they both report. | item | m09-1 | m09-2 | |---|---|---| | source sha256 | a44cca4b…ed5f (matches expected) | same | | change vs mix-2 | only `THR` 5e17 → 9e17; mix-2 artifact 199bcc1d…, code_sha256 75723e84… "verified" | same | | generator | gen.py with THR=0.9 is byte-identical to Strategy.sol | same; gen.py default 0.5 is byte-identical to shipped mix-2 | | bound rule | merge_after 2, silent_step_cap 12, quote 0, floor 1e-5, thr 0.9, all PB Q2 tables | same | | gates.py | reproduces README digits for 10000..10002 (10000: 448.261189 443.455598 443.522608 443.663520) | matches for 10000..10002, all four columns | | replica: M09 vs gauss (60000..61023, n=1024) | +0.7230 ± 0.0200 | identical | | replica: M09 vs thr0.5 mix-2 | +0.3351 ± 0.0145 | identical | | replica: thr0.5 vs gauss | +0.38787 ± 0.0184 | same; reproduces the mix-2 artifact cost_paired exactly (sum 397.1815) | | worst seed vs gauss | 60210: −1.656 | same | | first-trade misread | gauss 17.23–17.37%; thr09 29.13–29.42%; thr05 16.40–16.58% per block | same | | fee parity, 20 runs on seeds 10000..10019 | 216,453 callbacks, max 2.72139e-9 bps, 0 over 0.01 | same | | pyrevm afterSwap gas over parity callbacks (195,000 limit) | peak 146,477, mean 63,989, 0 OOG, 0 reverts | same | | forced two-component states, 64 sequences | peak 146,514 at target π=0.899999 | peak 146,984 at target π=0.499999 | | stress, 64×256 calls | peak 159,900, mean 65,702, 0 OOG/revert | same | | initialize | not reported | 7 reserve pairs including extremes, peak 229,720 (limit 250,000), 0 reverts | | validate | "MixGaussian validated successfully" | same | | runtime bytes / slots / asm | 21,984 / 12 / none; CODECOPY, CALLCODE, DELEGATECALL, SELFDESTRUCT all 0 | same | | engine seeds used | 0 | 0 | | code_sha256 (sha of uncompressed tar) | edbdf4b9…db95 | 974c242b…2e73 (the two bundles differ, see below) | Notes: - **The bundles differ, but the contract does not.** m09-1 and m09-2 submitted different bundles: m09-2's tar adds tools such as initgas.py, scan.py and cost.py. The Strategy.sol source sha is the same in both. - **m09-2 used a stricter afterSwap limit than the goal's.** m09-2 lists `peak<=195000` as a requirement it met. That holds for the pyrevm replica callbacks (146,477). On the engine, however, M09's afterSwap peaks are 201,632–214,835 (§2). They are over 195,000 but under the goal's 245,000. The pyrevm and engine gas figures measure different call sets, and the gap is not explained by either file. - **Hash mismatches recorded but not resolved:** - [b34-pilot-12005248] reports that the declared code_sha256 values for PB and the mixture (b29fa4ff…, 75723e84…) do not equal the SHA-256 of their decompressed tars (94fd852f…, 9c0d0c52…). - Several Track B files report the same kind of mismatch for base artifact 22819a15…: declared f6504da3…, computed 11ced754…. Those files used thrpol.py, whose file hash 66396570…8958 was checked. ## 2. Track A: M09, IB and controls on the engine Setup shared by all engine files: engine 6b6921f8, wheel aedb6828…, solc 0.8.24 viaIR, `run_batch(X, VanillaStrategy, configs, 8)`, configs built by MatchRunner._build_configs. Each file checks configs field by field. Bytecode hashes are the same in every file that reports them: - IB: runtime a4f70330…, 14,528 bytes. - M09: runtime e95f44d1…, 21,984 bytes. - Q2: d040e6e1…, 23,729 bytes. - PB: 86e512cf…, 21,915 bytes. - Vanilla creation: 3bcbd8a2…. All arms passed validate. Every file reports 0 faults on the submission side: no OOG, revert, halt or bad return. | file | seeds | control | M09−IB | control−IB | M09−control | afterSwap peak M09 / IB / ctl | |---|---|---|---|---|---|---| | b34-pilot-12005248 (pilot) | 12005248..311 (64) | PB | +3.5519 ± 0.1824 | +3.0961 ± 0.1890 | +0.4558 ± 0.0766 | 202,118 / 232,002 / 215,827 | | b34-pilot-12005312 (pilot) | 12005312..375 (64) | PB | +4.1855 ± 0.1844 | +3.7499 ± 0.1986 | +0.4356 ± 0.0657 | 201,632 / 237,117 / 200,193 | | b38-eng-12005376 | 12005376..631 (256) | Q2 | +3.7446 ± 0.0887 | +2.9206 ± 0.0925 | +0.8239 ± 0.0360 | 202,181 / 234,853 / 203,606 | | b38-eng-12005632 | 12005632..887 (256) | Q2 | +3.8665 ± 0.1283 | +3.0483 ± 0.1301 | +0.8182 ± 0.0343 | 210,064 / 234,775 / 206,021 | | b38-eng-12005888 | 12005888..6143 (256) | Q2 | +3.6434 ± 0.0792 | +2.8157 ± 0.0809 | +0.8277 ± 0.0367 | 202,068 / 232,035 / 195,006 | | b38-eng-12006144 | 12006144..399 (256) | Q2 | +3.6978 ± 0.0854 | +2.9012 ± 0.0846 | +0.7966 ± 0.0346 | 202,789 / 232,023 / 196,161 | | b39-eng-12006400 | 12006400..655 (256) | PB | +3.6907 ± 0.0923 | +3.2356 ± 0.0900 | +0.4552 ± 0.0368 | 202,125 / 234,837 / 200,463 | | b39-eng-12006656 | 12006656..911 (256) | PB | +3.8258 ± 0.0909 | +3.3730 ± 0.0934 | +0.4528 ± 0.0326 | 214,835 / 234,977 / 208,201 | | b39-eng-12006912 | 12006912..7167 (256) | PB | +3.7737 ± 0.0936 | +3.3372 ± 0.0903 | +0.4365 ± 0.0358 | 204,286 / 232,015 / 203,349 | | b39-eng-12007168 | 12007168..423 | — | **not run, blocked** | — | — | — | | b44-eng-12007424 | 12007424..679 (256) | PB | +3.8511 ± 0.0845 | +3.3568 ± 0.0807 | +0.4943 ± 0.0350 | 202,222 / 234,925 / 211,100 | How the table was built: - I took the peaks as the per-arm maxima of the Submission afterSwap `max_ok_gas` across each file's gas_stats commands. - afterInitialize peaks were the same everywhere: M09 229,594, IB 243,227, PB 140,992, Q2 142,315. - [b44-eng-12007424] also reports mean afterSwap gas: M09 111,569, IB 135,146, PB 99,896. **Pooled results** (my computation from each file's paired n, sum and sumsq; no rows re-read): | contrast | n | mean | se | |---|---|---|---| | M09 − IB (all 10 files) | 2,176 | **+3.768** | 0.032 | | PB − IB (PB-control files) | 1,152 | +3.337 | 0.042 | | M09 − PB | 1,152 | +0.458 | 0.017 | | Q2 − IB (Q2-control files) | 1,024 | +2.921 | 0.050 | | M09 − Q2 | 1,024 | +0.817 | 0.018 | What these show: - The block means for M09 − IB range from +3.55 to +4.19 in the 64-seed pilots and from +3.64 to +3.87 in the 256-seed blocks. No seed in any reported worst-5 list for M09 − IB is negative except two: - 12006780, −1.148 [b39-eng-12006656]; - 12006972, −1.239 [b39-eng-12006912]. - **Coverage toward the bar:** the 2,176 seeds used run from 12005248 to 12007679, minus the blocked 12007168..12007423. That is 2,176 of 4,000. A further 1,824 fresh seeds are needed, starting at 12007680, and the blocked block 12007168..423 can still be used fresh. - **Gas headroom:** M09 meets afterSwap ≤ 245,000 with at least 30,165 gas to spare (worst 214,835). IB's own peak reaches 237,117. - **Where the edge sits on the board:** the absolute 256-seed arm means in [b38-eng-12005632] are M09 527.43, Q2 526.62 and IB 523.57. These depend on the block and are not board scores. The files themselves say to compare paired diffs only [b44-eng-12007424 limitations]. - **What the replica predicted vs. what the engine shows:** - Replica: M09 vs thr0.5 mix-2 +0.335, and mix-2 vs gauss +0.388 [b33]. - Engine: M09 − PB ≈ +0.46 and M09 − Q2 ≈ +0.82. Engine contrasts against these controls are larger than the replica contrasts. - This is not a contradiction: PB and Q2 are not the replica's gauss or thr05 arms. Process caveats reported by the files themselves: - [b38-eng-12005888]: two block-3/4 commands may have run at the same time. No effect on scores. - [b39-eng-12006656]: PB was rebuilt from the IB bundle (PB.lines.json and Q2.sol). Validate output names it BlendGaussian, but the file does not give a PB runtime hash. - The pilots say "provisional, not a promotion claim". - [b39-eng-12007168] error, verbatim: "Proxy CONNECT aborted (curl exit 56)" for github.com, codeload, raw.githubusercontent, api.imdnotdead.fun, pypi.org and example.com. It records "All 256 seeds for every arm … are still fresh and unused." ## 3. Track B: blind replica ideas against the thr09 base Protocol, per the files: blind `run.py`, pair.py checks, tuning on replica seeds 62000+ or 63000+, one confirmation block, then a single holdout on 10000..12047 compared with both a fresh unchanged base and ref/lattice_qm.json. Diagnostic references for the full holdout: - thr09 base: first-trade misread 28.88% (thr=0.9 call), callback price RMS 13.2772 bps, mean edge 534.1438. - lattice_qm reference: misread 16.22%, RMS 13.6428, mean edge 533.8209. The 29% vs 16% misread gap reflects the threshold (0.9 vs 0.5), not worse reading [b42-history-price, b40-joint-1]. | file | idea | tuning | confirmation | holdout vs thr09 base | holdout vs lattice_qm | verdict | |---|---|---|---|---|---|---| | b40-joint-1 | joint price/rival hypotheses with the exact first-fill router likelihood; K=1 selected | K1 +0.100 ± 0.024 (63000..255); K2 +0.093, K4 +0.090, K8 +0.099; K8−K1 −0.001 ± 0.010 | +0.1017 ± 0.0232 | **+0.0798 ± 0.0088** (n=2048) | +0.4027 ± 0.0116 | best of this merge; not promoted | | b37-fresh5-2 | empirical (KDE h=0.2) retail fill-law likelihood replacing the lognormal | h0.2 refit +0.0422 ± 0.0227 | +0.0437 ± 0.0221 | **+0.0302 ± 0.0057** | +0.3531 ± 0.0104 | small real gain; not promoted | | b37-fresh5-1 | posterior-integrated rival-band projection, strength 1 | +0.0281 ± 0.0149 | +0.0123 ± 0.0150 | **+0.0178 ± 0.0053** | +0.3407 ± 0.0113 | small; not promoted | | b43-fresh6-1 | committed-hypothesis quoting, q=0.9 | q0 −2.928; q0.7 −0.160; q0.9 +0.0287 ± 0.016; q0.97 +0.006 | +0.0190 ± 0.0153 | +0.0117 ± 0.0063 | +0.3346 ± 0.0115 | null; the moment-matched sd "is doing real risk work" | | b36-silent-step | silent step conditioned on no own retail fill, α=1 | α 0.5/1/2: −0.028/−0.031/−0.039 (n=64) | +0.0203 ± 0.0293 (n=64) | +0.0066 ± 0.0204 (**n=128 only**, 10000..10127) | +0.3293 ± 0.0414 (n=128) | null | | b36-same-step | same-step (dt=0) retail-fill conditioning of the current lattice, strength 0.1 | −0.0011 ± 0.0020 (zero update was best) | −0.0015 ± 0.0020 | −0.0008 ± 0.0007 | +0.3221 ± 0.0107 | null; keep base | | b41-values-1 | posterior-averaged action values | candidate **not scored**: off-grid endpoint gate failed, max fee diff 6.909 bps > 0.01 | fallback α=0 equals base (0.0) | 0.0 (fallback is the base) | +0.3229 (inherited) | gate failed; base kept | | b42-history-price | ridge correction of the quoting centre from 8 history features | H −0.0048 ± 0.0136; memoryless M −0.011 ± 0.012; H−M +0.0061 ± 0.0100 | −0.0118 ± 0.0135 | −0.0019 ± 0.0087 (**n=768 only**, 10000..10767) | +0.3104 ± 0.0177 (n=768) | null | | b42-value-residual | fork-trained additive fee residual, η=0.25, cap 1 bp | +0.021 ± 0.020; η1 cap2 −0.2045 | −0.0399 ± 0.0180 | **−0.0237 ± 0.0076** | +0.2992 ± 0.0115 | negative | | b43-fresh6-2 | trade-size (ay) likelihood channel in the arb/retail call | thr0.9 −0.0376 ± 0.0199; thr0.5 −0.0246 ± 0.0217 | −0.0584 ± 0.0202 | −0.0405 ± 0.0215 (**n=256 only**, 10000..10255) | +0.2929 ± 0.0327 (n=256) | negative | | b35-probe-1 | information-seeking quote probe, depth-3 tree, weight 0.02 | w0 −0.192; w0.02 −0.731; w0.08 −1.278; w0.32 −1.355 (n=128) | −0.7511 ± 0.0393 | **−0.6725 ± 0.0103** | −0.3496 ± 0.0136 | negative | | b35-probe-2 | midpoint-directed probe capped at 6 bps, setting 4 (weight 0.3) | −0.6982 ± 0.0406 | −0.7273 ± 0.0405 | **−0.668 ± 0.0107** | −0.3451 ± 0.0142 | negative | **Findings that hold across items:** - **The router density is where the gain comes from.** - In [b40-joint-1], branching created rival hypotheses that differ by less than 1 bp: 0.33–0.57 bps at merges and 0.75–0.88 bps within a branch. K=8 was flat against K=1. - The file concludes that the gain "comes from the exact router density replacing the fixed fill law". - [b37-fresh5-2] approaches the same lognormal fill-law misfit nonparametrically and gets +0.030. The two ideas overlap in mechanism, so their gains should not be assumed to add up. Nobody tested them together. - **Misread rate moves only a little.** On the holdout: - joint: 28.88% → 27.82%, RMS 13.277 → 13.119; - KDE: → 28.83%, RMS → 13.236; - fresh6-1: → 28.57% with RMS up to 13.288. - No idea came close to the README's +2.72 value of reading first trades correctly. - **Probing improves price estimates but costs edge.** Both probe items lowered callback RMS by about 0.32–0.44 bps, yet raised misread (29.49–29.72% vs 28.88%) and lost about 0.67 against the base. Retail edge fell by 0.317 and arb edge by 0.351 [b35-probe-2]. - **Gas is unmeasured for every Track B idea.** None has a Solidity port. Several note that a naive 121-cell lattice is about 135 slots, over the 32-slot limit [b35-probe-1, b35-probe-2, b36-same-step, b37-fresh5-1]. The incremental estimates the files give, all marked as estimates: | file | incremental gas estimate | |---|---| | b40-joint-1 | 60k–400k | | b37-fresh5-1 | 130k–650k | | b36-same-step | about 4.3M (cost model) | | b41-values-1 | about 10.8M naive | | b43-fresh6-1 | 15k–45k | | b42-history-price | 3k–12k, worst about 80k | | b42-value-residual | 2k–4k | | b37-fresh5-2 | −200 to +400 | **Incomplete holdouts** (the files report this themselves, and nothing was imputed): - [b36-silent-step]: 128 of 2048 seeds. - [b42-history-price]: 768 of 2048. - [b43-fresh6-2]: 256 of 2048. Their verdicts rest on consistently null or negative tuning and confirmation as well. **Engine seeds:** every Track B file reports 0 engine seeds used. ## 4. Where results disagree or need care 1. **Gas limit for M09:** 195,000 in [b33-m09-2]'s requirements, against engine peaks of 201,632–214,835 (§1–2). The goal bar is 245,000, which M09 meets. 2. **Size of the M09 margin over controls:** M09−PB is about +0.46 and M09−Q2 about +0.82 on the engine. On the replica, M09 vs thr05 is +0.335. These are different controls, so this is not a conflict, but the replica-to-engine scaling has not been checked. 3. **Declared vs computed code_sha256** for the PB, mix-2 and thrpol base artifacts. Recorded in [b34-pilot-12005248], [b35-probe-1] and [b36-same-step], and not resolved. The measured source and bytecode hashes are consistent across all files. 4. **Per-block spread in the pilots:** the two 64-seed pilots differ by 0.63 in M09−IB (3.55 vs 4.19). That is within about 2.4 combined se. The 256-seed blocks are tighter (3.64–3.87). 5. **Track B effects are measured one at a time.** joint (+0.080), KDE (+0.030), rival projection (+0.018) and commit (+0.012) were each measured against the base alone. Their combination is unmeasured. ## 5. Results whose sources did not re-verify The brief flags sources that did not hold when re-read for these five results: | result | flagged | what it cites (seen in the file) | |---|---|---| | a5-mix09-pilot / pilot-12005312 = [b34-pilot-12005312] | 1 source | no URLs in the fields I read | | b5-probe / probe-1 = [b35-probe-1] | 2 sources | solved README.md at e65314f8 and base artifact 22819a15… | | b5-conditioning / same-step = [b36-same-step] | 1 source | replica2.py, latt.py and README at e65314f8, plus artifact 22819a15… | | b5-conditioning / silent-step = [b36-silent-step] | 1 source | no URL fields in the summary I read | | b6-action-values / values-1 = [b41-values-1] | 1 source | solved folder at e65314f8 and base artifact c9d678ab… | **How much this matters:** the quantitative claims in all five are the items' own local measurements, not quotes from those sources. - The pilot's numbers are matched by eight independent 256-seed engine blocks. - probe-1 is matched by probe-2. - The base and lattice figures in same-step, silent-step and values-1 match the +0.3229 baseline that six other files reproduce. So no finding here depends only on a source that failed. Background claims taken from those sources (README facts, the base artifact's contents) should be treated as unverified for these five items. I could not tell from the files which specific URL failed in each case. ## 6. What the write-up should carry forward - **Track A:** M09 (source a44cca4b…, runtime e95f44d1…) is the candidate. It stands at +3.768 ± 0.032 over IB on 2,176 fresh engine seeds and needs 1,824 more fresh seeds to complete the 4,000-seed bar. Seed range 12007168..12007423 is unused and still fresh [b39-eng-12007168]. - **Track B:** nothing reached +0.3, so nothing goes into A's next port by the brief's rule. The strongest leads are: - the exact router fill likelihood per step, +0.080 [b40-joint-1]; - the empirical fill law, +0.030 [b37-fresh5-2]. - **Ideas shown not to help on this replica:** - information probes: −0.67 [b35-probe-1, b35-probe-2]; - fork-trained fee residual: −0.024 [b42-value-residual]; - trade-size channel: −0.04 [b43-fresh6-2]; - same-step and silent-step conditioning, history-price correction, committed quoting: all null; - posterior-averaged action values: blocked by its interpolation gate [b41-values-1].