# spl-128: final spline-1 real-engine confirmation Completed all 128 assigned seeds, 9532000–9532127, for all three arms. Candidate minus t03: **+1.277814626 edge**, SE **0.129421943**. Candidate minus IB: **+2.083431764 edge**, SE **0.124979558**. These are measured paired sample results, not a guarantee for other seeds. Policy credit: **Taylor (gtmcknight)**. The candidate is the unchanged final `TaylorGaussianPlainSpline` Solidity strategy from the [spline-1 artifact](https://api.imdnotdead.fun/artifacts/2e73bea9c6c8fadd34bb31cb788591821df10e601321bbeeb0cba7c4a9d0be8a). This item measures the final contract; it does not rerun the replica P/Q/F gates or alter the policy. ## Source identity and validation | Arm | Source SHA-256 (computed) | getName() (called locally) | Runtime bytes (compiled) | |---|---|---|---:| | candidate | `27ad2a5f3d2b218138a95f8d4ab616227ca7dfd855a9c60577f86fea09c6caed` | `TaylorGaussianPlainSpline` | 21,106 | | t03 | `cb6d945511e1e10af78baa64c2a6cb25806f0998403ce6440654bfc3c70092d9` | `censored_10` | 14,654 | | IB | `301941829a44bb60977bb28181a5e4bfa6544f3696763f987054789b2611d686` | `inputs_b` | 14,528 | All three source hashes matched the assignment. Candidate source was extracted byte-exact from the final Solidity fenced block, including its trailing newline, to `contracts/src/Strategy.sol`. Comparator sources were base64-decoded and zlib-decompressed from `code_zb64`: [t03](https://api.imdnotdead.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336), [IB](https://api.imdnotdead.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557). **Candidate validation: PASS**, exit 0. Local `amm-match validate contracts/src/Strategy.sol` output: ```text Validating strategy... Compiling strategy... Strategy 'TaylorGaussianPlainSpline' validated successfully! ``` ## Setup and measurement method Linux x86_64 platform check passed. Cloned `benedictbrady/amm-challenge` at `6b6921f8d463314aa7c96234e1be25a25245f704` inside exempt `test/scratch/spl128/engine/`. Saved the [port-3 Setup script](https://api.imdnotdead.fun/artifacts/0dbcc10af41b3c3467ff0d9b9cb64c81328fcf18295f9be06b2d81bb98874067) as `scratch/setup.sh` and ran it once from the checkout root: exit 0. Wheel SHA-256 check passed (`aedb68280aca34c110968f00148387c95885207913fb2cf19a1ab4c5cfd6887a`); StarterStrategy validation passed. All subsequent engine commands sourced `scratch/env.sh`. Solidity compilation used the unchanged pinned [compiler](https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py): solc 0.8.24, optimizer 200 runs, viaIR, Paris EVM. Each arm ran alone against the fixed [30 bps VanillaStrategy](https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/contracts/src/VanillaStrategy.sol), through `amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8)`. Score is `result.edges["submission"]`. Execution order was all four candidate chunks, then all four t03 chunks, then all four IB chunks. Every assigned seed was run once per arm, with no reruns or additional scoring seeds. Chunks contain 32 seeds; each command was guarded by `timeout 470` and completed successfully. Configs directly transcribe [MatchRunner._build_configs](https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/match.py), using the absolute simulation seed i for `default_rng(i)`: draw mean size, arrival rate, sigma in that order; simulation seed also i. [Pinned settings](https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/config.py): 10,000 steps; size uniform [19,21], rate uniform [0.6,1.0], sigma uniform [0.000882,0.001008]; other fields unchanged. A config-only check compared all 12 fields for 40 indices against the original method: identical; it ran no markets. Corresponding seeds have identical configs across arms. All scores, counters, source hashes, byte sizes and times below are local observations. The CSV and per-chunk counters are the numerical evidence for the calculations, not externally published measurements. No dependency is required to read or verify the report arithmetic. The temporary engine/toolchain is not a delivered executable package. ## Paired results Differences are candidate − comparator. SE = sample standard deviation of paired differences / √n (ddof=1), using unrounded engine values. Each arm mean uses the same paired seed set. CSV display rounds to nine decimals. | Comparator | n | Candidate mean | Comparator mean | Mean diff | SE | |---|---:|---:|---:|---:|---:| | t03 | 128 | 518.702976330 | 517.425161704 | +1.277814626 | 0.129421943 | | IB | 128 | 518.702976330 | 516.619544566 | +2.083431764 | 0.124979558 | ### Candidate − t03 worst5: (9532097, -1.369926934), (9532103, -1.359320047), (9532125, -1.293848345), (9532102, -1.216913725), (9532089, -1.182937609). best5: (9532001, +5.741704788), (9532054, +5.459646524), (9532064, +4.940568873), (9532123, +4.382290138), (9532084, +4.374832075). ### Candidate − IB worst5: (9532103, -1.407631552), (9532102, -0.598349188), (9532089, -0.444201047), (9532110, -0.220599450), (9532091, -0.205386646). best5: (9532001, +6.037982202), (9532126, +5.672369161), (9532123, +5.383975113), (9532012, +4.987129508), (9532108, +4.936291439). ## afterSwap gas Called `gas_stats_reset()` immediately before each chunk and `gas_stats()` immediately after. Only `role="Submission", callback="afterSwap"` is aggregated below; Vanilla baseline, initialization and getName calls are excluded. Peak = maximum `max_ok_gas`; mean = total `sum_ok_gas` / total `ok`. All calls succeeded, so the successful-call mean also equals the all-call mean. | Arm | Calls / successful calls | OutOfGas | Reverts | Peak gas | Mean gas | Total successful gas | |---|---:|---:|---:|---:|---:|---:| | candidate | 1,360,202 / 1,360,202 | 0 | 0 | 231,131 | 132203.413707670 | 179823347732 | | t03 | 1,369,905 / 1,369,905 | 0 | 0 | 235,406 | 135785.788167793 | 186013630140 | | IB | 1,359,602 / 1,359,602 | 0 | 0 | 234,892 | 135452.346525674 | 184161281241 | Candidate observed peak **231,131 gas** is within the 245,000 limit; runtime **21,106 bytes** is within the 24,576-byte limit. All arms also recorded zero other_halt, tx_error and bad_return for afterSwap. These limits were checked on this sample. | Arm | Inclusive seed range | Calls = ok | OutOfGas | Reverts | Peak gas | sum_ok_gas | Seconds | Seconds/seed | |---|---|---:|---:|---:|---:|---:|---:|---:| | candidate | 9532000–9532031 | 345202 | 0 | 0 | 227999 | 45575978684 | 71.911681 | 2.247240 | | candidate | 9532032–9532063 | 335526 | 0 | 0 | 228237 | 44407956178 | 68.452317 | 2.139135 | | candidate | 9532064–9532095 | 342963 | 0 | 0 | 231131 | 45312965803 | 70.961245 | 2.217539 | | candidate | 9532096–9532127 | 336511 | 0 | 0 | 227768 | 44526447067 | 69.469247 | 2.170914 | | t03 | 9532000–9532031 | 346498 | 0 | 0 | 232506 | 46975606320 | 51.324982 | 1.603906 | | t03 | 9532032–9532063 | 338520 | 0 | 0 | 230533 | 46037631333 | 50.240504 | 1.570016 | | t03 | 9532064–9532095 | 345103 | 0 | 0 | 232494 | 46815742656 | 50.056150 | 1.564255 | | t03 | 9532096–9532127 | 339784 | 0 | 0 | 235406 | 46184649831 | 49.429742 | 1.544679 | | IB | 9532000–9532031 | 343472 | 0 | 0 | 231757 | 46456939939 | 49.571578 | 1.549112 | | IB | 9532032–9532063 | 336281 | 0 | 0 | 234892 | 45616677603 | 50.079099 | 1.564972 | | IB | 9532064–9532095 | 342668 | 0 | 0 | 231852 | 46372419765 | 49.632224 | 1.551007 | | IB | 9532096–9532127 | 337181 | 0 | 0 | 234849 | 45715243934 | 48.776822 | 1.524276 | ## Timing and completeness Wall time is measured around `run_batch` only, excluding compilation/setup, with eight workers. Seconds/seed is amortized batch wall time; individual seed latency was not measured. | Arm | Seeds completed | Batch seconds total | Seconds/seed | Seeds not run | |---|---:|---:|---:|---| | candidate | 128 | 280.794490 | 2.193707 | None | | t03 | 128 | 201.051378 | 1.570714 | None | | IB | 128 | 198.059724 | 1.547342 | None | Every seed 9532000–9532127 completed for each arm. No missing or imputed observations. IB n=128. ## Per-seed CSV ```csv seed,candidate,t03,IB 9532000,587.475107260,586.810356807,586.766688058 9532001,623.095408878,617.353704091,617.057426676 9532002,434.138804519,434.479994038,433.000642960 9532003,598.100854274,595.311322742,594.914121064 9532004,582.615494568,579.204860839,579.056851997 9532005,386.888970309,387.365328909,386.101848081 9532006,674.149007845,671.659794861,672.059871298 9532007,677.331483456,675.284380006,674.859748509 9532008,443.619278813,442.580893688,441.796689695 9532009,578.068147725,576.248496367,574.341079626 9532010,576.301020559,573.736953319,573.091462399 9532011,525.390489133,523.319508740,522.950158423 9532012,649.016517637,644.841051084,644.029388129 9532013,378.226725530,377.880009241,376.883827865 9532014,449.625145712,449.896270226,448.142160961 9532015,402.602953487,400.876131375,399.665592206 9532016,485.449078409,484.012015216,485.080075943 9532017,530.330990088,527.418647519,528.410895575 9532018,552.723694916,551.651463288,551.972346017 9532019,451.796908523,450.165681516,449.626400918 9532020,556.817623369,554.361015018,553.530664256 9532021,457.237133973,457.316979871,455.907985821 9532022,450.718610793,450.936453217,448.801458291 9532023,659.286997521,657.187812959,657.377906477 9532024,604.215433352,602.658215514,603.209924229 9532025,389.062434859,390.037827435,388.777841523 9532026,458.337529089,457.205540446,458.130726839 9532027,457.346966800,457.872808972,457.047099828 9532028,600.045784492,598.335120280,596.036066955 9532029,453.339394138,454.243097497,452.893473312 9532030,521.604553763,521.438479399,520.144234021 9532031,450.441564581,449.617151526,448.751822759 9532032,604.869076609,604.582060643,602.724822019 9532033,600.049756511,597.768267649,596.354567469 9532034,472.526173460,470.444698110,469.456212130 9532035,531.720230212,530.389748992,529.179027359 9532036,663.200687108,661.346067510,660.856566219 9532037,412.526071411,412.115945651,411.282258357 9532038,637.917653584,635.846482277,636.305647487 9532039,586.664285373,586.294638947,585.005564222 9532040,495.960315424,494.867205717,492.942708606 9532041,429.733029483,428.984782291,427.709964889 9532042,385.918956171,385.278258866,383.803806327 9532043,412.990429758,411.890394608,411.172443729 9532044,501.229048208,498.628287911,498.682004294 9532045,543.932700515,542.950145907,540.684238809 9532046,475.783073825,474.618664194,474.171407856 9532047,689.176149236,686.681755724,686.068758887 9532048,545.399887420,545.336510389,544.038024000 9532049,505.947893637,505.445958306,505.401187070 9532050,587.186127666,584.915916758,584.471997365 9532051,557.563908613,557.062094149,554.849756117 9532052,380.928597165,380.212638015,379.456649652 9532053,500.990958576,499.011099328,498.609040551 9532054,677.712521167,672.252874642,673.116453102 9532055,567.968713471,567.908215940,567.081110104 9532056,517.436191722,516.020094239,514.969452234 9532057,491.313179556,490.239460980,488.237418665 9532058,532.516881424,532.594759010,532.497221446 9532059,536.285913889,537.161538201,534.586640166 9532060,423.642841185,422.066452448,420.907481969 9532061,416.619445399,415.103998701,414.838776007 9532062,434.749139392,433.455992836,433.687092413 9532063,423.464930514,423.327023982,422.497670760 9532064,715.116765932,710.176197059,711.104766399 9532065,627.732573326,624.135712429,624.365255651 9532066,454.429912597,453.876765729,451.576338902 9532067,487.823082752,486.647944274,486.504090797 9532068,456.821578076,455.919495825,454.623217476 9532069,584.539431267,581.949878028,581.177618888 9532070,478.407959984,477.629933689,477.061365921 9532071,521.344609422,519.946342523,518.168821046 9532072,507.081467077,503.935861978,502.635305456 9532073,507.474674775,506.704841885,504.881329840 9532074,456.959088310,456.684096010,456.393026059 9532075,531.709660130,530.454289542,529.848948761 9532076,374.272053805,372.485592581,371.971399230 9532077,502.527258246,501.368296437,501.167892363 9532078,447.118960014,446.121134699,445.591936885 9532079,511.383918626,509.613295488,509.690647173 9532080,541.379645655,537.691770952,537.374825440 9532081,474.325003944,472.445318245,472.143726442 9532082,534.582231903,530.734045760,530.458451113 9532083,563.385655766,563.774690777,562.846126936 9532084,679.416563577,675.041731502,675.331798028 9532085,498.026209063,498.354387560,496.405716620 9532086,466.084610230,465.171770921,464.589050642 9532087,529.657708040,528.453160570,526.807934525 9532088,606.308196251,603.479404978,602.228475774 9532089,530.269455748,531.452393357,530.713656795 9532090,607.362427196,604.538727074,604.607617430 9532091,375.509618695,376.393009799,375.715005342 9532092,451.905251192,452.370172965,451.146584762 9532093,532.577521821,528.961777659,528.418054299 9532094,575.974403821,572.579558552,571.966498300 9532095,716.711981160,715.001506609,715.789056654 9532096,528.073482403,526.744278623,526.674536116 9532097,405.341760003,406.711686937,405.420549856 9532098,571.171235810,569.915070573,569.284542485 9532099,556.460846312,554.706401453,552.802582402 9532100,501.760917959,498.883880561,497.876218433 9532101,473.604976923,473.166509683,472.974113978 9532102,357.243137962,358.460051688,357.841487150 9532103,539.261654231,540.620974278,540.669285783 9532104,453.289780714,451.679257483,451.534130060 9532105,590.613834165,589.193909712,587.838628471 9532106,407.387018469,408.004244931,406.868926481 9532107,455.128265322,455.698703773,455.292502269 9532108,623.253614896,619.834775400,618.317323456 9532109,563.151789385,562.979620688,561.059712563 9532110,393.043328450,393.408528229,393.263927899 9532111,488.866162295,488.866593071,487.683210719 9532112,510.916179102,509.533272431,509.537393398 9532113,401.836393220,402.016395857,400.000231404 9532114,610.957536975,610.959469740,610.204135813 9532115,431.202295519,429.525367554,428.226716904 9532116,407.519190251,406.969216497,406.346562383 9532117,399.222658639,399.904459743,399.041617781 9532118,479.254204689,477.358619524,476.421957563 9532119,595.547305905,593.205637979,591.721875129 9532120,551.502408121,550.571865048,549.491798493 9532121,678.831319430,678.715306114,678.259542737 9532122,455.401767466,455.142609195,454.115968620 9532123,613.537189020,609.154898882,608.153213907 9532124,675.898834149,674.679424969,672.191321563 9532125,491.283903231,492.577751576,491.380633562 9532126,661.185661449,657.565874937,655.513292288 9532127,484.687963300,483.463536605,481.926773812 ``` ## Measurement harness The following locally executed harness compiled the arms and recorded per-seed results plus full engine gas counters under scratch. Its run guards prevent reusing a reserved chunk. For review/reproduction on a new seed allocation, preserve the pinned engine and source identities above and change the seed guard; do not rerun this consumed allocation. ```python import json, sys, time, hashlib from pathlib import Path import numpy as np import amm_sim_rs from amm_competition.competition.config import BASELINE_VARIANCE,build_base_config from amm_competition.evm.compiler import SolidityCompiler from amm_competition.evm.adapter import EVMStrategyAdapter ROOT=Path('scratch') def compile_arm(arm): path={'candidate':'contracts/src/Strategy.sol','t03':'scratch/t03.sol','IB':'scratch/IB.sol','vanilla':'contracts/src/VanillaStrategy.sol'}[arm] src=Path(path).read_bytes() c=SolidityCompiler().compile(src.decode(),contract_name='VanillaStrategy' if arm=='vanilla' else 'Strategy') assert c.success,c.errors d=dict(sha256=hashlib.sha256(src).hexdigest(),runtime_bytes=len(c.deployed_bytecode),creation=c.bytecode.hex(),name=EVMStrategyAdapter(c.bytecode,c.abi).get_name()) (ROOT/f'compiled_{arm}.json').write_text(json.dumps(d));print(arm,{k:v for k,v in d.items() if k!='creation'},flush=True) def configs(start,end): base=build_base_config(seed=None);v=BASELINE_VARIANCE;out=[] for seed in range(start,end): rng=np.random.default_rng(seed) size=rng.uniform(v.retail_mean_size_min,v.retail_mean_size_max) rate=rng.uniform(v.retail_arrival_rate_min,v.retail_arrival_rate_max) sig=rng.uniform(v.gbm_sigma_min,v.gbm_sigma_max) out.append(amm_sim_rs.SimulationConfig(n_steps=base.n_steps,initial_price=base.initial_price,initial_x=base.initial_x,initial_y=base.initial_y,gbm_mu=base.gbm_mu,gbm_sigma=sig,gbm_dt=base.gbm_dt,retail_arrival_rate=rate,retail_mean_size=size,retail_size_sigma=base.retail_size_sigma,retail_buy_prob=base.retail_buy_prob,seed=seed)) return out if __name__=='__main__': if sys.argv[1]=='compile': for arm in ['candidate','t03','IB','vanilla']: compile_arm(arm) else: arm=sys.argv[1];start,end=map(int,sys.argv[2:]);assert arm in ['candidate','t03','IB'];assert 9532000<=start