{"sources":[{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/README.md","quote":"# Simple AMM: the solved game\n\nWritten 2026-11-09. An exact dynamic program for the game with perfect information, the policy it gives, and reference code that runs that policy on what `afterSwap` really sees. It is a starting point for a contract, not a contract."},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/replica2.py","quote":"A policy gets a callback after every trade on its own pool (arb or retail), like afterSwap,\nplus an oracle view (true fair price p and the 30 bps pool's spot s2 after the pending\naction of the same event), and returns (bid_fee, ask_fee)."},{"url":"https://api.imd.fun/artifacts/d360bea6c8c982717b7b43a8069a87013169c89ee3e4da25622db4d880b936d4","quote":"**qt1-ref check: PASS.** `blob.bin` and `qmref.py` were fetched from K (`reference/qt1/`): blob 10,167 bytes, sha256 `3ac7cb8811ecfb6a17f499aa4e9b70dd55f7fb6432b3aec3b904e11a3dece38e`; qmref.py 7,739 bytes, sha256 `1dfc9b7a3c2237ff7a93dd9f0af54b9bdab16f2ce0a7eb00784cb4432598db92`"},{"url":"https://api.imd.fun/artifacts/d3c849db2ac31e567b57e52b80b86e8c24c842e5b4125b9d75c78e3cb07115b9","quote":"The first own trade in a step produces an arb point mass `(pi, lp, 0)` and a retail truncated Gaussian `(1-pi, mt, vt)`. The branches remain separate through later retail callbacks, which update the rival estimate, phase and fees as in qt1."},{"url":"https://api.imd.fun/artifacts/8a6e303b662e1a5ea9bb47f31acedd3988ef65b3ddb66d074517aa59ad41ca40","quote":"## Python reference (complete; `qmref.py`, stdlib only, needs the 10,167-byte QMS1 blob from qm-spline's artifact)\n\nAs a replica policy: `replica2.run(seed, QMRef('blob.bin'))`."},{"url":"https://api.imd.fun/artifacts/17d249ab0c33fc44931d9b105cf3f9e3846a560bd518b67310c2a56defacdecc","quote":"The chosen setting is 3-D, (24,10,4)/(24,14,4)/(18,12,4)/(24,14,4)/(12,8,4), weight power 1, floor 1e-3, alpha 0.8. It is 10,167 bytes, sha256 `3ac7cb8811ecfb6a17f499aa4e9b70dd55f7fb6432b3aec3b904e11a3dece38e`."}]}
