{
  "delta": "Reconstruct NP2 from TWO plus NP's Interior retail routing block; baseline SHA256 51f1c1a9d4999ee460eb8bbc66880da8074b173399a4f5d71f96671482e18ac0. At the existing pHat gate set slots[13] = firstInStep && ret <= adaptiveGate ? 1 : 0 (ret computed before updating pHat). Select coefficients using that flag. Chosen STALE_DIR_COEF A/R=6850*BPS, STALE_ATTRACT_FRAC A/R=1050000000000000000 (unchanged); TRADE_TOX_BOOST A=4375*BPS, R=2625*BPS. Remove only unused prePhat/oppDir and the REVERT_U=0 branch to avoid a solc stack error. No changes to fair-price updates, gating, decay, routing, tail compression, or other fee terms. Slot13 overwritten on every print; no new initialization required. Neutral multipliers exactly matched NP2 on 128 tuning seeds.",
  "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    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        {\n            uint256 ret = pHat > 0 ? wdiv(absDiff(pImplied, pHat), pHat) : 0;\n            uint256 alpha = firstInStep ? PHAT_ALPHA : PHAT_ALPHA_RETAIL;\n            bool secondPrint = !firstInStep && stepTradeCount == 1;\n            bool sameDir = false;\n            if (secondPrint) {\n                bool up2 = pImplied >= pHat;\n                uint256 d1 = slots[12];\n                if (d1 != 0) { sameDir = (d1 == 1) == up2; }\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            slots[13] = firstInStep && ret <= adaptiveGate ? 1 : 0;\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        // 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((slots[13] == 1 ? 685000000000000000 : 685000000000000000), toxSignal);\n            uint256 attractShift = wmul(staleShift, (slots[13] == 1 ? 1050000000000000000 : 1050000000000000000));\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((slots[13] == 1 ? 437500000000000000 : 262500000000000000), 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 _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": "9d926bbed74eae31eee7bb42a329b01c346d00f63e0c9e154b2589b7f1277928",
  "tuning": {
    "seed_start": 10000,
    "n": 128,
    "trials": [
      {
        "coordinate": 0,
        "multipliers": [
          0.5,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -32.318222771740004,
        "se": 0.5466007046036484,
        "worst": -47.63282684078399
      },
      {
        "coordinate": 0,
        "multipliers": [
          0.75,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -10.235983411667426,
        "se": 0.20573122470412727,
        "worst": -16.53240978800352
      },
      {
        "coordinate": 0,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0,
        "se": 0.0,
        "worst": 0.0
      },
      {
        "coordinate": 0,
        "multipliers": [
          1.25,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -34.8162275091032,
        "se": 2.589208612669385,
        "worst": -187.09413169779123
      },
      {
        "coordinate": 0,
        "multipliers": [
          1.5,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -123.07482138907515,
        "se": 4.9462708318972455,
        "worst": -312.9452137963668
      },
      {
        "coordinate": 0,
        "multipliers": [
          2.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -255.83994426008863,
        "se": 4.5744478463914415,
        "worst": -422.6436622850229
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          0.5,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -35.99810001639074,
        "se": 0.6717338134332226,
        "worst": -56.087688752498025
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          0.75,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -11.36051790144494,
        "se": 0.21128951841121288,
        "worst": -16.928302712985214
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0,
        "se": 0.0,
        "worst": 0.0
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          1.25,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -9.860738277402547,
        "se": 0.551742726486825,
        "worst": -57.68283849744512
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          1.5,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -37.07580634226899,
        "se": 1.3794836408948707,
        "worst": -106.7223612011154
      },
      {
        "coordinate": 1,
        "multipliers": [
          1.0,
          2.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -100.96012666181176,
        "se": 2.8040420571508173,
        "worst": -195.52233815855732
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          0.5,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -4.5613169013298505,
        "se": 0.1095789244774336,
        "worst": -10.48613656246539
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          0.75,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -1.0787246389021274,
        "se": 0.060038631194878095,
        "worst": -6.4196914106530585
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0,
        "se": 0.0,
        "worst": 0.0
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          1.25,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.11186987460924547,
        "se": 0.04282119267624528,
        "worst": -1.0127142147690051
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          1.5,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.7220284883224215,
        "se": 0.05710206017996193,
        "worst": -4.796686962465515
      },
      {
        "coordinate": 2,
        "multipliers": [
          1.0,
          1.0,
          2.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -1.858460668852957,
        "se": 0.06767325502375912,
        "worst": -5.33071796550621
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          0.5,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -2.2364536117311697,
        "se": 0.08950903528477706,
        "worst": -6.401777586600133
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          0.75,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.39467008507567947,
        "se": 0.05290439136213134,
        "worst": -5.473266401807109
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0,
        "se": 0.0,
        "worst": 0.0
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.25,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.25376217712240123,
        "se": 0.02895485637757011,
        "worst": -1.672390635554052
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.5,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.5816726847108336,
        "se": 0.034479271151049234,
        "worst": -1.8056449726967685
      },
      {
        "coordinate": 3,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          2.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -1.2548865386249326,
        "se": 0.04743592840048817,
        "worst": -3.3406667517859887
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          0.5,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.21502997373422206,
        "se": 0.04457882628613678,
        "worst": -1.3901903713654065
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          0.75,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.06713935952268857,
        "se": 0.022170766029094995,
        "worst": -0.724397241563679
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.0,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0,
        "se": 0.0,
        "worst": 0.0
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0017378371334864084,
        "se": 0.03258084341293763,
        "worst": -0.7912333766065558
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.5,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.12437730626720711,
        "se": 0.04215605981180278,
        "worst": -1.1870592855697168
      },
      {
        "coordinate": 4,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          2.0,
          1.0
        ],
        "n": 128,
        "mean_diff": -0.7113798522181858,
        "se": 0.0571264502496089,
        "worst": -2.7195328080592844
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          0.5
        ],
        "n": 128,
        "mean_diff": 0.002884114211013422,
        "se": 0.02944807460369918,
        "worst": -1.0651422758254512
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          0.75
        ],
        "n": 128,
        "mean_diff": 0.03136487865423243,
        "se": 0.025028680042048432,
        "worst": -0.7450643963704806
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          1.0
        ],
        "n": 128,
        "mean_diff": 0.0017378371334864084,
        "se": 0.03258084341293763,
        "worst": -0.7912333766065558
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          1.25
        ],
        "n": 128,
        "mean_diff": -0.08479167389780695,
        "se": 0.035028968543113444,
        "worst": -1.5988929050331535
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          1.5
        ],
        "n": 128,
        "mean_diff": -0.16296543903355998,
        "se": 0.04146296983614514,
        "worst": -2.0377151889788365
      },
      {
        "coordinate": 5,
        "multipliers": [
          1.0,
          1.0,
          1.0,
          1.0,
          1.25,
          2.0
        ],
        "n": 128,
        "mean_diff": -0.4227669942717358,
        "se": 0.048834165167535686,
        "worst": -1.5654770294047466
      }
    ],
    "selected": [
      1.0,
      1.0,
      1.0,
      1.0,
      1.25,
      0.75
    ],
    "ch_mean": 525.5258821780834,
    "coordinates": [
      "STALE_DIR_COEF_A",
      "STALE_DIR_COEF_R",
      "STALE_ATTRACT_FRAC_A",
      "STALE_ATTRACT_FRAC_R",
      "TRADE_TOX_BOOST_A",
      "TRADE_TOX_BOOST_R"
    ],
    "grid": [
      0.5,
      0.75,
      1,
      1.25,
      1.5,
      2
    ],
    "selection": "One coordinate pass in listed order; maximize mean paired edge difference; carry selected values into subsequent coordinates. 36 points, 128 seeds each, all seeds 10000..10127; no confirmation-driven retuning.",
    "neutral_equivalence": {
      "n": 128,
      "mean_diff": 0.0,
      "se": 0.0,
      "worst": 0.0
    },
    "calibration": {
      "strategy": "CH",
      "sha256": "6dd68f77a70900319460215374143dbd5d924198450a46d9f5f91f6b1e3d35c3",
      "seed_start": 0,
      "n": 1000,
      "mean_edge": 525.5258821780834
    }
  },
  "paired": {
    "n": 2000,
    "mean_diff": -0.002592032365438854,
    "se": 0.008785656469576335,
    "worst": -3.815097483283921,
    "seed_start": 2740000,
    "reference_mean": 524.9482101568426,
    "candidate_mean": 524.945618124477,
    "worst_seeds": [
      {
        "seed": 2740049,
        "diff": -3.815097483283921
      },
      {
        "seed": 2741964,
        "diff": -3.440700356880029
      },
      {
        "seed": 2741470,
        "diff": -2.2858587297854456
      },
      {
        "seed": 2740591,
        "diff": -1.5045750440280017
      },
      {
        "seed": 2740351,
        "diff": -1.1664750546249252
      }
    ]
  },
  "split": {
    "arb": null,
    "retail": null,
    "note": "Separate arb/retail edge differences not measured; the unmodified batch API exposes aggregate edge and separate volumes only."
  },
  "fee_stats": {
    "bid": 0.0036409514704852323,
    "ask": 0.0035510507440193076,
    "units": "fraction; mean of per-simulation time-average fees"
  },
  "blocked": null,
  "next": "Retain NP2; this coarse situation-shift search does not establish a useful gain. If continuing, test finer boost settings on new tuning seeds and reserve a different fresh confirmation block.",
  "method": {
    "simulator_commit": "6b6921f8d463314aa7c96234e1be25a25245f704",
    "reference": "NP2",
    "reference_sha256": "51f1c1a9d4999ee460eb8bbc66880da8074b173399a4f5d71f96671482e18ac0",
    "configuration": "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). Defaults otherwise. Price seed s, retail seed s+1.",
    "evaluation": "Compile using simulator SolidityCompiler defaults and compile VanillaStrategy.sol with contract_name VanillaStrategy. Run cand vs Vanilla and NP2 vs Vanilla separately via amm_sim_rs.run_batch, 20 seeds per call (last tuning call 8), n_workers=4; use edges[submission]. d=cand-NP2; se=sample SD(d)/sqrt(n); worst=min(d). Confirmation block used once after freezing.",
    "fees": "Bid and ask are fractions, averaged equally over the 2000 per-simulation time-average fees.",
    "classification": "A=firstInStep && ret<=adaptiveGate using original NP2 pHat, sigmaHat and pImplied; R=all other prints. Labels are inferred print classes, not simulator truth."
  },
  "checks": {
    "setup": "passed; release extension built and StarterStrategy validated",
    "candidate_validation": "amm-match validate scratch/Strategy.sol passed",
    "compiler_repair": "Initial classifier variants hit Yul stack depth. Removing disabled revert scaffolding allowed compilation; neutral behavior equivalence verified before tuning.",
    "confirmation_runs": 1
  },
  "interpretation": "Tuning improvement is small relative to uncertainty; no evidence here of the +5.8 edge gain needed for top 10."
}
