{
  "header": "Frozen TC-A versus qt1 confirmation. Credit Taylor (gtmcknight) for the solved policy, Gaussian filter, qm tables and replica research.",
  "status": "complete",
  "blocked": null,
  "failures": [],
  "scope": "Only engine seeds 9805620..9805635 inclusive; frozen policies unchanged; no tuning, no seed replay, no other engine seeds.",
  "evidence": "Scores, bytecode sizes, hashes, gas counts and validation are local measurements from the commands below. Source URLs identify the exact inputs and methods; they do not independently attest these measurements.",
  "hashes": {
    "candidate": {
      "source_sha256": "b87234c89e094f4955578417c1266129b0f96e6dfda68e3fb8866e00eeda71a2",
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/4eb3e985fd31e3cd17832501b95b6d2491aca73d/contracts/Candidate.sol",
      "runtime_sha256": "cdef615a72f9af4a3da9be24ceca128709afb7a90553dc2fb2bac5707a631155"
    },
    "qt1": {
      "source_sha256": "c68887cff61180e12ba2b1ceb333edf76a830f91f63b5d775a8806fb9ec08aca",
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/4eb3e985fd31e3cd17832501b95b6d2491aca73d/reference/qt1/Strategy.sol",
      "runtime_sha256": "79c8d6c305ec6dfc29770b27cfb15b6cbd57b1fb01a23309cf8c131ca5c70189"
    },
    "engine_py": {
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/4eb3e985fd31e3cd17832501b95b6d2491aca73d/tools/engine.py",
      "sha256": "306c529d0c84c88610c1e8a9a6aa34634534b73ab83312e9155ef14476e46300"
    },
    "check_py": {
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/4eb3e985fd31e3cd17832501b95b6d2491aca73d/tools/check.py",
      "sha256": "cbcfea4c793ac7b78e0ee27dd723c9e6af4d9d704a70a8038c985acffffcfed1"
    },
    "engine_wheel": {
      "url": "https://github.com/gtmcknight/amm-sim/releases/download/sim-6b6921f8/amm_sim_rs-0.1.0.post1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
      "sha256": "aedb68280aca34c110968f00148387c95885207913fb2cf19a1ab4c5cfd6887a"
    }
  },
  "source_hashes_match": true,
  "runtime": {
    "candidate": {
      "bytes": 21102,
      "limit": 24576,
      "passes": true
    },
    "qt1": {
      "bytes": 20605,
      "limit": 24576,
      "passes": true
    }
  },
  "validation": {
    "candidate": {
      "passed": true,
      "name": "TaylorTwoCompQmTrim2"
    },
    "qt1": {
      "passed": true,
      "name": "TaylorGaussianQMSpline"
    },
    "candidate_exact_runtime_21102": true
  },
  "ranges": {
    "convention": "half-open [start,end); end exclusive",
    "requested": [
      9805620,
      9805636
    ],
    "attempted": {
      "candidate": [
        [
          9805620,
          9805636
        ]
      ],
      "qt1": [
        [
          9805620,
          9805636
        ]
      ]
    },
    "completed": {
      "candidate": [
        [
          9805620,
          9805636
        ]
      ],
      "qt1": [
        [
          9805620,
          9805636
        ]
      ]
    },
    "missing": {
      "candidate": [],
      "qt1": [],
      "paired": []
    }
  },
  "completed": [
    {
      "seed": 9805620,
      "candidate": 546.9137098021204,
      "qt1": 545.3523630897771,
      "diff": 1.5613467123432656
    },
    {
      "seed": 9805621,
      "candidate": 374.6137205223026,
      "qt1": 374.0194326585729,
      "diff": 0.5942878637296758
    },
    {
      "seed": 9805622,
      "candidate": 475.3589437380073,
      "qt1": 474.37972691390445,
      "diff": 0.9792168241028776
    },
    {
      "seed": 9805623,
      "candidate": 792.267772486403,
      "qt1": 790.7520871830694,
      "diff": 1.515685303333612
    },
    {
      "seed": 9805624,
      "candidate": 505.11122949632727,
      "qt1": 505.5377802795602,
      "diff": -0.4265507832329263
    },
    {
      "seed": 9805625,
      "candidate": 458.9385702425615,
      "qt1": 457.83571216677313,
      "diff": 1.1028580757883901
    },
    {
      "seed": 9805626,
      "candidate": 421.437674188263,
      "qt1": 420.5281803761902,
      "diff": 0.9094938120727534
    },
    {
      "seed": 9805627,
      "candidate": 433.2152024485965,
      "qt1": 433.52321236959955,
      "diff": -0.30800992100307667
    },
    {
      "seed": 9805628,
      "candidate": 572.3847895931593,
      "qt1": 571.8150741339422,
      "diff": 0.56971545921715
    },
    {
      "seed": 9805629,
      "candidate": 685.6570464166429,
      "qt1": 685.0019033853386,
      "diff": 0.6551430313043056
    },
    {
      "seed": 9805630,
      "candidate": 432.3771727808422,
      "qt1": 432.36512155412777,
      "diff": 0.012051226714447694
    },
    {
      "seed": 9805631,
      "candidate": 425.1967325561144,
      "qt1": 424.5721824090508,
      "diff": 0.6245501470635872
    },
    {
      "seed": 9805632,
      "candidate": 513.3256190136643,
      "qt1": 514.1912623778342,
      "diff": -0.8656433641698413
    },
    {
      "seed": 9805633,
      "candidate": 501.1941924227371,
      "qt1": 501.5451672696046,
      "diff": -0.35097484686747293
    },
    {
      "seed": 9805634,
      "candidate": 438.3316352318192,
      "qt1": 438.02487391108275,
      "diff": 0.3067613207364275
    },
    {
      "seed": 9805635,
      "candidate": 389.6691805355392,
      "qt1": 389.6669710176665,
      "diff": 0.002209517872699962
    }
  ],
  "paired": {
    "n": 16,
    "mean_diff": 0.4301337736878672,
    "se": 0.1769866300149901,
    "worst5": [
      {
        "seed": 9805632,
        "diff": -0.8656433641698413
      },
      {
        "seed": 9805624,
        "diff": -0.4265507832329263
      },
      {
        "seed": 9805633,
        "diff": -0.35097484686747293
      },
      {
        "seed": 9805627,
        "diff": -0.30800992100307667
      },
      {
        "seed": 9805635,
        "diff": 0.002209517872699962
      }
    ]
  },
  "arm_means": {
    "candidate": 497.8745744671938,
    "qt1": 497.4444406935059
  },
  "method": {
    "checkout": "https://github.com/benedictbrady/amm-challenge",
    "commit": "6b6921f8d463314aa7c96234e1be25a25245f704",
    "compiler": {
      "version": "0.8.24",
      "optimizer_runs": 200,
      "viaIR": true,
      "evmVersion": "paris"
    },
    "engine": "amm_sim_rs 0.1.0.post1",
    "batch_call": "amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8)",
    "normalizer": "VanillaStrategy, fixed 30 bps",
    "config": "Pinned engine.py configs(start,end), direct transcription of MatchRunner._build_configs using np.random.default_rng(seed), size/rate/sigma draws in that order; all baseline variance flags True; 10000 steps.",
    "chunk_size": 16,
    "execution": "One chunk; candidate arm then gas gate then qt1 arm, separate sequential processes, gas_stats_reset before and gas_stats after each arm. No simultaneous chunk processes.",
    "diff": "candidate submission edge minus qt1 submission edge",
    "se": "sample standard deviation of paired differences / sqrt(n), ddof=1",
    "worst5": "ascending diff, then seed",
    "replica_gates": "Not rerun: this item is limited to frozen-policy engine confirmation on the named seeds."
  },
  "chunks": [
    {
      "start": 9805620,
      "end": 9805636,
      "arms": {
        "candidate": {
          "status": "done",
          "seconds": 10.861301901051775,
          "raw_gas_stats": [
            {
              "role": "Baseline",
              "callback": "afterInitialize",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21796,
              "sum_ok_gas": 348736,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Baseline",
              "callback": "afterSwap",
              "calls": 162837,
              "ok": 162837,
              "max_ok_gas": 22592,
              "sum_ok_gas": 3674041644,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Baseline",
              "callback": "getName",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21526,
              "sum_ok_gas": 344416,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "afterInitialize",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 92165,
              "sum_ok_gas": 1474640,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "afterSwap",
              "calls": 163887,
              "ok": 163887,
              "max_ok_gas": 201516,
              "sum_ok_gas": 21609739233,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "getName",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21648,
              "sum_ok_gas": 346368,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            }
          ],
          "normalizer_edges": [
            {
              "seed": 9805620,
              "edge": 333.2817834926985
            },
            {
              "seed": 9805621,
              "edge": 255.7526393753911
            },
            {
              "seed": 9805622,
              "edge": 315.1131700458739
            },
            {
              "seed": 9805623,
              "edge": 457.073368791895
            },
            {
              "seed": 9805624,
              "edge": 332.3770073440122
            },
            {
              "seed": 9805625,
              "edge": 312.74446992178014
            },
            {
              "seed": 9805626,
              "edge": 304.0784796830423
            },
            {
              "seed": 9805627,
              "edge": 303.87277728521906
            },
            {
              "seed": 9805628,
              "edge": 377.87514745346
            },
            {
              "seed": 9805629,
              "edge": 429.05149746464076
            },
            {
              "seed": 9805630,
              "edge": 305.8364732943942
            },
            {
              "seed": 9805631,
              "edge": 277.8784515713249
            },
            {
              "seed": 9805632,
              "edge": 301.5134018473295
            },
            {
              "seed": 9805633,
              "edge": 335.98974184988015
            },
            {
              "seed": 9805634,
              "edge": 299.8359722424433
            },
            {
              "seed": 9805635,
              "edge": 253.35959229994546
            }
          ]
        },
        "qt1": {
          "status": "done",
          "seconds": 11.298104302026331,
          "raw_gas_stats": [
            {
              "role": "Baseline",
              "callback": "afterInitialize",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21796,
              "sum_ok_gas": 348736,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Baseline",
              "callback": "afterSwap",
              "calls": 163000,
              "ok": 163000,
              "max_ok_gas": 22592,
              "sum_ok_gas": 3677718536,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Baseline",
              "callback": "getName",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21526,
              "sum_ok_gas": 344416,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "afterInitialize",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 90858,
              "sum_ok_gas": 1453728,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "afterSwap",
              "calls": 164733,
              "ok": 164733,
              "max_ok_gas": 206261,
              "sum_ok_gas": 22833034374,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            },
            {
              "role": "Submission",
              "callback": "getName",
              "calls": 16,
              "ok": 16,
              "max_ok_gas": 21579,
              "sum_ok_gas": 345264,
              "oog": 0,
              "revert": 0,
              "other_halt": 0,
              "tx_error": 0,
              "bad_return": 0
            }
          ],
          "normalizer_edges": [
            {
              "seed": 9805620,
              "edge": 333.0725330796005
            },
            {
              "seed": 9805621,
              "edge": 255.56990911562107
            },
            {
              "seed": 9805622,
              "edge": 315.02370476490483
            },
            {
              "seed": 9805623,
              "edge": 456.95897302632613
            },
            {
              "seed": 9805624,
              "edge": 331.6975705468296
            },
            {
              "seed": 9805625,
              "edge": 312.5038168197856
            },
            {
              "seed": 9805626,
              "edge": 303.92867551807944
            },
            {
              "seed": 9805627,
              "edge": 303.58465012973096
            },
            {
              "seed": 9805628,
              "edge": 377.8749653737157
            },
            {
              "seed": 9805629,
              "edge": 428.2558859439637
            },
            {
              "seed": 9805630,
              "edge": 305.24298479595006
            },
            {
              "seed": 9805631,
              "edge": 277.5423901694003
            },
            {
              "seed": 9805632,
              "edge": 300.3532984637267
            },
            {
              "seed": 9805633,
              "edge": 335.3118045839048
            },
            {
              "seed": 9805634,
              "edge": 299.1204024070903
            },
            {
              "seed": 9805635,
              "edge": 252.5325031743393
            }
          ]
        }
      }
    }
  ],
  "submission_afterSwap_totals": {
    "candidate": {
      "role": "Submission",
      "callback": "afterSwap",
      "calls": 163887,
      "ok": 163887,
      "max_ok_gas": 201516,
      "sum_ok_gas": 21609739233,
      "oog": 0,
      "revert": 0,
      "other_halt": 0,
      "tx_error": 0,
      "bad_return": 0,
      "mean": 131857.55571216752
    },
    "qt1": {
      "role": "Submission",
      "callback": "afterSwap",
      "calls": 164733,
      "ok": 164733,
      "max_ok_gas": 206261,
      "sum_ok_gas": 22833034374,
      "oog": 0,
      "revert": 0,
      "other_halt": 0,
      "tx_error": 0,
      "bad_return": 0,
      "mean": 138606.3167307097
    }
  },
  "combined_submission_afterSwap_totals": {
    "calls": 328620,
    "ok": 328620,
    "sum_ok_gas": 44442773607,
    "oog": 0,
    "revert": 0,
    "other_halt": 0,
    "tx_error": 0,
    "bad_return": 0,
    "max_ok_gas": 206261,
    "mean": 135240.623233522
  },
  "all_roles_all_callbacks_failures": {
    "oog": 0,
    "revert": 0,
    "other_halt": 0,
    "tx_error": 0,
    "bad_return": 0
  },
  "candidate_gas_limit_passed": true,
  "commands": [
    {
      "command": "timeout 470s git clone https://github.com/benedictbrady/amm-challenge test/scratch/scratch/amm-challenge",
      "exit": 0
    },
    {
      "command": "timeout 470s git checkout 6b6921f8d463314aa7c96234e1be25a25245f704",
      "exit": 0
    },
    {
      "command": "python3 stdin: urllib.request download the four pinned K inputs to scratch/inputs and scratch/tools; print SHA-256",
      "exit": 0
    },
    {
      "command": "timeout 470s sh scratch/setup.sh > scratch/setup.log 2>&1",
      "exit": 0,
      "runs": 1,
      "wheel_hash_check": "OK",
      "starter_validation": "Strategy 'StarterStrategy' validated successfully!"
    },
    {
      "command": ". scratch/env.sh && timeout 470s sh -c 'amm-match validate scratch/inputs/Candidate.sol && amm-match validate scratch/inputs/qt1.sol'",
      "exit": 0,
      "output": "Validating strategy...\nCompiling strategy...\nStrategy 'TaylorTwoCompQmTrim2' validated successfully!\nValidating strategy...\nCompiling strategy...\nStrategy 'TaylorGaussianQMSpline' validated successfully!\n"
    },
    {
      "command": ". scratch/env.sh && timeout 470s python stdin: check.compiled both contracts; assert candidate runtime == 21102 and both runtimes <= 24576",
      "exit": 0
    },
    {
      "command": ". scratch/env.sh && timeout 470s python scratch/tools/run_arm.py candidate > scratch/candidate-run.log 2>&1",
      "exit": 0
    },
    {
      "command": ". scratch/env.sh && timeout 470s python stdin: assert candidate done; all gas failure counts zero; Submission/afterSwap max_ok_gas <= 245000",
      "exit": 0
    },
    {
      "command": ". scratch/env.sh && timeout 470s python scratch/tools/run_arm.py qt1 > scratch/qt1-run.log 2>&1",
      "exit": 0
    },
    {
      "command": ". scratch/env.sh && timeout 470s python stdin: verify source quotations against fetched URLs, independently check paired SE, aggregate gas, write and parse deliverables, assert size limits",
      "exit": 0
    }
  ],
  "reproduction": {
    "note": "Scripts recorded for audit only; do not replay these reserved seeds. Work state was isolated under test/scratch/scratch/amm-challenge, using checkout scratch/ for all run state.",
    "setup_sh": "set -eu;R=$PWD/scratch;mkdir -p $R/tmp $R/bin $R/solcx\necho \"export TMPDIR=$R/tmp XDG_CACHE_HOME=$R/xc UV_CACHE_DIR=$R/uvc UV_PYTHON_INSTALL_DIR=$R/uvpy SOLCX_BINARY_PATH=$R/solcx VIRTUAL_ENV=$PWD/.venv PATH=$PWD/.venv/bin:$R/bin:\\$PATH\" >$R/env.sh;. $R/env.sh\ncommand -v uv >/dev/null||{ curl -LsSf https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz|tar --no-same-owner -xz -C $R/tmp;cp $R/tmp/uv-*/uv $R/bin/;}\nW=amm_sim_rs-0.1.0.post1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl;curl -LsSf https://github.com/gtmcknight/amm-sim/releases/download/sim-6b6921f8/$W -o $R/$W\necho \"aedb68280aca34c110968f00148387c95885207913fb2cf19a1ab4c5cfd6887a  $R/$W\"|sha256sum -c -\nuv venv --python 3.12 .venv;uv pip install $R/$W numpy numba cma py-solc-x==2.1.0 pyrevm==0.3.7;uv pip install --no-deps -e .\npython -c \"import solcx;solcx.install_solc('0.8.24')\"\namm-match validate contracts/src/StarterStrategy.sol\n",
    "run_arm_py": "# Credit Taylor (gtmcknight), reference policy, filter, tables and replica research.\nimport json, sys, time, traceback\nfrom pathlib import Path\nimport amm_sim_rs\nfrom engine import compiled, vanilla, configs\narm=sys.argv[1]\nassert arm in ('candidate','qt1')\nstart,end=9805620,9805636\npath=Path('scratch/'+arm+'-9805620-9805636.json')\ncode=compiled('scratch/inputs/'+('Candidate.sol' if arm=='candidate' else 'qt1.sol'))\nnormalizer=vanilla()\ncfg=configs(start,end)\nout=dict(arm=arm,start=start,end=end,status='started',rows=[],gas=None)\nwith path.open('x') as f: json.dump(out,f)\nt0=time.monotonic()\namm_sim_rs.gas_stats_reset()\ntry:\n    batch=amm_sim_rs.run_batch(list(bytes.fromhex(code['creation'])),list(normalizer),cfg,8)\n    out['rows']=[dict(seed=r.seed,edge=r.edges['submission'],normalizer_edge=r.edges['normalizer']) for r in batch.results]\n    assert sorted(r['seed'] for r in out['rows'])==list(range(start,end))\n    out['status']='done'\nexcept BaseException as e:\n    out.update(status='error',error=repr(e))\n    raise\nfinally:\n    out.update(gas=amm_sim_rs.gas_stats(),seconds=time.monotonic()-t0)\n    path.write_text(json.dumps(out))\n    print(json.dumps(out),flush=True)\n"
  },
  "interpretation": "This 16-seed paired sample has a positive mean difference; it does not establish a leaderboard result."
}
