{
 "notes": "Episode 8/10. Entry: 89/400 items used, no refusals, 11 results handed. Out on entry: e07-fork-mine (1 of 12 in, 7 held), e07-public-search/code, e07-run-anchor (5 of 6), e07-vol-flow, e07-lean-tail, e06-rs-side/a. This episode: 8 batches, 22 items (111 used if admitted, 289 left); resumes two canaries; cancels e05-confirm-rs and e06-rs2-wide. A first attempt at this episode was rejected as invalid_output (spawn.1, spawn.2: Invalid input); nothing of it ran. Here every filled brief is <= 2,966 ASCII characters, vars are short strings all used in the brief, and every batch has output and merge.\n\nBASE: RS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5, sha256 f24b6ca198b744c380842c3a17964a6dc21f311bb04984b26733afa3fee8eaf2 (generator_source there). Harness = `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194. The requester submits any file confirmed >= +0.07 over RS2 pooled over 4,000 fresh seeds, 0 OOG.\n\nRESULTS READ (local paired, each arm alone vs Vanilla; none is a board result):\n- e06-rs-post a/b (cleaned rate into the first-print odds): held-out 512 vs RS2 -0.102 se 0.023, -0.011 se 0.015. RETIRED.\n- e06-rs2-wide: b cut short (null); c +0.019 se 0.009 vs RS2 (sha 34b838f2..., retention at its 0.9999 bound); e +0.010 se 0.016. With a -0.004, d -0.021: plateau; c is the best of six and under the +0.03 gate, no confirmation. 7-parameter RS family CLOSED.\n- e07-run-anchor/sigma-a: blocked at clone; not a tried idea, sigma-b is out.\n- e07-fork-mine/f3 (sisyphusSmiling, muttoni, EricForgy, wellimbharath): best 'godknows' (wellimbharath @99c50906, contracts/src/Strategy.sol; MIT by SPDX line and pyproject, no LICENSE file) -2.731 se 0.078 vs RS2, edge-identical to YQ's file.\n- e07-public-search (writeups, entrants; repos could not run the wheel): every public state-estimation file is the yq architecture retuned and loses to RS2 on 901000..901255: CH (ChengHua926 @d34a5199, SPDX MIT) -1.840 se 0.070; houseofjiao @4f41eb91 (board 14th; public file not shown to be the entry) -1.838; YQ (jiayaoqijia/amm-challenge-yq @3e9dc7d5, SPDX MIT, README claims 523.21) -2.731; dipankar SigmaAdaptive @c588ae6c -7.965. Unscored: 0xniki, lumen-dev-a11y, ylintern, happybigmtn (self-reported 507): e08-public-measure. Of the top 30 only houseofjiao has published code.\n- Public record on the top eight (organiser Benedict Brady, benedict.dev/optimization-arena-learnings): 'two black box neural networks implemented in Solidity', compact 200-300 line models, 'kitchen sink approaches with over 100 tuned constants', one that tried to 'fully model the competitor AMM in Solidity'; shared ideas: 'estimating probabilities of arb trades and skewing based on information from the arbs', 'dynamically adjusting widths based on the estimated sim volatility', 'suppressing the skew from outlier trades'. Code fragments in its figures (via a fetch tool, unverified): stickyDev = max(dev, ...), if (arbCount > 3) fee += SURGE_BUMP, normGap from normX*normY, a ReLU layer.\n\nREADING: the leaders' kinds of rule (networks, 100+ constants) come from search at a scale the EVM simulator does not give: 0.4 s a run is 60-180 evaluations an item, so every search here ended in tenths. The lever not yet pulled is a fast replica of the market.\n\nDECISIONS:\n1 e08-replica a-e: numba replica of the Rust engine with a marked strategy section, CH ported; checked by means (CH on configs 0..999 against 525.5258821780834; flat 30 bps), by transfer (three CH variants: real paired delta on 128 seeds against the replica's) and speed. Returns replica_source.\n2 e08-rs2-port a-d: RS2 as njit-able Python on the same interface, strat_init(S, TH, x0, y0) and strat_after(S, TH, is_buy, amount_x, amount_y, timestamp, reserve_x, reserve_y), every constant in TH; differential test against the EVM through pyrevm (target 0.01 bps). Returns port_source.\n3 e08-vanilla-quote a-c, 4 e08-dual-anchor a/b: competitor model on RS2 (virtual Vanilla reserves; Vanilla's spot from the router's equal-marginal-price condition) steering the attracting side's fee, or anchoring the price estimate. (e01's normalizer-state, a wholesale replacement on STACK, lost 1.4 in one item; these are bounded residuals.)\n5 e08-arb-skew a/b: direction state pushed by posterior arb probability, outliers capped. 6 e08-sticky-dev a/b: peak-hold deviation beside the toxicity EMA. 7 e08-arb-surge a/b: surcharge on arb streaks.\n8 e08-public-measure a/b: six unscored public files vs RS2 on the common seeds, with owner, commit, path, licence.\nResume e07-fork-mine, e07-run-anchor (their briefs work). Cancel e05-confirm-rs (RS1 superseded), e06-rs2-wide (closed).\n\nLICENCE RECORD (requester 00:19Z): nothing mined beats RS2, so no third-party code is in any candidate. The e08 mechanisms rest on the organiser's prose, not on code. Keep owner, commit, path and licence with any candidate built from a public file.\n\nLEDGER. Confirmation blocks: [5000000,5108000) spent or reserved; NEXT FREE 5108000; none allocated now. Tuning: 960000..999999 now used; tails s+6100..s+9999 of bands 640000, 650000, 660000 used; replica transfer seeds 676100, 686100, 696100, 706100, 716100 (128 each). NEXT FREE tails: bands 720000 to 890000 (search s+6100..s+8999, re-check s+9000..s+9255, held-out s+9400..s+9911, parity s+9950..s+9981). Mining seeds 900000..900031, 901000..901255.\n\nEPISODE 9 PLAN (the last whose work an episode reads; episode 10 sets finish):\n(a) Read blocked first. Take the replica whose CH mean is within 2 se of the real one, whose flat-fee mean matches and whose transfer deltas agree in sign and roughly in size; take the RS2 port with max difference <= 0.01 bps. A result is fetchable at https://api.imdnotdead.fun/artifacts/<sha256 of the result file> (the SHA-256 on its Input line): put both URLs in the briefs.\n(b) With both, spawn the wide wave (100-180 items, a canary first). Each item splices port_source into replica_source, checks replica RS2 against real RS2 on 256 configs, searches ONE family in the replica for 30 minutes (thousands of evaluations), writes its best two back as Solidity, re-checks them in the real simulator on 256 seeds vs RS2, runs the better on 512 held-out seeds and, only if that is > 2 se and >= +0.07, on 1,000 fresh seeds of its own block from 5108000. Families, 8-20 copies each: all RS2 constants jointly (diagonal CMA over TH); a small ReLU net residual on RS2's state, bounded to 3 bps a side; the competitor model fitted to the replica's true Vanilla reserves; regime-split constants; oracle headroom (replica rules that see the true price, Vanilla's spot or the next event type, to locate the 8.7 gap to 1st: reported, never shipped).\n(c) With no valid replica: spend on whichever e08 mechanism was positive and a second replica round.\n(d) e08 mechanisms and e07 items still out: frozen held-out vs RS2 > 2 se and >= +0.05 -> two-machine confirmation of the exact file on 5108000 and 5110000 (CH calibration, seeds 0..999 = 525.5258821780834, in the brief); else retire with its artifact.\n(e) Keep 40 items back. Episode 10: finish with the best confirmed file, sha256, provenance, the honest gap.\n\nHONEST STATUS: local +0.31 over STACK (V10 +0.136, RS1 +0.085, RS2 +0.090). Board 519.85 with V10; RS2 submitted, expected near 520.0; 10th about +4.6 above. No board rank is claimed from local figures.\nRULES: filled briefs < 3,000 characters with the verbatim setup script; short string vars, mechanism text in the brief; two or more items per idea; batches of five or fewer start whole; CH calibration in every confirm brief; no seed >= 5000000 for tuning; never pool different hashes; afterSwap < 235k, init < 245k (RS2 init 243,099); any OOG invalidates a hash. finish=false.",
 "spawn": [
  {
   "name": "e08-replica",
   "brief": "Build a fast Python replica of the AMM fee challenge market. Copy {{copy}}.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nThen `uv pip install numba` (plain numpy if that fails).\nWrite replica.py: a numba-jitted scalar loop run_market(TH, seed, mean_size, rate, sigma, n_steps) -> edge, retail_edge, arb_edge, retail_volume of the strategy pool, following the pinned Rust engine (amm_sim_rs/src) rule for rule (step order, price step, arbitrage, retail arrivals and sizes, router split, fees, Vanilla pool). The strategy sits between lines `# STRATEGY BEGIN` and `# STRATEGY END` as jitted strat_init(S, TH, x0, y0) and strat_after(S, TH, is_buy, amount_x, amount_y, timestamp, reserve_x, reserve_y) (TradeInfo's fields as floats, WAD/1e18; S float64[40] state; TH float64 constants), each returning (bid_fee, ask_fee) as fractions. Add run_many(TH, seeds, procs), configs per MatchRunner._build_configs. Port CH (https://raw.githubusercontent.com/ChengHua926/amm-challenge/d34a5199c59a4c44d5336a25f1436b4ae1f21104/contracts/src/Strategy.sol) between the markers, its constants in TH.\nValidate against the real run_batch(X, VanillaStrategy, configs, 8); paths differ, so compare means with a two-sample se. (1) Real CH on seeds 0..999 is 525.5258821780834: give the replica's CH mean on those configs; run a flat 30 bps fee both ways on seeds 0..255. (2) Transfer: for CH with base fee +3 bps, stale shift x0.8 and lambda coefficient x1.5, give the real paired delta vs CH on 128 seeds from {{tseed}} and the replica's on 4096 markets. (3) Markets per second, 8 processes.\nReturn JSON: blocked, replica_source (whole file), th_names, validation (per strategy: real and replica mean, diff, se), transfer (per variant: real and replica delta, se), speed, deviations (unmatched rules), notes.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "tseed": "676100"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "tseed": "686100"
     }
    },
    {
     "key": "c",
     "vars": {
      "copy": "c",
      "tseed": "696100"
     }
    },
    {
     "key": "d",
     "vars": {
      "copy": "d",
      "tseed": "706100"
     }
    },
    {
     "key": "e",
     "vars": {
      "copy": "e",
      "tseed": "716100"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-rs2-port",
   "brief": "Port RS2, this network's best AMM fee challenge strategy, from Solidity to Python for a fast market replica. Copy {{copy}}.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (sha256 f24b6ca198b744c380842c3a17964a6dc21f311bb04984b26733afa3fee8eaf2).\nWrite rs2_port.py with two functions that numba.njit compiles (scalar float64 maths), strat_init(S, TH, x0, y0) and strat_after(S, TH, is_buy, amount_x, amount_y, timestamp, reserve_x, reserve_y) (TradeInfo's fields as floats, WAD/1e18; S float64[40] state; TH float64 constants), each returning (bid_fee, ask_fee) as fractions. S holds the contract's slots, packed slots unpacked into separate entries; TH holds EVERY numeric constant of the contract in source order, named in TH_NAMES. Keep the Solidity's control flow, caps and clamps; use floats for WAD integers and note where rounding or an integer square root could matter.\nDifferential test against the EVM: deploy the compiled RS2 with the repository's own EVM adapter (amm_competition/evm, pyrevm) and drive it and the port with the same callbacks: at least 200 sequences of 2,000 from a small Python market (random-walk fair price, arbitrage to the fee band, random retail fills, 0 to 4 trades per step, gaps of several steps), returned fees used for the next trade, fees compared after every callback. The port is useful only if fees agree within 0.01 bps on nearly every callback: fix divergences first.\nReturn JSON: blocked, port_source (whole file), th_names, th_values, slots (index, meaning), diff_test (sequences, callbacks, max and mean abs fee difference in bps, share above 0.01 bps, first divergence and cause), njit_compiles, speed, deviations, notes.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b"
     }
    },
    {
     "key": "c",
     "vars": {
      "copy": "c"
     }
    },
    {
     "key": "d",
     "vars": {
      "copy": "d"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-vanilla-quote",
   "brief": "Test one fee mechanism on RS2, our best AMM fee challenge strategy. Mechanism vq, copy {{copy}}: model the competitor pool. Keep the 30 bps Vanilla pool's virtual reserves in two new slots. When RS2's price estimate moves, arbitrage them to the edge of Vanilla's 30 bps band; after each own retail fill, set Vanilla's spot by the router's equal-marginal-price condition. Pull the attracting side's fee toward the one that undercuts Vanilla's modelled quote by m: fee += g*(target - fee), clipped to c bps. Search g (both signs), c, m; neutral g=0. Source: benedict.dev/optimization-arena-learnings: 'fully model the competitor AMM'.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (its `generator_source` builds it). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: build it into RS2 as a parametrised generator whose neutral setting matches RS2 edge for edge on seeds {{parity}}. Search the parameters (CMA-ES or grid, seed {{cma}}) for 25 minutes on 64-seed blocks from {{search}}, paired with RS2. Re-check the best 3 on {{recheck}}, freeze one, run it and RS2 on held-out {{hold}}. Reject any halt, afterSwap gas >= 235000 or afterInitialize gas >= 245000 (RS2: 243099; write no new slot there).\nReturn JSON: blocked, code (frozen Solidity), sha256, params, mechanism (two sentences), source (URL, quote), search (evaluations, best), held_out vs RS2 (n, mean_diff, se, worst 5 seeds), retail_edge_delta, arb_edge_delta, gas (max_ok, init_max_ok, oog), notes. Report a loss as measured.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "cma": "81",
      "search": "960000..962999",
      "recheck": "963000..963255",
      "hold": "964000..964511",
      "parity": "964600..964631"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "cma": "82",
      "search": "965000..967999",
      "recheck": "968000..968255",
      "hold": "969000..969511",
      "parity": "969600..969631"
     }
    },
    {
     "key": "c",
     "vars": {
      "copy": "c",
      "cma": "83",
      "search": "970000..972999",
      "recheck": "973000..973255",
      "hold": "974000..974511",
      "parity": "974600..974631"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-dual-anchor",
   "brief": "Test one fee mechanism on RS2, our best AMM fee challenge strategy. Mechanism va, copy {{copy}}: dual anchor. From each own retail fill infer the Vanilla pool's post-trade spot by the router's equal-marginal-price condition; the fair price lies within 30 bps of it. Use that interval, widened by k*sigmaHat per step since the fill, as a second anchor: pull RS2's fast price estimate (variants: the slow one, or the price behind the stale-side decision) into the interval with weight w. Search w in 0..1, k, the variant; neutral w=0. Source: benedict.dev/optimization-arena-learnings: 'fair price EMA, dual anchor, or virtual reserves'.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (its `generator_source` builds it). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: build it into RS2 as a parametrised generator whose neutral setting matches RS2 edge for edge on seeds {{parity}}. Search the parameters (CMA-ES or grid, seed {{cma}}) for 25 minutes on 64-seed blocks from {{search}}, paired with RS2. Re-check the best 3 on {{recheck}}, freeze one, run it and RS2 on held-out {{hold}}. Reject any halt, afterSwap gas >= 235000 or afterInitialize gas >= 245000 (RS2: 243099; write no new slot there).\nReturn JSON: blocked, code (frozen Solidity), sha256, params, mechanism (two sentences), source (URL, quote), search (evaluations, best), held_out vs RS2 (n, mean_diff, se, worst 5 seeds), retail_edge_delta, arb_edge_delta, gas (max_ok, init_max_ok, oog), notes. Report a loss as measured.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "cma": "84",
      "search": "975000..977999",
      "recheck": "978000..978255",
      "hold": "979000..979511",
      "parity": "979600..979631"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "cma": "85",
      "search": "980000..982999",
      "recheck": "983000..983255",
      "hold": "984000..984511",
      "parity": "984600..984631"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-arb-skew",
   "brief": "Test one fee mechanism on RS2, our best AMM fee challenge strategy. Mechanism ask, copy {{copy}}: skew from arbitrage information. RS2's direction state is pushed by every trade above a size threshold. Push it with weight a + (1-a)*p, p = RS2's posterior probability that the print was arbitrage, so a<1 takes the skew from arbs; and cap the trade ratio used in the push at k times RS2's cleaned size state. Search a in 0..1, k in 0.5..8 and a gain on both skew coefficients; neutral a=1, k off, gain 1. Source: benedict.dev/optimization-arena-learnings: 'skewing based on information from the arbs', 'suppressing the skew from outlier trades'.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (its `generator_source` builds it). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: build it into RS2 as a parametrised generator whose neutral setting matches RS2 edge for edge on seeds {{parity}}. Search the parameters (CMA-ES or grid, seed {{cma}}) for 25 minutes on 64-seed blocks from {{search}}, paired with RS2. Re-check the best 3 on {{recheck}}, freeze one, run it and RS2 on held-out {{hold}}. Reject any halt, afterSwap gas >= 235000 or afterInitialize gas >= 245000 (RS2: 243099; write no new slot there).\nReturn JSON: blocked, code (frozen Solidity), sha256, params, mechanism (two sentences), source (URL, quote), search (evaluations, best), held_out vs RS2 (n, mean_diff, se, worst 5 seeds), retail_edge_delta, arb_edge_delta, gas (max_ok, init_max_ok, oog), notes. Report a loss as measured.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "cma": "86",
      "search": "985000..987999",
      "recheck": "988000..988255",
      "hold": "989000..989511",
      "parity": "989600..989631"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "cma": "87",
      "search": "990000..992999",
      "recheck": "993000..993255",
      "hold": "994000..994511",
      "parity": "994600..994631"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-sticky-dev",
   "brief": "Test one fee mechanism on RS2, our best AMM fee challenge strategy. Mechanism sticky, copy {{copy}}: sticky deviation. RS2's toxicity signal is a nearly memoryless EMA of |spot - pHat|/pHat. Add a peak-hold in one new slot, sticky = max(dev, sticky * d^steps_elapsed), and feed (1-w)*tox + w*sticky into (i) the toxicity fee terms and (ii) the stale-side shift, each with its own w. Search d in 0.5..0.99, both w, and a multiplier on the cubic term; neutral w=0. Source: benedict.dev/optimization-arena-learnings; a code fragment there reads stickyDev = max(dev, ...): quote what you find.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (its `generator_source` builds it). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: build it into RS2 as a parametrised generator whose neutral setting matches RS2 edge for edge on seeds {{parity}}. Search the parameters (CMA-ES or grid, seed {{cma}}) for 25 minutes on 64-seed blocks from {{search}}, paired with RS2. Re-check the best 3 on {{recheck}}, freeze one, run it and RS2 on held-out {{hold}}. Reject any halt, afterSwap gas >= 235000 or afterInitialize gas >= 245000 (RS2: 243099; write no new slot there).\nReturn JSON: blocked, code (frozen Solidity), sha256, params, mechanism (two sentences), source (URL, quote), search (evaluations, best), held_out vs RS2 (n, mean_diff, se, worst 5 seeds), retail_edge_delta, arb_edge_delta, gas (max_ok, init_max_ok, oog), notes. Report a loss as measured.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "cma": "88",
      "search": "995000..997999",
      "recheck": "998000..998255",
      "hold": "999000..999511",
      "parity": "999600..999631"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "cma": "89",
      "search": "646100..648999",
      "recheck": "649000..649255",
      "hold": "649400..649911",
      "parity": "649950..649981"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-arb-surge",
   "brief": "Test one fee mechanism on RS2, our best AMM fee challenge strategy. Mechanism surge, copy {{copy}}: arbitrage-streak surge. In one new slot count consecutive steps whose first print RS2's posterior classes as arbitrage (p > 0.5) in the same direction; reset on a retail first print, a direction change or a gap above G steps. While the count exceeds n, add b bps to the fee on the side the arbitrage keeps hitting and subtract r*b from the other. Search n in 1..6, b in 0..10, r in 0..1, G in 1..8; neutral b=0. Source: benedict.dev/optimization-arena-learnings; a code fragment there reads if (arbCount > 3) fee += SURGE_BUMP: quote what you find.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (its `generator_source` builds it). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: build it into RS2 as a parametrised generator whose neutral setting matches RS2 edge for edge on seeds {{parity}}. Search the parameters (CMA-ES or grid, seed {{cma}}) for 25 minutes on 64-seed blocks from {{search}}, paired with RS2. Re-check the best 3 on {{recheck}}, freeze one, run it and RS2 on held-out {{hold}}. Reject any halt, afterSwap gas >= 235000 or afterInitialize gas >= 245000 (RS2: 243099; write no new slot there).\nReturn JSON: blocked, code (frozen Solidity), sha256, params, mechanism (two sentences), source (URL, quote), search (evaluations, best), held_out vs RS2 (n, mean_diff, se, worst 5 seeds), retail_edge_delta, arb_edge_delta, gas (max_ok, init_max_ok, oog), notes. Report a loss as measured.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a",
      "cma": "90",
      "search": "656100..658999",
      "recheck": "659000..659255",
      "hold": "659400..659911",
      "parity": "659950..659981"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b",
      "cma": "91",
      "search": "666100..668999",
      "recheck": "669000..669255",
      "hold": "669400..669911",
      "parity": "669950..669981"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  },
  {
   "name": "e08-public-measure",
   "brief": "Score six public AMM fee challenge strategy files against RS2 and record where each comes from. Copy {{copy}}.\nSetup: clone github.com/benedictbrady/amm-challenge @6b6921f8d463314aa7c96234e1be25a25245f704 in the workspace (never /tmp), save the script below as scratch/setup.sh, run it once with sh at the root, prefix later commands `. scratch/env.sh && `; on failure return blocked={step,error}.\nset -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 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\nFiles, each at its repository's current default-branch commit (record the hash): github.com/0xniki/amm-challenge my_strategy.sol; github.com/lumen-dev-a11y/amm-challenge-lab amm-challenge/my_strategy.sol; github.com/ylintern/ammchallenge Strategy.sol; github.com/happybigmtn/ammchallenge-lab amm_submissions/Strategy.sol and amm_submissions/Strategy_best_494.sol; github.com/dipankar/amm-challenge contracts/src/SigmaAdaptiveStrategy.sol. Use the source bytes unchanged; run nothing else from those repositories.\nRS2 = `code` of https://api.imdnotdead.fun/artifacts/19f2ec857df536e8ab62ab1da89ec6623332521ce46849f15bccff402c63e1e5 (sha256 f24b6ca198b744c380842c3a17964a6dc21f311bb04984b26733afa3fee8eaf2). Harness: `harness_source` of https://api.imdnotdead.fun/artifacts/33f54e81f3372088e9eced52c0174f310ac348af98ef5727b73785c088679194 (each strategy alone vs VanillaStrategy; gas_stats() per 20-seed chunk).\nDo: `amm-match validate` each file; run every valid file and RS2 on seeds 900000..900031; run the best three and RS2 on 901000..901255.\nReturn JSON: blocked, files (per file: owner, repository, commit, path, sha256, valid, licence = the repository's LICENSE file if any and the file's SPDX line, d32 vs RS2, oog), top3 (per file: paired n, mean_diff, se, worst 5 seeds vs RS2, retail_edge_delta, arb_edge_delta, gas max_ok and oog, mechanism: what differs from RS2, two sentences), notes.",
   "items": [
    {
     "key": "a",
     "vars": {
      "copy": "a"
     }
    },
    {
     "key": "b",
     "vars": {
      "copy": "b"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 60000
   },
   "merge": {
    "groupSize": 25,
    "brief": "List each item's key, whether it was blocked, and its headline figures exactly as the item reported them."
   }
  }
 ],
 "read": [
  "e08-replica/a",
  "e08-replica/b",
  "e08-replica/c",
  "e08-replica/d",
  "e08-replica/e",
  "e08-rs2-port/a",
  "e08-rs2-port/b",
  "e08-rs2-port/c",
  "e08-rs2-port/d",
  "e08-vanilla-quote/a",
  "e08-vanilla-quote/b",
  "e08-vanilla-quote/c",
  "e08-dual-anchor/a",
  "e08-dual-anchor/b",
  "e08-arb-skew/a",
  "e08-arb-skew/b",
  "e08-sticky-dev/a",
  "e08-sticky-dev/b",
  "e08-arb-surge/a",
  "e08-arb-surge/b",
  "e08-public-measure/a",
  "e08-public-measure/b",
  "e07-vol-flow/a",
  "e07-vol-flow/b",
  "e07-lean-tail/a",
  "e07-lean-tail/b",
  "e07-run-anchor/sigma-b",
  "e07-run-anchor/act-a",
  "e07-run-anchor/tox-a",
  "e07-public-search/code"
 ],
 "cancel": [
  "e05-confirm-rs",
  "e06-rs2-wide"
 ],
 "resume": [
  "e07-fork-mine",
  "e07-run-anchor"
 ],
 "wake": {
  "batches": [
   "e08-replica",
   "e08-rs2-port",
   "e08-vanilla-quote",
   "e08-dual-anchor",
   "e08-arb-skew",
   "e08-sticky-dev",
   "e08-arb-surge",
   "e08-public-measure"
  ],
  "afterMinutes": 100
 },
 "finish": false
}