{
  "delta": "NP2 unchanged except: before the existing pHat block set classA=firstInStep && _classAccepted(pHat,pImplied,sigmaHat). Pure helper returns ret<=max(wmul(sigmaHat,GATE_SIGMA_MULT),MIN_GATE), using NP2 ret and pre-update sigmaHat. Replace STALE_DIR_COEF, STALE_ATTRACT_FRAC and TRADE_TOX_BOOST at their three fee-use sites with classA ? *_A : *_R; six constants and final values are in tuning.selected_wad. No extra storage or oracle information. One coordinate pass in order dir_A,dir_R,attract_A,attract_R,boost_A,boost_R; fixed NP2-relative multipliers [0.5,0.75,1,1.25,1.5,2]; select highest mean gain on seeds 10000..10159, retaining previously selected coordinates. Frozen before the sole confirmation on 2750000..2751999.",
  "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 PHAT_ALPHA_SAME = 120000000000000000;\n    uint256 constant REVERT_U = 0;\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 = 600 * BPS;\n    uint256 constant TAIL_SLOPE_PROTECT = 930000000000000000;\n    uint256 constant TAIL_SLOPE_ATTRACT = 850000000000000000;\n\n    uint256 constant STALE_DIR_COEF_A = 685000000000000000;\n\n    uint256 constant STALE_DIR_COEF_R = 685000000000000000;\n\n    uint256 constant STALE_ATTRACT_FRAC_A = 1050000000000000000;\n\n    uint256 constant STALE_ATTRACT_FRAC_R = 1050000000000000000;\n\n    uint256 constant TRADE_TOX_BOOST_A = 437500000000000000;\n\n    uint256 constant TRADE_TOX_BOOST_R = 262500000000000000;\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; slots[11] = 0; slots[12] = 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        bool classA = firstInStep && _classAccepted(pHat, pImplied, sigmaHat);\n        {\n            uint256 ret = pHat > 0 ? wdiv(absDiff(pImplied, pHat), pHat) : 0;\n            uint256 alpha = firstInStep ? PHAT_ALPHA : PHAT_ALPHA_RETAIL;\n            uint256 prePhat = pHat;\n            bool secondPrint = !firstInStep && stepTradeCount == 1;\n            bool sameDir = false; bool oppDir = false;\n            if (secondPrint) {\n                bool up2 = pImplied >= pHat;\n                uint256 d1 = slots[12];\n                if (d1 != 0) { sameDir = (d1 == 1) == up2; oppDir = !sameDir; }\n                if (sameDir) alpha = PHAT_ALPHA_SAME;\n            }\n            if (firstInStep) { slots[11] = pHat; slots[12] = pImplied >= pHat ? 1 : 2; }\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 (oppDir && REVERT_U > 0) {\n                uint256 pre = slots[11];\n                if (pre > pHat) pHat = pHat + wmul(pre - pHat, REVERT_U);\n                else pHat = pHat - wmul(pHat - pre, REVERT_U);\n            }\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        // Interior retail routing equalizes fee-adjusted marginal prices.\n        // Subsequent trades in a step cannot be the initial arbitrage trade.\n        if (!firstInStep && feeUsed > 30 * BPS && gamma > 0) {\n            uint256 normalSpot = trade.isBuy\n                ? wdiv(wmul(spot, gamma), WAD - 30 * BPS)\n                : wdiv(wmul(spot, WAD - 30 * BPS), gamma);\n            pHat = wmul(pHat, 90 * WAD / 100) + wmul(normalSpot, 10 * WAD / 100);\n        }\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((classA ? STALE_DIR_COEF_A : STALE_DIR_COEF_R), toxSignal);\n            uint256 attractShift = wmul(staleShift, (classA ? STALE_ATTRACT_FRAC_A : STALE_ATTRACT_FRAC_R));\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((classA ? TRADE_TOX_BOOST_A : TRADE_TOX_BOOST_R), tradeRatio);\n                if (trade.isBuy) { bidFee = bidFee + tradeBoost; }\n                else { askFee = askFee + tradeBoost; }\n            }\n        }\n\n        if (sellPressure) {\n            bidFee = clampFee(_compressTailWithSlope(bidFee, TAIL_SLOPE_PROTECT));\n            askFee = clampFee(_compressTailWithSlope(askFee, TAIL_SLOPE_ATTRACT));\n        } else {\n            askFee = clampFee(_compressTailWithSlope(askFee, TAIL_SLOPE_PROTECT));\n            bidFee = clampFee(_compressTailWithSlope(bidFee, TAIL_SLOPE_ATTRACT));\n        }\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 _classAccepted(uint256 pHat, uint256 pImplied, uint256 sigmaHat) internal pure returns (bool) {\n        uint256 ret = pHat > 0 ? wdiv(absDiff(pImplied, pHat), pHat) : 0;\n        uint256 gate = wmul(sigmaHat, GATE_SIGMA_MULT);\n        if (gate < MIN_GATE) gate = MIN_GATE;\n        return ret <= gate;\n    }\n\n    function _compressTailWithSlope(uint256 fee, uint256 slope) internal pure returns (uint256) {\n        if (fee <= TAIL_KNEE) return fee;\n        return TAIL_KNEE + wmul(fee - TAIL_KNEE, 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",
  "sha256": "e19df23cdba8bc9fab55bafcab1eabf0a45f5ab4f1aa0490ea332ecd8238a01f",
  "tuning": {
    "seed_start": 10000,
    "seed_end_inclusive": 10159,
    "n_per_point": 160,
    "multipliers": [
      0.5,
      0.75,
      1,
      1.25,
      1.5,
      2
    ],
    "coordinate_order": [
      "STALE_DIR_COEF_A",
      "STALE_DIR_COEF_R",
      "STALE_ATTRACT_FRAC_A",
      "STALE_ATTRACT_FRAC_R",
      "TRADE_TOX_BOOST_A",
      "TRADE_TOX_BOOST_R"
    ],
    "selected_wad": {
      "STALE_DIR_COEF_A": "685000000000000000",
      "STALE_DIR_COEF_R": "685000000000000000",
      "STALE_ATTRACT_FRAC_A": "1050000000000000000",
      "STALE_ATTRACT_FRAC_R": "1050000000000000000",
      "TRADE_TOX_BOOST_A": "437500000000000000",
      "TRADE_TOX_BOOST_R": "262500000000000000"
    },
    "trials": [
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 0.5,
        "values": [
          342500000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -32.287381231781836,
        "se": 0.48869846329841454,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 0.75,
        "values": [
          513750000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -10.232073256051795,
        "se": 0.18808874210623872,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": 0.0,
        "se": 0.0,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 1.25,
        "values": [
          856250000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -33.06165580763295,
        "se": 2.154081637858192,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 1.5,
        "values": [
          1027500000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -121.16440729751189,
        "se": 4.211768808219928,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_A",
        "multiplier": 2.0,
        "values": [
          1370000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -253.18327002480788,
        "se": 4.005883626422367,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 0.5,
        "values": [
          685000000000000000,
          342500000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -35.889341326192564,
        "se": 0.5922622123517256,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 0.75,
        "values": [
          685000000000000000,
          513750000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -11.326871533747617,
        "se": 0.1913591698218392,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": 0.0,
        "se": 0.0,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 1.25,
        "values": [
          685000000000000000,
          856250000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -9.849909394921118,
        "se": 0.4637206189489198,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 1.5,
        "values": [
          685000000000000000,
          1027500000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -36.80336508291663,
        "se": 1.1754931574916154,
        "n": 160
      },
      {
        "coordinate": "STALE_DIR_COEF_R",
        "multiplier": 2.0,
        "values": [
          685000000000000000,
          1370000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -101.07085065935794,
        "se": 2.460789464988301,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 0.5,
        "values": [
          685000000000000000,
          685000000000000000,
          525000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -4.56043688784306,
        "se": 0.09525908134995584,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 0.75,
        "values": [
          685000000000000000,
          685000000000000000,
          787500000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -1.0579540089464445,
        "se": 0.05101718748359405,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": 0.0,
        "se": 0.0,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 1.25,
        "values": [
          685000000000000000,
          685000000000000000,
          1312500000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.10970532294968223,
        "se": 0.03635901549144755,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 1.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1575000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.7060755967621446,
        "se": 0.048156166390226296,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_A",
        "multiplier": 2.0,
        "values": [
          685000000000000000,
          685000000000000000,
          2100000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -1.8401858516552654,
        "se": 0.05713260565875653,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 0.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          525000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -2.189990435311797,
        "se": 0.07650385905701537,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 0.75,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          787500000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.3856490779237536,
        "se": 0.04385934896789938,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": 0.0,
        "se": 0.0,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 1.25,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1312500000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.23911383159124638,
        "se": 0.024869903586267512,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 1.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1575000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.5764325478436412,
        "se": 0.030607536200566304,
        "n": 160
      },
      {
        "coordinate": "STALE_ATTRACT_FRAC_R",
        "multiplier": 2.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          2100000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": -1.2385327959352186,
        "se": 0.041527819179967146,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 0.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          175000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.22483116211298046,
        "se": 0.03746479017006029,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 0.75,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          262500000000000000,
          350000000000000000
        ],
        "mean_diff": -0.07104532476427608,
        "se": 0.019143659989960832,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          350000000000000000,
          350000000000000000
        ],
        "mean_diff": 0.0,
        "se": 0.0,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 1.25,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          350000000000000000
        ],
        "mean_diff": 0.004612530032681761,
        "se": 0.027842199262501817,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 1.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          525000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.14448416207774742,
        "se": 0.03679386750285994,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_A",
        "multiplier": 2.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          700000000000000000,
          350000000000000000
        ],
        "mean_diff": -0.7312218657117541,
        "se": 0.05071695022926986,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 0.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          175000000000000000
        ],
        "mean_diff": 0.021691040189125488,
        "se": 0.02969656108746086,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 0.75,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          262500000000000000
        ],
        "mean_diff": 0.02211821089572119,
        "se": 0.024317054945478637,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 1.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          350000000000000000
        ],
        "mean_diff": 0.004612530032681761,
        "se": 0.027842199262501817,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 1.25,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          437500000000000000
        ],
        "mean_diff": -0.07859871986445306,
        "se": 0.029827662558042194,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 1.5,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          525000000000000000
        ],
        "mean_diff": -0.16166773964937953,
        "se": 0.03550125037250512,
        "n": 160
      },
      {
        "coordinate": "TRADE_TOX_BOOST_R",
        "multiplier": 2.0,
        "values": [
          685000000000000000,
          685000000000000000,
          1050000000000000000,
          1050000000000000000,
          437500000000000000,
          700000000000000000
        ],
        "mean_diff": -0.4422438631938146,
        "se": 0.042662826120339364,
        "n": 160
      }
    ],
    "method": "One coordinate pass; candidates and NP2 each independently paired against compiled VanillaStrategy; NP2 reused for matched-seed subtraction. Select maximum mean, first multiplier on exact tie. Multipliers are relative to original NP2, not the evolving coefficient. All trials hold the previously selected coordinates fixed.",
    "reproduction": {
      "simulator_commit": "6b6921f8d463314aa7c96234e1be25a25245f704",
      "compiler": "SolidityCompiler, solc 0.8.24, optimizer runs=200, viaIR=true, evmVersion=paris",
      "draws": "For each seed s, rng=numpy.random.default_rng(s); size=rng.uniform(19,21); rate=rng.uniform(.6,1); sigma=rng.uniform(.000882,.001008); build_config(seed=s,gbm_sigma=sigma,retail_arrival_rate=rate,retail_mean_size=size). All other fields use pinned build_config defaults (10000 steps).",
      "batch": "amm_sim_rs.run_batch(candidate_creation_bytecode,vanilla_creation_bytecode,configs,8); 20 configs/call. Repeat separately with NP2; use edges[submission]. Never candidate vs NP2 in same market.",
      "estimator": "d_s=candidate_edge_s-NP2_edge_s; mean_diff=mean(d_s); se=std(d_s,ddof=1)/sqrt(n); worst lists ten most negative seed differences.",
      "baseline_sha256": "51f1c1a9d4999ee460eb8bbc66880da8074b173399a4f5d71f96671482e18ac0"
    }
  },
  "paired": {
    "reference": "NP2",
    "seed_start": 2750000,
    "seed_end_inclusive": 2751999,
    "n": 2000,
    "mean_diff": -0.01655031245188249,
    "se": 0.007082815508517089,
    "worst": [
      {
        "seed": 2750843,
        "diff": -3.075189525311316,
        "candidate_edge": 669.4874615010721,
        "np2_edge": 672.5626510263834
      },
      {
        "seed": 2750969,
        "diff": -1.8248990900520994,
        "candidate_edge": 476.5000210314838,
        "np2_edge": 478.3249201215359
      },
      {
        "seed": 2750429,
        "diff": -1.5917866044969173,
        "candidate_edge": 502.6915833863737,
        "np2_edge": 504.2833699908706
      },
      {
        "seed": 2750110,
        "diff": -1.2318777812519102,
        "candidate_edge": 635.5013908433888,
        "np2_edge": 636.7332686246407
      },
      {
        "seed": 2751731,
        "diff": -1.2162402413453037,
        "candidate_edge": 510.146809580239,
        "np2_edge": 511.3630498215843
      },
      {
        "seed": 2751207,
        "diff": -1.203964138918252,
        "candidate_edge": 488.15352556568257,
        "np2_edge": 489.3574897046008
      },
      {
        "seed": 2750731,
        "diff": -1.1933353386218073,
        "candidate_edge": 479.7876461083225,
        "np2_edge": 480.9809814469443
      },
      {
        "seed": 2750502,
        "diff": -1.1612902029883116,
        "candidate_edge": 588.8635527997939,
        "np2_edge": 590.0248430027822
      },
      {
        "seed": 2751933,
        "diff": -1.0985694183048054,
        "candidate_edge": 592.7460783083441,
        "np2_edge": 593.8446477266489
      },
      {
        "seed": 2751856,
        "diff": -1.0808178050974675,
        "candidate_edge": 462.17414530171555,
        "np2_edge": 463.254963106813
      }
    ]
  },
  "split": {
    "arb": null,
    "retail": null,
    "reason": "Not measured: pinned Rust result exposes combined edges and separate volumes, not separate arb/retail edges."
  },
  "fee_stats": {
    "bid": 0.0036488841780154056,
    "ask": 0.0035510072313061753,
    "units": "fraction (multiply by 10000 for bps)",
    "basis": "Mean of each seed average_fees[submission]; each seed averages end-of-step bid/ask quotes over 10000 steps. Confirmation seeds only.",
    "np2": {
      "bid": 0.0036372208828281665,
      "ask": 0.0035390457956987476
    }
  },
  "blocked": null,
  "next": "Keep NP2; do not promote this candidate. Fresh confirmation regressed by -0.01655031 edge units (SE 0.00708282). The four stale-direction/attraction coordinates retained NP2 values; the class-specific boost tuning gain did not transfer. Investigate a different mechanism without reusing this confirmation block for tuning.",
  "checks": {
    "setup": "Passed supplied item setup script once; StarterStrategy validation passed.",
    "ch_seed_0_999_mean": 525.5258821780834,
    "ch_expected": 525.525882178,
    "np2_seed_0_999_mean": 526.1155722459862,
    "identity": "20 tuning seeds: equal class coefficients reproduced NP2 edges to <1e-8.",
    "compile_repair": "Initial inline class assignment hit a solc Yul stack-depth error. Moving the equivalent class calculation into a pure helper fixed it; cached NP2 and CH reference simulations were reused.",
    "validation": {
      "command": "amm-match validate scratch/frozen.sol",
      "passed": true,
      "stdout": "Validating strategy...\nCompiling strategy...\nStrategy 'no_cubic' validated successfully!\n"
    },
    "final_audit": {
      "passed": true,
      "checks": [
        "Exact confirmation seed alignment: 2750000..2751999 for both strategies",
        "Mean and SE independently recomputed with Python statistics",
        "All 36 multiplier points and greedy selections verified",
        "JSON code round-trip matches frozen source and SHA-256",
        "Required JSON files parse and bundle size is below 8 MiB"
      ]
    }
  },
  "notes": "All performance figures are locally computed simulations, not externally sourced leaderboard claims. No missing required input; no data fabricated. Optional edge split was not measured. Confirmation block used only after all six coordinates were frozen, once per strategy."
}
