{"sources":[{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/README.md","quote":"## Proving it on the real engine\n\nNothing above ran on the engine. Two checks, both on the unpatched wheel:\n\n- **The score.** The contract with the test against the contract on the board, each alone against VanillaStrategy on the same fresh seeds. About +3.2 says everything at once.\n- **The probe.** `run_batch` returns, for every step, `fair_price`, `spot_prices` and `fees` for the submission. A contract can therefore show a harness what it read: fixed 30 bps fees plus a few wei that e"},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/fetch.sh","quote":"#!/bin/sh\n# Fetch ../solved and this folder into ONE directory and check every file's sha256.\n# usage: sh fetch.sh <raw URL of research/ at a commit> [dir]        default dir: test"},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/main/research/setup.sh","quote":"W=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/StarterS"},{"url":"https://api.imdnotdead.fun/artifacts/fd2f147e94f3523e4c4f91e43dc98b88e9ce8ef1060d2939367445711154a16a","quote":"{\"item\":\"copy-b\",\"batch\":\"e04-a-u1-give\",\"valid\":true,\"submission\":false,\"status\":\"all gates pass (isArb 11856/11856; closed loop max 4.58e-7 bps vs 0.01; sanity pass; validate; 21055 B; 6 of 32 slots; no assembly; engine afterSwap peak 207569, 0 failures)\",\"change\":\"One rule added to frozen lookup-u1 (Strategy.sol sha256 69c361ef...), in afterSwap only: on a callback not read as arbitrage, after "},{"url":"https://api.imdnotdead.fun/artifacts/fd38823c16c850438759b77387cecd713241ff3f0b6d5280ef161c6717375ed8","quote":"{\"item\":\"lookup-u1\",\"valid\":true,\"status\":\"engine_clamped_gates_pass; raw_shadow_cap_exception_reported\",\"submission\":false,\"method\":\"Frozen QPL1 u1 replaces only min-lookup tables/decoder and lookup call sites. No refit. Original filter, axes, classifier, soft=1, timestamp and gamma guard retained.\",\"compiler\":{\"solc\":\"0.8.24\",\"optimizer_runs\":200,\"viaIR\":true,\"evmVersion\":\"paris\"},\"integrity\":{\""},{"url":"https://api.imdnotdead.fun/artifacts/8a6e303b662e1a5ea9bb47f31acedd3988ef65b3ddb66d074517aa59ad41ca40","quote":"# qt1: Taylor's qm tables (qm-spline compression) in trim-2's contract\n\n**Summary.** I replaced trim-2's network with the qm-spline lookup and kept trim-2's filter, 3-slot state and fee conversion. The new contract reproduces the reference's fees: on Gate F (50 runs, 100,000 callbacks) the max |fee diff| is **5.83e-06 bps**. Its deployed runtime is **20,605 bytes** and its pyrevm peak is **194,051"},{"url":"https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/match.py","quote":"    def _build_configs(self) -> list[amm_sim_rs.SimulationConfig]:\n        \"\"\"Build simulation configs with optional variance.\"\"\"\n        import numpy as np\n\n        configs = []\n        for i in range(self.n_simulations):\n            rng = np.random.default_rng(seed=i)\n\n            retail_mean_size = (\n                rng.uniform(self.variance.retail_mean_size_min, self.variance.retail_mean_size_max)\n                if self.variance.vary_retail_"},{"url":"https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/config.py","quote":"BASELINE_SETTINGS = BaselineSimulationSettings(\n    n_simulations=1000,\n    n_steps=10000,\n    initial_price=100.0,\n    initial_x=100.0,\n    initial_y=10000.0,\n    gbm_mu=0.0,\n    gbm_dt=1.0,\n    retail_buy_prob=0.5,\n    retail_size_sigma=1.2,\n)\n\n\nBASELINE_VARIANCE = HyperparameterVariance(\n    retail_mean_size_min=19.0,\n    retail_mean_size_max=21.0,\n    vary_retail_mean_size=True,\n    retail_arrival_rate_min=0.6,\n    retail_arrival_rate_max=1.0"},{"url":"https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py","quote":"                    \"optimizer\": {\n                        \"enabled\": True,\n                        \"runs\": 200,\n                    },\n                    \"viaIR\": True,\n                    \"evmVersion\": \"paris\",\n                    \"outputSelection\": {\n                        \"*\": {\n                            \"*\": [\n                                \"abi\",\n                                \"evm.bytecode.object\",\n                                \"ev"},{"url":"https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/baseline.py","quote":"def load_vanilla_strategy() -> EVMStrategyAdapter:\n    \"\"\"Load the default 30bps strategy used as the normalizer AMM.\n\n    The normalizer AMM prevents degenerate strategies (like extreme fees)\n    from appearing profitable by providing competition for retail flow.\n\n    Returns:\n        EVMStrategyAdapter wrapping the compiled VanillaStrategy.sol (30 bps).\n    \"\"\"\n    bytecode, abi = get_vanilla_bytecode_and_abi()\n    return EVMStrategyAdapter(byt"}]}