# Merge 02, batch c-round1: QLX5 structural-constant engine tests (items k16–k31) Credit: Taylor (gtmcknight), github.com/gtmcknight/amm-sim@4812a6382311624e1506aca131ca35c378f930d9 research/solved — the solved policy (LEAN) that QLX5 is built on. These items each change one QLX5 constant. Every number below is copied from the item results in `.imd/reads/artifacts/item-k16`…`item-k31` (artifacts/goal/batches/c-round1/items/kNN/result.json). Rows are sorted by the larger of the LO-QLX5 and HI-QLX5 mean_diff, largest first. Merge adds no numbers of its own. Source caveat: the plane reports that cited sources did not hold on re-read for k16 (2 sources), k20 (1), k28 (3), k30 (1). Those items' engine numbers come from their own runs; weigh any claim they make from cited sources accordingly. ## Rows (JSON) ```json { "rows": [ { "n": 25, "id": "cand_n", "family": "the split test's window and candidates", "lo": "t.isBuy,m0,1)", "hi": "t.isBuy,m0,3)", "seeds": { "first": 10206200, "last": 10206327, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.019312076784203214, "se": 0.012663026444247558, "sum_d": -2.4719458283780114, "sum_d2": 2.654424400401729, "seeds_positive": 53 }, "HI-QLX5": { "n": 128, "mean_diff": 0.012183704885763369, "se": 0.007291343969593435, "sum_d": 1.5595142253777112, "sum_d2": 0.8832297176160059, "seeds_positive": 71 }, "LO": { "peak_gas": 197137, "pass_peak": true }, "HI": { "peak_gas": 201803, "pass_peak": true } }, { "n": 28, "id": "level_cap", "family": "table levels", "lo": "while(k<4&&", "hi": "while(k<5&&", "seeds": { "first": 10206584, "last": 10206711, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": 0.005460232259991926, "se": 0.004933277425606423, "sum_d": 0.6989097292789666, "sum_d2": 0.3994421578750457, "seeds_positive": 55 }, "HI-QLX5": { "n": 128, "mean_diff": 0.0034848260148394594, "se": 0.0027783738074849363, "sum_d": 0.4460577298994508, "sum_d2": 0.12704036622678166, "seeds_positive": 24 }, "LO": { "peak_gas": 207834, "pass_peak": true }, "HI": { "peak_gas": 207834, "pass_peak": true } }, { "n": 30, "id": "cand_outer", "family": "the split test's window and candidates", "lo": "i==3?int256(3):int256(-3)", "hi": "i==3?int256(4):int256(-4)", "seeds": { "first": 10206840, "last": 10206967, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.008494133012879601, "se": 0.008729070481542823, "sum_d": -1.087249025648589, "sum_d2": 1.2478883292866252, "seeds_positive": 60 }, "HI-QLX5": { "n": 128, "mean_diff": 0.003967047369530352, "se": 0.0062264177288287635, "sum_d": 0.5077820632998851, "sum_d2": 0.6322315183403504, "seeds_positive": 65 }, "LO": { "peak_gas": 207248, "pass_peak": true }, "HI": { "peak_gas": 205849, "pass_peak": true } }, { "n": 16, "id": "move_floor", "family": "tell floors", "lo": "if(d<5e8)d=5e8;", "hi": "if(d<15e8)d=15e8;", "seeds": { "first": 10205048, "last": 10205175, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": 0.0, "se": 0.0, "sum_d": 0.0, "sum_d2": 0.0, "seeds_positive": 0 }, "HI-QLX5": { "n": 128, "mean_diff": 0.0, "se": 0.0, "sum_d": 0.0, "sum_d2": 0.0, "seeds_positive": 0 }, "LO": { "peak_gas": 207402, "pass_peak": true }, "HI": { "peak_gas": 207402, "pass_peak": true } }, { "n": 22, "id": "budget", "family": "tell floors", "lo": "hits>3)return 3;", "hi": "hits>6)return 3;", "seeds": { "first": 10205816, "last": 10205943, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -3.233131638035621, "se": 0.22632579668552966, "sum_d": -413.8408496685595, "sum_d2": 2170.6889858592053, "seeds_positive": 0 }, "HI-QLX5": { "n": 128, "mean_diff": 0.0, "se": 0.0, "sum_d": 0.0, "sum_d2": 0.0, "seeds_positive": 0 }, "LO": { "peak_gas": 208177, "pass_peak": { "peak_gas": 208177, "out_of_gas": 0, "revert": 0, "runtime_bytes_ok": true, "source_chars_ok": true, "pass": true } }, "HI": { "peak_gas": 206645, "pass_peak": { "peak_gas": 206645, "out_of_gas": 0, "revert": 0, "runtime_bytes_ok": true, "source_chars_ok": true, "pass": true } } }, { "n": 27, "id": "trunc_floor", "family": "tell floors", "lo": "if(Z<1e4)return", "hi": "if(Z<1e8)return", "seeds": { "first": 10206456, "last": 10206583, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": 0.0, "se": 0.0, "sum_d": 0.0, "sum_d2": 0.0, "seeds_positive": 0 }, "HI-QLX5": { "n": 128, "mean_diff": 0.0, "se": 0.0, "sum_d": 0.0, "sum_d2": 0.0, "seeds_positive": 0 }, "LO": { "peak_gas": 206504, "pass_peak": true }, "HI": { "peak_gas": 206504, "pass_peak": true } }, { "n": 24, "id": "level_interp", "family": "table levels", "lo": "int256 tt=clip((sd-sdl(k)*U)/(sdl(k+1)-sdl(k)),0,U)>=U?U:int256(0);", "hi": "int256 tt=clip((sd-sdl(k)*U)/(sdl(k+1)-sdl(k)),0,U)>=U/2?U:int256(0);", "seeds": { "first": 10206072, "last": 10206199, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.024682576399890355, "se": 0.01720511914567769, "sum_d": -3.1593697791859654, "sum_d2": 4.890019510974846, "seeds_positive": 56 }, "HI-QLX5": { "n": 128, "mean_diff": -0.003963119211058075, "se": 0.013985702653146108, "sum_d": -0.5072792590154336, "sum_d2": 3.1816820363600327, "seeds_positive": 62 }, "LO": { "peak_gas": 205924, "pass_peak": true }, "HI": { "peak_gas": 205608, "pass_peak": true } }, { "n": 21, "id": "bound_syn", "family": "synced-table switches", "lo": "{r=c;syn=qx;}", "hi": "{r=c;syn=false;}", "seeds": { "first": 10205688, "last": 10205815, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.006052925445377166, "se": 0.00816447649763959, "sum_d": -0.7747744570082773, "sum_d2": 1.0882930968924114, "seeds_positive": 60 }, "HI-QLX5": { "n": 128, "mean_diff": -0.6614283923581352, "se": 0.04208612065025354, "sum_d": -84.66283422184131, "sum_d2": 84.79170499119422, "seeds_positive": 7 }, "LO": { "peak_gas": 207633, "pass_peak": true }, "HI": { "peak_gas": 199280, "pass_peak": true } }, { "n": 17, "id": "window_first", "family": "the split test's window and candidates", "lo": "(s2>>128&M64)+7&&cnt==0){int256 m0", "hi": "(s2>>128&M64)+7&&cnt!=0){int256 m0", "seeds": { "first": 10205176, "last": 10205303, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.006516704487211644, "se": 0.006721638205934232, "sum_d": -0.8341381743630905, "sum_d2": 0.7398887422913203, "seeds_positive": 66 }, "HI-QLX5": { "n": 128, "mean_diff": -0.023075031125832535, "se": 0.013835259420970808, "sum_d": -2.9536039841065644, "sum_d2": 3.1797870430264896, "seeds_positive": 51 }, "LO": { "peak_gas": 206609, "pass_peak": true }, "HI": { "peak_gas": 198181, "pass_peak": true } }, { "n": 23, "id": "bound_rule", "family": "rival clip and band widths", "lo": "if(qx)", "hi": "if(qx||c!=r)", "seeds": { "first": 10205944, "last": 10206071, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.038250987858627905, "se": 0.011893302250354724, "sum_d": -4.896126445904372, "sum_d2": 2.486703251364362, "seeds_positive": 48 }, "HI-QLX5": { "n": 128, "mean_diff": -0.12058503930615583, "se": 0.019920578523295346, "sum_d": -15.434885031187946, "sum_d2": 8.312075736284118, "seeds_positive": 37 }, "LO": { "peak_gas": 204988, "pass_peak": true }, "HI": { "peak_gas": 206415, "pass_peak": true } }, { "n": 19, "id": "step_cnt", "family": "phase thresholds", "lo": "hit,chance);cnt=arb?1:0;", "hi": "hit,chance);cnt=arb?0:1;", "seeds": { "first": 10205432, "last": 10205559, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.09260693774225048, "se": 0.021268367145707394, "sum_d": -11.853688031008062, "sum_d2": 8.451028727124733, "seeds_positive": 47 }, "HI-QLX5": { "n": 128, "mean_diff": -0.07875307170891688, "se": 0.02523994673523188, "sum_d": -10.08039317874136, "sum_d2": 11.149826563283497, "seeds_positive": 49 }, "LO": { "peak_gas": 206890, "pass_peak": true }, "HI": { "peak_gas": 202483, "pass_peak": true } }, { "n": 26, "id": "rival_clip_p12", "family": "rival clip and band widths", "lo": "p2=pos2(clip(w2/5,-8*U,8*U));", "hi": "p2=pos2(clip(w2/5,-16*U,16*U));", "seeds": { "first": 10206328, "last": 10206455, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -0.33909046863032577, "se": 0.03630850738180227, "sum_d": -43.4035799846817, "sum_d2": 36.14815038327315, "seeds_positive": 17 }, "HI-QLX5": { "n": 128, "mean_diff": -0.09194936482829208, "se": 0.016365393780893335, "sum_d": -11.769518698021386, "sum_d2": 5.435981071359558, "seeds_positive": 43 }, "LO": { "peak_gas": 206217, "pass_peak": true }, "HI": { "peak_gas": 205903, "pass_peak": true } }, { "n": 29, "id": "rival_clip_p0", "family": "rival clip and band widths", "lo": "clip(w2/5,-3*U,3*U)", "hi": "clip(w2/5,-45*U/10,45*U/10)", "seeds": { "first": 10206712, "last": 10206839, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -2.5989346981924877, "se": 0.09390497355386199, "sum_d": -332.6636413686384, "sum_d2": 1007.9188301893273, "seeds_positive": 1 }, "HI-QLX5": { "n": 128, "mean_diff": -0.6192964805992864, "se": 0.04482809049636901, "sum_d": -79.26994951670866, "sum_d2": 81.75897068436414, "seeds_positive": 15 }, "LO": { "peak_gas": 206240, "pass_peak": true }, "HI": { "peak_gas": 206171, "pass_peak": true } }, { "n": 18, "id": "rr_scale", "family": "rival clip and band widths", "lo": "int256 rr=(ln(r)-m)*7500;", "hi": "int256 rr=(ln(r)-m)*12500;", "seeds": { "first": 10205304, "last": 10205431, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -1.256292466152471, "se": 0.059481610143499446, "sum_d": -160.8054356675163, "sum_d2": 259.5333923276661, "seeds_positive": 4 }, "HI-QLX5": { "n": 128, "mean_diff": -0.9454850376684591, "se": 0.04239213474334218, "sum_d": -121.02208482156277, "sum_d2": 143.6381156663466, "seeds_positive": 1 }, "LO": { "peak_gas": 204810, "pass_peak": true }, "HI": { "peak_gas": 207689, "pass_peak": true } }, { "n": 20, "id": "fee_scale", "family": "table levels", "lo": "xb=xb*97/100;xa=xa*97/100;fb=xb>0?U-exp(-xb/10000):int256(0);", "hi": "xb=xb*103/100;xa=xa*103/100;fb=xb>0?U-exp(-xb/10000):int256(0);", "seeds": { "first": 10205560, "last": 10205687, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -1.1846334028201224, "se": 0.08393686780121186, "sum_d": -151.63307556097567, "sum_d2": 294.1595925330564, "seeds_positive": 12 }, "HI-QLX5": { "n": 128, "mean_diff": -1.8618988782159183, "se": 0.1391587043339508, "sum_d": -238.32305641163754, "sum_d2": 758.5332283742074, "seeds_positive": 10 }, "LO": { "peak_gas": 205250, "pass_peak": { "passed": true, "peak_gas": 205250, "out_of_gas": 0, "reverts": 0, "limit": 245000 } }, "HI": { "peak_gas": 204319, "pass_peak": { "passed": true, "peak_gas": 204319, "out_of_gas": 0, "reverts": 0, "limit": 245000 } } }, { "n": 31, "id": "fee_cap", "family": "table levels", "lo": "fb=clip(fb,0,U/40);fa=clip(fa,0,U/40);", "hi": "fb=clip(fb,0,U/20);fa=clip(fa,0,U/20);", "seeds": { "first": 10206968, "last": 10207095, "n": 128 }, "LO-QLX5": { "n": 128, "mean_diff": -33.62738878988017, "se": 3.260073178776254, "sum_d": -4304.305765104662, "sum_d2": 317512.5852748479, "seeds_positive": 0 }, "HI-QLX5": { "n": 128, "mean_diff": -10.972542103216606, "se": 1.979802319810389, "sum_d": -1404.4853892117255, "sum_d2": 79128.07268463858, "seeds_positive": 3 }, "LO": { "peak_gas": 206573, "pass_peak": true }, "HI": { "peak_gas": 209496, "pass_peak": true } } ], "failed": [] } ``` ## Summary table | n | id | family | LO−QLX5 mean (se) | HI−QLX5 mean (se) | peak LO/HI | |---|---|---|---|---|---| | 25 | cand_n | the split test's window and candidates | -0.019312076784203214 (0.012663026444247558) | 0.012183704885763369 (0.007291343969593435) | 197137/201803 | | 28 | level_cap | table levels | 0.005460232259991926 (0.004933277425606423) | 0.0034848260148394594 (0.0027783738074849363) | 207834/207834 | | 30 | cand_outer | the split test's window and candidates | -0.008494133012879601 (0.008729070481542823) | 0.003967047369530352 (0.0062264177288287635) | 207248/205849 | | 16 | move_floor | tell floors | 0.0 (0.0) | 0.0 (0.0) | 207402/207402 | | 22 | budget | tell floors | -3.233131638035621 (0.22632579668552966) | 0.0 (0.0) | 208177/206645 | | 27 | trunc_floor | tell floors | 0.0 (0.0) | 0.0 (0.0) | 206504/206504 | | 24 | level_interp | table levels | -0.024682576399890355 (0.01720511914567769) | -0.003963119211058075 (0.013985702653146108) | 205924/205608 | | 21 | bound_syn | synced-table switches | -0.006052925445377166 (0.00816447649763959) | -0.6614283923581352 (0.04208612065025354) | 207633/199280 | | 17 | window_first | the split test's window and candidates | -0.006516704487211644 (0.006721638205934232) | -0.023075031125832535 (0.013835259420970808) | 206609/198181 | | 23 | bound_rule | rival clip and band widths | -0.038250987858627905 (0.011893302250354724) | -0.12058503930615583 (0.019920578523295346) | 204988/206415 | | 19 | step_cnt | phase thresholds | -0.09260693774225048 (0.021268367145707394) | -0.07875307170891688 (0.02523994673523188) | 206890/202483 | | 26 | rival_clip_p12 | rival clip and band widths | -0.33909046863032577 (0.03630850738180227) | -0.09194936482829208 (0.016365393780893335) | 206217/205903 | | 29 | rival_clip_p0 | rival clip and band widths | -2.5989346981924877 (0.09390497355386199) | -0.6192964805992864 (0.04482809049636901) | 206240/206171 | | 18 | rr_scale | rival clip and band widths | -1.256292466152471 (0.059481610143499446) | -0.9454850376684591 (0.04239213474334218) | 204810/207689 | | 20 | fee_scale | table levels | -1.1846334028201224 (0.08393686780121186) | -1.8618988782159183 (0.1391587043339508) | 205250/204319 | | 31 | fee_cap | table levels | -33.62738878988017 (3.260073178776254) | -10.972542103216606 (1.979802319810389) | 206573/209496 | ## Failed - none: all 16 items returned an engine run with both paired diffs. ## Item readings (quoted from each result) - k25 cand_n: On 128 paired fresh seeds, reducing the split-test candidate count from five to one changed edge by -0.019312 (SE 0.012663) and to three by +0.012184 (SE 0.007291); this screening run does not establish the required gain on 1,024+ seeds. - k28 level_cap: On 128 fresh engine seeds, capping the sd level index at 4 (LO, top level 20 bps) gives LO - QLX5 = +0.0055 se 0.0049 and capping it at 5 (HI, top level 26 bps) gives HI - QLX5 = +0.0035 se 0.0028 (1.1 and 1.3 standard errors; HI - LO = -0.0020 se 0.0048; the edge is exactly QLX5's on 25 of the 128 seeds for LO and on 85 for HI), so neither cap is told apart from QLX5's k<6, both point estimates are under 0.006 against the +0.04 the goal asks for, and both variants stay inside every limit (peak 207,834, 0 out of gas, 22,440 runtime bytes). - k30 cand_outer: On 128 fresh paired engine seeds, outer candidates +/-3 ulps (LO) change mean edge by -0.00849413 (SE 0.00872907) and +/-4 ulps (HI) by +0.00396705 (SE 0.00622642) versus QLX5's +/-2 ulps; this is a screening result, not promotion evidence. - k16 move_floor: On 128 fresh engine seeds LO (floor 5e8) and HI (floor 15e8) are bit-identical to QLX5 on every seed (all three paired differences exactly 0, se 0, with equal afterSwap call counts, peak gas and total gas), and reading the source shows why: for any d below about 8.69e9 the pdf cutoff at |z|>10 already makes the retail likelihood exactly 0, so this floor cannot move the fee at these values and the knob has no gain to offer. - k22 budget: Lowering the lean-tell budget to 3 costs -3.233 (se 0.226, 0 of 128 seeds better) against QLX5, while raising it to 6 is bit-identical to QLX5 on all 128 seeds (same edges and same afterSwap gas totals, so a candidate count of 5 or 6 never occurred here); keep the budget at 4, nothing to promote. - k27 trunc_floor: On 128 fresh engine seeds the truncation-mass floor is inert between 1e4 and 1e8: LO, HI and QLX5 give the same edge on every seed to the last bit (all three paired differences exactly 0, se 0), with the same peak (206,504) and no out of gas, so this knob offers no gain; its only trace is a total afterSwap gas shift against QLX5 of +182 for LO (first block) and -379 for HI (third block), which shows the floor did decide differently on at least one call in each, without changing any edge. - k24 level_interp: On 128 paired fresh seeds, replacing linear sd-level interpolation with the lower level gives -0.024683 edge (SE 0.017205) and the nearest level gives -0.003963 (SE 0.013986) versus QLX5; this is a structural-constant screen, not a promotion certification. - k21 bound_syn: On 128 fresh engine seeds, never marking the callback synced when r=c is set (HI) loses 0.661 (se 0.042, 121 of 128 seeds lower) against QLX5, and marking it only on an exact split-test hit (LO) is -0.0061 (se 0.0082), not distinguishable from QLX5, so neither setting of bound_syn approaches the +0.04 bar and QLX5's syn=true stays. - k17 window_first: On 128 assigned paired seeds, first-only LO changes edge by -0.006517 (SE 0.006722) and later-only HI by -0.023075 (SE 0.013835) versus QLX5; neither is eligible for promotion from this screening run. - k23 bound_rule: On 128 fresh engine seeds both alternatives score below QLX5's one-sided bound rule: LO (bound only on a split-test hit, otherwise the pull) by -0.038 (se 0.012, 48 of 128 seeds better) and HI (bound on every non-arbitrage fill, the pull never runs) by -0.121 (se 0.020, 37 of 128 seeds better), so this knob gives no gain and QLX5's value should be kept. - k19 step_cnt: Across the 128 assigned seeds, QLX5 exceeded LO by 0.092606937742 and HI by 0.078753071709 mean edge; HI exceeded LO by 0.013853866033. - k26 rival_clip_p12: On 128 paired engine seeds, LO changes edge versus QLX5 by -0.339090 (SE 0.036309) and HI by -0.091949 (SE 0.016365); neither variant improves QLX5 in this structural-constant screen. - k29 rival_clip_p0: Narrowing the phase-0 rival clip loses edge versus QLX5 on 128 paired seeds: LO -2.598935 (SE 0.093905) and HI -0.619296 (SE 0.044828), so neither merits promotion. - k18 rr_scale: Scaling the rival offset on the table column axis loses in both directions on these 128 fresh seeds: LO (x7500) - QLX5 = -1.2563 se 0.0595 (4/128 seeds positive) and HI (x12500) - QLX5 = -0.9455 se 0.0424 (1/128 positive), so QLX5's 10000 stays and this knob is not a candidate. - k20 fee_scale: Scaling both log-fee table outputs of QLX5 hurts in either direction on these 128 paired engine seeds: -3% gives -1.185 (se 0.084, 12/128 seeds positive) and +3% gives -1.862 (se 0.139, 10/128 seeds positive) against QLX5, so the x1 table level is at or near a local optimum between the two and this knob offers no gain. - k31 fee_cap: Lowering the 10% fee ceiling to 2.5% (LO) or 5% (HI) reduced mean edge versus QLX5 by 33.627389 (SE 3.260073) and 10.972542 (SE 1.979802), respectively, on 128 paired seeds; neither variant merits promotion. Against the brief's bar (>= +0.04 over QLX5 on 1,024+ fresh engine seeds): these are 128-seed screens; none is by itself a qualifying result.