{
  "approach": "R4 simplify tail-one: replace NP asymmetric tail compression with one shared slope and one knee. Predeclared 4x4 grid: slopes 0.85, 0.89, 0.93, 0.97; knees 300, 450, 600, 750 bps. Select highest paired tuning mean, freeze, then evaluate once on untouched seeds.",
  "tried": [
    {
      "variant": "s85k300",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.85,
      "knee_bps": 300,
      "n": 2000,
      "mean_diff": -0.5087029283453296,
      "se": 0.015693029680253306,
      "worst": [
        {
          "seed": 31764,
          "diff": -15.424571007016198
        },
        {
          "seed": 31658,
          "diff": -3.076707305512855
        },
        {
          "seed": 30057,
          "diff": -2.8580281635530014
        },
        {
          "seed": 30740,
          "diff": -2.8314743585627866
        },
        {
          "seed": 30490,
          "diff": -2.79943436248584
        }
      ],
      "code_sha256": "4df4595fb268d3e01c84fb6294558b1a79dcf87301ed35e930851c81120287ea"
    },
    {
      "variant": "s85k450",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.85,
      "knee_bps": 450,
      "n": 2000,
      "mean_diff": -0.12922142668208741,
      "se": 0.008747927250369554,
      "worst": [
        {
          "seed": 31764,
          "diff": -9.718354039885412
        },
        {
          "seed": 31083,
          "diff": -1.4561526270185254
        },
        {
          "seed": 30134,
          "diff": -1.2329892283473782
        },
        {
          "seed": 30490,
          "diff": -1.1926635971094584
        },
        {
          "seed": 30054,
          "diff": -1.1790783095744928
        }
      ],
      "code_sha256": "79e8f3e967023950ef202fe1019e21eea60aeb2c59875aef7d3a0f302440d606"
    },
    {
      "variant": "s85k600",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.85,
      "knee_bps": 600,
      "n": 2000,
      "mean_diff": -0.006366111114589472,
      "se": 0.002651133663537031,
      "worst": [
        {
          "seed": 31764,
          "diff": -4.2279662631485735
        },
        {
          "seed": 30893,
          "diff": -0.6859388420285768
        },
        {
          "seed": 31003,
          "diff": -0.4544444460342447
        },
        {
          "seed": 31966,
          "diff": -0.40312846381829104
        },
        {
          "seed": 31237,
          "diff": -0.3937237904704034
        }
      ],
      "code_sha256": "ced53a5ce683332ba3508be45b7065d68d3af60a831e44f831c40f313bfb3987"
    },
    {
      "variant": "s85k750",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.85,
      "knee_bps": 750,
      "n": 2000,
      "mean_diff": 0.007845987430560456,
      "se": 0.011327863061766806,
      "worst": [
        {
          "seed": 31637,
          "diff": -7.529850763913487
        },
        {
          "seed": 30134,
          "diff": -6.598368759756227
        },
        {
          "seed": 30210,
          "diff": -3.916458296437554
        },
        {
          "seed": 31237,
          "diff": -3.432363365813899
        },
        {
          "seed": 30744,
          "diff": -3.4224865884117435
        }
      ],
      "code_sha256": "11eb2a5bbf70351d3560e029a230f31ab6bc91b53ed39415874a54324e4ec79c"
    },
    {
      "variant": "s89k300",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.89,
      "knee_bps": 300,
      "n": 2000,
      "mean_diff": -0.2999671520462029,
      "se": 0.011935174176527456,
      "worst": [
        {
          "seed": 31764,
          "diff": -11.632516481892822
        },
        {
          "seed": 30057,
          "diff": -2.0729562961561783
        },
        {
          "seed": 30758,
          "diff": -2.0450222164545266
        },
        {
          "seed": 31658,
          "diff": -1.8959264797911146
        },
        {
          "seed": 30490,
          "diff": -1.8603639020210494
        }
      ],
      "code_sha256": "15a8f8fb860bec678980ac8520de2896cd1a7c44b911e1115c902576c4d95b91"
    },
    {
      "variant": "s89k450",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.89,
      "knee_bps": 450,
      "n": 2000,
      "mean_diff": -0.06563570376976764,
      "se": 0.00643145045328771,
      "worst": [
        {
          "seed": 31764,
          "diff": -6.616624549373569
        },
        {
          "seed": 31028,
          "diff": -1.098346803945219
        },
        {
          "seed": 31083,
          "diff": -1.0972092284861787
        },
        {
          "seed": 31432,
          "diff": -0.7733967076377439
        },
        {
          "seed": 30893,
          "diff": -0.7216803689735798
        }
      ],
      "code_sha256": "ec88f1aeabeb8a6936a9fd115ca8e444ee787fdf6e710d28594b7868620f69b5"
    },
    {
      "variant": "s89k600",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.89,
      "knee_bps": 600,
      "n": 2000,
      "mean_diff": 0.0012163935789555182,
      "se": 0.005739114430955674,
      "worst": [
        {
          "seed": 31637,
          "diff": -7.220913658015888
        },
        {
          "seed": 30134,
          "diff": -5.43626263346971
        },
        {
          "seed": 31440,
          "diff": -2.1321930783125254
        },
        {
          "seed": 31224,
          "diff": -2.0959586976933906
        },
        {
          "seed": 30547,
          "diff": -1.4420196362082152
        }
      ],
      "code_sha256": "665e9d4a7846180c33b71b4481841f768b87217ec31c53e8299b94e1c537550f"
    },
    {
      "variant": "s89k750",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.89,
      "knee_bps": 750,
      "n": 2000,
      "mean_diff": -0.008768507986982598,
      "se": 0.013808855944011161,
      "worst": [
        {
          "seed": 30975,
          "diff": -11.572952459472617
        },
        {
          "seed": 31637,
          "diff": -7.574172222839138
        },
        {
          "seed": 30134,
          "diff": -7.137418063975247
        },
        {
          "seed": 30501,
          "diff": -4.555216084857989
        },
        {
          "seed": 30210,
          "diff": -3.8933094727356092
        }
      ],
      "code_sha256": "bf8d74fa186fc5f272d024bd5fe5235d47d9133c7c082dc0426b7d5976b8bbb8"
    },
    {
      "variant": "s93k300",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.93,
      "knee_bps": 300,
      "n": 2000,
      "mean_diff": -0.1366043604223111,
      "se": 0.00884072142176116,
      "worst": [
        {
          "seed": 31764,
          "diff": -7.4991400598495375
        },
        {
          "seed": 31440,
          "diff": -2.238013157343289
        },
        {
          "seed": 30134,
          "diff": -1.8436990809046847
        },
        {
          "seed": 30874,
          "diff": -1.77125965141704
        },
        {
          "seed": 31396,
          "diff": -1.586491984918439
        }
      ],
      "code_sha256": "63259d96b8dfb850614c2990dfe01d5b2de98f08610dbf8de564d22f01eacf14"
    },
    {
      "variant": "s93k450",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.93,
      "knee_bps": 450,
      "n": 2000,
      "mean_diff": -0.03270678540272931,
      "se": 0.01040833337656826,
      "worst": [
        {
          "seed": 30975,
          "diff": -9.903139952275524
        },
        {
          "seed": 31637,
          "diff": -7.064858196861451
        },
        {
          "seed": 30134,
          "diff": -5.937889082366951
        },
        {
          "seed": 30210,
          "diff": -4.100906593317404
        },
        {
          "seed": 31586,
          "diff": -3.507778161363831
        }
      ],
      "code_sha256": "a0b113f34f0e9f077e55561b5a0041110acf8a6fdbb74a9f611724af5079d5f5"
    },
    {
      "variant": "s93k600",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.93,
      "knee_bps": 600,
      "n": 2000,
      "mean_diff": -0.005912497686093872,
      "se": 0.012552680508270232,
      "worst": [
        {
          "seed": 30975,
          "diff": -11.578185610672904
        },
        {
          "seed": 31637,
          "diff": -7.382995991622693
        },
        {
          "seed": 30134,
          "diff": -7.0600239969244285
        },
        {
          "seed": 30210,
          "diff": -3.8823736425147217
        },
        {
          "seed": 30744,
          "diff": -3.3368894805192895
        }
      ],
      "code_sha256": "9acd57974fb18815b9493bc6f92ce1c204932e6489e88e28e994f1e31fbd8c78"
    },
    {
      "variant": "s93k750",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.93,
      "knee_bps": 750,
      "n": 2000,
      "mean_diff": -0.03138700016934729,
      "se": 0.016630364906549813,
      "worst": [
        {
          "seed": 30975,
          "diff": -11.552617869798496
        },
        {
          "seed": 30872,
          "diff": -10.361195801235567
        },
        {
          "seed": 30347,
          "diff": -7.761972889790968
        },
        {
          "seed": 30134,
          "diff": -7.75781252375009
        },
        {
          "seed": 31637,
          "diff": -7.630486396422725
        }
      ],
      "code_sha256": "25c956a3e986c046d14726c9fdf6979c9b1b49eea2adb3226fc2974ec50a5ff6"
    },
    {
      "variant": "s97k300",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.97,
      "knee_bps": 300,
      "n": 2000,
      "mean_diff": -0.04631862124588028,
      "se": 0.013222064707092796,
      "worst": [
        {
          "seed": 30975,
          "diff": -9.712430478306032
        },
        {
          "seed": 31637,
          "diff": -7.386455601552711
        },
        {
          "seed": 30134,
          "diff": -7.307009051979662
        },
        {
          "seed": 31677,
          "diff": -6.157796937373405
        },
        {
          "seed": 30210,
          "diff": -3.8834658941732414
        }
      ],
      "code_sha256": "dc7ce88f7c31019d984cd2cb66b12f32c00375704e2ffc13e6da0161e2f86c9b"
    },
    {
      "variant": "s97k450",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.97,
      "knee_bps": 450,
      "n": 2000,
      "mean_diff": -0.025456544123277892,
      "se": 0.014168352428295448,
      "worst": [
        {
          "seed": 30975,
          "diff": -11.521330284360374
        },
        {
          "seed": 30134,
          "diff": -8.008325644203182
        },
        {
          "seed": 31637,
          "diff": -7.440288058187889
        },
        {
          "seed": 31677,
          "diff": -6.276184689878505
        },
        {
          "seed": 30501,
          "diff": -4.640567361983244
        }
      ],
      "code_sha256": "994c5ba351a757903f63ef648395f436276e936e4e2f5a97eceebcb2e16a1af2"
    },
    {
      "variant": "s97k600",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.97,
      "knee_bps": 600,
      "n": 2000,
      "mean_diff": -0.06304014930390067,
      "se": 0.029643607137570308,
      "worst": [
        {
          "seed": 31833,
          "diff": -48.98139600436497
        },
        {
          "seed": 30975,
          "diff": -11.544336716169028
        },
        {
          "seed": 30872,
          "diff": -8.9556964873899
        },
        {
          "seed": 30347,
          "diff": -7.761764096870081
        },
        {
          "seed": 30134,
          "diff": -7.760703889932188
        }
      ],
      "code_sha256": "734b4376660cb0934d877b45e5e3fe8eac310d42e13406b5143ef3ac5d87b477"
    },
    {
      "variant": "s97k750",
      "seeds": [
        30000,
        31999
      ],
      "slope": 0.97,
      "knee_bps": 750,
      "n": 2000,
      "mean_diff": -0.08932427011787859,
      "se": 0.03290153950422183,
      "worst": [
        {
          "seed": 31833,
          "diff": -51.137285564935894
        },
        {
          "seed": 31647,
          "diff": -13.412691342888706
        },
        {
          "seed": 31648,
          "diff": -12.765700742316312
        },
        {
          "seed": 30975,
          "diff": -11.537149251003825
        },
        {
          "seed": 30872,
          "diff": -11.358789114774368
        }
      ],
      "code_sha256": "f477fe95e4b3ac4dd921f399ce4d071833ce2d9c76a534db8cb56786798c1310"
    }
  ],
  "next": "Promote frozen candidate; independently replicate before a leaderboard submission.",
  "code": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {AMMStrategyBase} from \"./AMMStrategyBase.sol\";\nimport {TradeInfo} from \"./IAMMStrategy.sol\";\n\ncontract Strategy is AMMStrategyBase {\n    uint256 constant ELAPSED_CAP = 8;\n    uint256 constant SIGNAL_THRESHOLD = WAD / 650;\n    uint256 constant DIR_DECAY = 750000000000000000;\n    uint256 constant ACT_DECAY = 530000000000000000;\n    uint256 constant SIZE_DECAY = 530000000000000000;\n    uint256 constant TOX_DECAY = 910000000000000000;\n    uint256 constant SIGMA_DECAY = 690000000000000000;\n    uint256 constant LAMBDA_DECAY = 990000000000000000;\n    uint256 constant SIZE_BLEND_DECAY = 828000000000000000;\n    uint256 constant TOX_BLEND_DECAY = 51000000000000000;\n    uint256 constant ACT_BLEND_DECAY = 985000000000000000;\n    uint256 constant PHAT_ALPHA = 270000000000000000;\n    uint256 constant PHAT_ALPHA_RETAIL = 60000000000000000;\n    uint256 constant DIR_IMPACT_MULT = 4;\n    uint256 constant GATE_SIGMA_MULT = 7200000000000000000;\n    uint256 constant MIN_GATE = 30000000000000000;\n    uint256 constant TRADE_TOX_BOOST = 3500 * BPS;\n    uint256 constant STALE_ATTRACT_FRAC = 1050000000000000000;\n    uint256 constant RET_CAP = WAD / 35;\n    uint256 constant TOX_CAP = WAD / 5;\n    uint256 constant TRADE_RATIO_CAP = WAD / 5;\n    uint256 constant LAMBDA_CAP = 1820000000000000000;\n    uint256 constant STEP_COUNT_CAP = 64;\n    uint256 constant BASE_FEE = 4 * BPS;\n    uint256 constant SIGMA_COEF = 200000000000000000;\n    uint256 constant LAMBDA_COEF = 12 * BPS;\n    uint256 constant FLOW_SIZE_COEF = 4842 * BPS;\n    uint256 constant TOX_COEF = 300 * BPS;\n    uint256 constant TOX_QUAD_COEF = 15000 * BPS;\n    uint256 constant ACT_COEF = 91843 * BPS;\n    uint256 constant DIR_COEF = 20 * BPS;\n    uint256 constant DIR_TOX_COEF = 100 * BPS;\n    uint256 constant STALE_DIR_COEF = 6850 * BPS;\n    uint256 constant SIGMA_TOX_COEF = 500 * BPS;\n    uint256 constant TAIL_KNEE = 750 * BPS;\n    uint256 constant TAIL_SLOPE = 850000000000000000;\n\n    function afterInitialize(uint256 initialX, uint256 initialY) external override returns (uint256, uint256) {\n        slots[0] = BASE_FEE; slots[1] = BASE_FEE; slots[2] = 0; slots[3] = WAD; slots[4] = 0;\n        slots[5] = initialX > 0 ? wdiv(initialY, initialX) : 100 * WAD;\n        slots[6] = 950000000000000; slots[7] = 800000000000000000; slots[8] = 2000000000000000;\n        slots[9] = 0; slots[10] = 0;\n        return (BASE_FEE, BASE_FEE);\n    }\n\n    function afterSwap(TradeInfo calldata trade) external override returns (uint256, uint256) {\n        uint256 prevBidFee = slots[0]; uint256 prevAskFee = slots[1]; uint256 lastTs = slots[2];\n        uint256 dirState = slots[3]; uint256 actEma = slots[4]; uint256 pHat = slots[5];\n        uint256 sigmaHat = slots[6]; uint256 lambdaHat = slots[7]; uint256 sizeHat = slots[8];\n        uint256 toxEma = slots[9]; uint256 stepTradeCount = slots[10];\n\n        bool isNewStep = trade.timestamp > lastTs;\n        if (isNewStep) {\n            uint256 elapsedRaw = trade.timestamp - lastTs;\n            uint256 elapsed = elapsedRaw > ELAPSED_CAP ? ELAPSED_CAP : elapsedRaw;\n            dirState = _decayCentered(dirState, DIR_DECAY, elapsed);\n            actEma = wmul(actEma, _powWad(ACT_DECAY, elapsed));\n            sizeHat = wmul(sizeHat, _powWad(SIZE_DECAY, elapsed));\n            toxEma = wmul(toxEma, _powWad(TOX_DECAY, elapsed));\n            if (stepTradeCount > 0 && elapsedRaw > 0) {\n                uint256 lambdaInst = (stepTradeCount * WAD) / elapsedRaw;\n                if (lambdaInst > LAMBDA_CAP) lambdaInst = LAMBDA_CAP;\n                lambdaHat = wmul(lambdaHat, LAMBDA_DECAY) + wmul(lambdaInst, WAD - LAMBDA_DECAY);\n            }\n            stepTradeCount = 0;\n        }\n\n        bool firstInStep = stepTradeCount == 0;\n        uint256 spot = trade.reserveX > 0 ? wdiv(trade.reserveY, trade.reserveX) : pHat;\n        if (pHat == 0) pHat = spot;\n\n        uint256 feeUsed = trade.isBuy ? prevBidFee : prevAskFee;\n        uint256 gamma = feeUsed < WAD ? WAD - feeUsed : 0;\n        uint256 pImplied;\n        if (gamma == 0) { pImplied = spot; }\n        else { pImplied = trade.isBuy ? wmul(spot, gamma) : wdiv(spot, gamma); }\n\n        {\n            uint256 ret = pHat > 0 ? wdiv(absDiff(pImplied, pHat), pHat) : 0;\n            uint256 alpha = firstInStep ? PHAT_ALPHA : PHAT_ALPHA_RETAIL;\n            uint256 adaptiveGate = wmul(sigmaHat, GATE_SIGMA_MULT);\n            if (adaptiveGate < MIN_GATE) adaptiveGate = MIN_GATE;\n            if (ret <= adaptiveGate) { pHat = wmul(pHat, WAD - alpha) + wmul(pImplied, alpha); }\n            if (firstInStep) {\n                if (ret > RET_CAP) ret = RET_CAP;\n                sigmaHat = wmul(sigmaHat, SIGMA_DECAY) + wmul(ret, WAD - SIGMA_DECAY);\n            }\n        }\n\n        if(!firstInStep&&feeUsed>30*BPS&&gamma>0){uint256 nS=trade.isBuy?wdiv(wmul(spot,gamma),WAD-30*BPS):wdiv(wmul(spot,WAD-30*BPS),gamma);pHat=wmul(pHat,9*WAD/10)+wmul(nS,WAD/10);}\n\n        uint256 tradeRatio = trade.reserveY > 0 ? wdiv(trade.amountY, trade.reserveY) : 0;\n        if (tradeRatio > TRADE_RATIO_CAP) tradeRatio = TRADE_RATIO_CAP;\n\n        if (tradeRatio > SIGNAL_THRESHOLD) {\n            uint256 push = tradeRatio * DIR_IMPACT_MULT;\n            if (push > WAD / 4) push = WAD / 4;\n            if (trade.isBuy) {\n                dirState = dirState + push;\n                if (dirState > 2 * WAD) dirState = 2 * WAD;\n            } else {\n                dirState = dirState > push ? dirState - push : 0;\n            }\n            actEma = wmul(actEma, ACT_BLEND_DECAY) + wmul(tradeRatio, WAD - ACT_BLEND_DECAY);\n            sizeHat = wmul(sizeHat, SIZE_BLEND_DECAY) + wmul(tradeRatio, WAD - SIZE_BLEND_DECAY);\n            if (sizeHat > WAD) sizeHat = WAD;\n        }\n\n        uint256 tox = pHat > 0 ? wdiv(absDiff(spot, pHat), pHat) : 0;\n        if (tox > TOX_CAP) tox = TOX_CAP;\n        toxEma = wmul(toxEma, TOX_BLEND_DECAY) + wmul(tox, WAD - TOX_BLEND_DECAY);\n        uint256 toxSignal = toxEma;\n\n        stepTradeCount = stepTradeCount + 1;\n        if (stepTradeCount > STEP_COUNT_CAP) stepTradeCount = STEP_COUNT_CAP;\n\n        uint256 flowSize = wmul(lambdaHat, sizeHat);\n        uint256 fBase = BASE_FEE + wmul(SIGMA_COEF, sigmaHat) + wmul(LAMBDA_COEF, lambdaHat) + wmul(FLOW_SIZE_COEF, flowSize);\n        uint256 fMid = fBase + wmul(TOX_COEF, toxSignal) + wmul(TOX_QUAD_COEF, wmul(toxSignal, toxSignal)) + wmul(ACT_COEF, actEma);\n        fMid = fMid + wmul(SIGMA_TOX_COEF, wmul(sigmaHat, toxSignal));\n\n        uint256 dirDev; bool sellPressure;\n        if (dirState >= WAD) { dirDev = dirState - WAD; sellPressure = true; }\n        else { dirDev = WAD - dirState; sellPressure = false; }\n\n        uint256 skew = wmul(DIR_COEF, dirDev) + wmul(DIR_TOX_COEF, wmul(dirDev, toxSignal));\n        uint256 bidFee; uint256 askFee;\n        if (sellPressure) {\n            bidFee = fMid + skew;\n            askFee = fMid > skew ? fMid - skew : 0;\n        } else {\n            askFee = fMid + skew;\n            bidFee = fMid > skew ? fMid - skew : 0;\n        }\n\n        {\n            uint256 staleShift = wmul(STALE_DIR_COEF, toxSignal);\n            uint256 attractShift = wmul(staleShift, STALE_ATTRACT_FRAC);\n            if (spot >= pHat) {\n                bidFee = bidFee + staleShift;\n                askFee = askFee > attractShift ? askFee - attractShift : 0;\n            } else {\n                askFee = askFee + staleShift;\n                bidFee = bidFee > attractShift ? bidFee - attractShift : 0;\n            }\n        }\n\n        {\n            bool tradeAligned = (trade.isBuy && spot >= pHat) || (!trade.isBuy && spot < pHat);\n            if (tradeAligned) {\n                uint256 tradeBoost = wmul(TRADE_TOX_BOOST, tradeRatio);\n                if (trade.isBuy) { bidFee = bidFee + tradeBoost; }\n                else { askFee = askFee + tradeBoost; }\n            }\n        }\n\n        bidFee = clampFee(_compressTail(bidFee));\n        askFee = clampFee(_compressTail(askFee));\n\n        slots[0] = bidFee; slots[1] = askFee; slots[2] = trade.timestamp;\n        slots[3] = dirState; slots[4] = actEma; slots[5] = pHat;\n        slots[6] = sigmaHat; slots[7] = lambdaHat; slots[8] = sizeHat;\n        slots[9] = toxEma; slots[10] = stepTradeCount;\n\n        return (bidFee, askFee);\n    }\n\n    function _compressTail(uint256 fee) internal pure returns (uint256) {\n        if (fee <= TAIL_KNEE) return fee;\n        return TAIL_KNEE + wmul(fee - TAIL_KNEE, TAIL_SLOPE);\n    }\n\n    function _powWad(uint256 factor, uint256 exp) internal pure returns (uint256 result) {\n        result = WAD;\n        while (exp > 0) {\n            if (exp & 1 == 1) result = wmul(result, factor);\n            factor = wmul(factor, factor);\n            exp >>= 1;\n        }\n    }\n\n    function _decayCentered(uint256 centered, uint256 decayFactor, uint256 elapsed) internal pure returns (uint256) {\n        uint256 mul = _powWad(decayFactor, elapsed);\n        if (centered >= WAD) { return WAD + wmul(centered - WAD, mul); }\n        uint256 below = wmul(WAD - centered, mul);\n        return below < WAD ? WAD - below : 0;\n    }\n\n    function getName() external pure override returns (string memory) { return \"no_cubic\"; }\n}\n",
  "code_sha256": "11eb2a5bbf70351d3560e029a230f31ab6bc91b53ed39415874a54324e4ec79c",
  "delta": {
    "reference": "NP",
    "edits": [
      "TAIL_KNEE: 600 -> 750 bps",
      "Replace TAIL_SLOPE_PROTECT=0.93 and TAIL_SLOPE_ATTRACT=0.85 with TAIL_SLOPE=0.85",
      "Remove sellPressure branch at final compression; apply shared _compressTail to bid and ask.",
      "Remove slope argument from compression helper; read shared constant instead."
    ],
    "other_logic": "Unchanged, including the requester-specified NP price blend. No new loops or storage; slots 0..10 only. Inherited bounded elapsed-power loop retained from CH."
  },
  "score": {
    "seed_start": 0,
    "n": 1000,
    "mean_edge": 526.04445597143,
    "se": 2.791406977853335
  },
  "paired": {
    "reference": "NP",
    "seed_start": 800000,
    "n_covered": 2000,
    "chunks": [
      {
        "seed_start": 800000,
        "n": 500
      },
      {
        "seed_start": 800500,
        "n": 500
      },
      {
        "seed_start": 801000,
        "n": 500
      },
      {
        "seed_start": 801500,
        "n": 500
      }
    ],
    "n": 2000,
    "mean_diff": 0.016400727364654245,
    "se": 0.00719329426514523,
    "worst": [
      {
        "seed": 800043,
        "diff": -4.363336502510833
      },
      {
        "seed": 800915,
        "diff": -4.094636795204451
      },
      {
        "seed": 801417,
        "diff": -4.016425897219506
      },
      {
        "seed": 800581,
        "diff": -3.7453237998549866
      },
      {
        "seed": 801425,
        "diff": -2.7054170564164224
      }
    ]
  },
  "seconds_per_simulation": 0.05085178284732446,
  "validate_ok": true,
  "blocked": null,
  "citations": [
    {
      "url": "https://raw.githubusercontent.com/ChengHua926/amm-challenge/d34a5199c59a4c44d5336a25f1436b4ae1f21104/contracts/src/Strategy.sol",
      "supports": "CH source and original tail constants; NP patch supplied in the task"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/match.py",
      "supports": "Parameter draws in size, rate, sigma order; same-seed paired configuration"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/competition/config.py",
      "supports": "Canonical simulation parameters and randomization ranges"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/evm/strategy.rs",
      "supports": "250000 gas per initialization/swap enforced by Rust engine"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/simulation/engine.rs",
      "supports": "Price seed=seed, retail seed=seed+1"
    },
    {
      "url": "https://raw.githubusercontent.com/jiayaoqijia/amm-challenge-yq/main/README.md",
      "supports": "Public write-up describes asymmetric tail compression; contextual only, its reported scores were not used as measurements here"
    }
  ],
  "measurement": {
    "provenance": "All numerical results generated locally with the pinned simulator; no external scores substituted.",
    "reference": "Each strategy separately competes against VanillaStrategy at fixed 30 bps; paired difference is candidate edge minus NP edge for the same seed, not a direct candidate-vs-NP pool match.",
    "tuning_seed_start": 30000,
    "tuning_n_per_cell": 2000,
    "tuning_seed_end_inclusive": 31999,
    "selection": "Highest paired mean across all 16 cells, before fresh evaluation",
    "frozen_variant": "s85k750",
    "holdout_evaluations": 1,
    "forbidden_seeds_used": false,
    "uncertainty": "Sample standard deviation with ddof=1 divided by sqrt(n). Score SE is across individual simulation edges; paired SE is across per-seed differences.",
    "workers": 8,
    "n_steps": 10000,
    "total_simulations": 43000,
    "total_batch_seconds": 2186.626662434952,
    "timing_scope": "Wall time inside run_batch calls plus chunk bookkeeping, excluding compilation/setup",
    "reproduction": {
      "CH": {
        "seed_start": 0,
        "n": 1000,
        "mean_edge": 525.5258821780834,
        "se": 2.7894264590251843,
        "code_sha256": "6dd68f77a70900319460215374143dbd5d924198450a46d9f5f91f6b1e3d35c3"
      },
      "NP": {
        "seed_start": 0,
        "n": 1000,
        "mean_edge": 526.0337302497852,
        "se": 2.7912248204542776,
        "code_sha256": "e93f6ea4b83679b7d7122532fde450fbf89a7f6e000fa79b91d0c194f88ae3f3"
      }
    }
  },
  "promotion": {
    "promoted": true,
    "criterion": "fresh mean_diff > 2 * fresh se",
    "reference_code_sha256": "e93f6ea4b83679b7d7122532fde450fbf89a7f6e000fa79b91d0c194f88ae3f3",
    "recommended_code_sha256": "11eb2a5bbf70351d3560e029a230f31ab6bc91b53ed39415874a54324e4ec79c",
    "ranked_promotions": [
      {
        "rank": 1,
        "variant": "s85k750",
        "code_sha256": "11eb2a5bbf70351d3560e029a230f31ab6bc91b53ed39415874a54324e4ec79c",
        "mean_diff": 0.016400727364654245,
        "se": 0.00719329426514523
      }
    ]
  },
  "validation": {
    "command": "amm-match validate scratch/frozen.sol",
    "output": "Validating strategy...\nCompiling strategy...\nStrategy 'no_cubic' validated successfully!",
    "setup": "Requested scratch/setup.sh ran once successfully; starter validated.",
    "limitations": "No claim of reaching first place. Fresh holdout was measured only once; grid selection uses tuning seeds only. Starter comparison reuses the already frozen candidate fresh-seed edges; it did not influence selection or promotion."
  },
  "paired_starter": {
    "reference": "StarterStrategy (fixed 50 bps)",
    "seed_start": 800000,
    "n": 2000,
    "mean_diff": 155.33204592378831,
    "se": 0.8959320856280012,
    "worst": [
      {
        "seed": 800045,
        "diff": 71.39512105808362
      },
      {
        "seed": 801401,
        "diff": 76.53136454435653
      },
      {
        "seed": 800923,
        "diff": 76.58738686198382
      },
      {
        "seed": 801990,
        "diff": 81.32196926107446
      },
      {
        "seed": 800619,
        "diff": 81.63728872310594
      }
    ],
    "reference_code_sha256": "8f2cea337f6736105f58c6758da6c3ebf002951d34492bcd5b7101bef2d1e7f3",
    "reference_mean_edge": 366.7691936940682,
    "candidate_reused": true
  }
}
