{"status":"completed","blocked":null,"gates":{"C":{"sequences":50,"swap_callbacks":100000,"initialization_callbacks":50,"fee_comparisons":200100,"max_abs_fee_difference_bps":0.00013732518049352355,"mean_abs_fee_difference_bps":2.9376337866963386e-06,"first_divergence_over_0_01_bps":null,"coverage":{"arb":24048,"retail":75952,"zero_trade_steps":9943,"same_step_callbacks":60099,"gap_gt_1":23928,"gap_gt_8":6496,"buy":50270,"sell":49730,"max_gap":34,"max_trades_per_step":4},"seed_start":310000,"seed_end":310049,"passed":true,"wall_seconds":29.083035545889288}},"seeds":{"start":8038912,"end_inclusive":8039935,"n":1024,"chunk_size":64,"chunks":16,"runs_per_seed_per_arm":1},"paired":{"n":1024,"mean_diff":0.06105291517272299,"se":0.020951271788063868,"sum":62.51818513686834,"sumsq":463.6459326953134,"worst5":[{"seed":8039459,"diff":-4.960461476682099},{"seed":8038959,"diff":-4.453467555784982},{"seed":8039672,"diff":-4.036342956320368},{"seed":8039359,"diff":-3.0166718907413497},{"seed":8039409,"diff":-2.8966966119598965}]},"means_per_64_seeds":[-0.0360465964529908,0.14819505952994572,0.13828850641101464,0.02271631441037769,0.22461391685292398,0.13773561007540103,-0.02452967607412404,-0.012688433693196721,-0.0227826648720848,0.08416960043162902,-0.03794085531060709,-0.07643372350502453,0.10298769277042563,0.22597390371054615,0.028687797506690593,0.07390019097264133],"by_quartile":{"q1":{"n":256,"mean_diff":0.11665025314714739,"se":0.03213001640069414,"seeds":[8038920,8038923,8038929,8038937,8038941,8038944,8038946,8038948,8038953,8038960,8038961,8038967,8038975,8038984,8038988,8038990,8038998,8038999,8039004,8039005,8039018,8039022,8039023,8039026,8039027,8039029,8039032,8039045,8039051,8039052,8039057,8039064,8039066,8039072,8039073,8039080,8039084,8039087,8039090,8039101,8039117,8039118,8039125,8039127,8039130,8039131,8039132,8039143,8039149,8039152,8039154,8039155,8039163,8039166,8039167,8039168,8039175,8039181,8039184,8039187,8039188,8039189,8039191,8039193,8039194,8039199,8039202,8039204,8039205,8039209,8039218,8039219,8039223,8039226,8039228,8039231,8039233,8039241,8039243,8039246,8039250,8039251,8039269,8039273,8039277,8039279,8039284,8039289,8039290,8039295,8039303,8039306,8039307,8039311,8039315,8039322,8039324,8039335,8039341,8039343,8039344,8039349,8039358,8039362,8039363,8039364,8039369,8039371,8039377,8039378,8039387,8039391,8039394,8039395,8039402,8039403,8039408,8039411,8039412,8039418,8039420,8039422,8039425,8039440,8039441,8039460,8039463,8039465,8039467,8039468,8039471,8039472,8039474,8039479,8039488,8039494,8039496,8039498,8039501,8039503,8039504,8039515,8039519,8039521,8039524,8039528,8039529,8039530,8039532,8039540,8039541,8039552,8039555,8039558,8039567,8039568,8039571,8039579,8039580,8039581,8039582,8039584,8039602,8039603,8039606,8039611,8039618,8039621,8039623,8039624,8039632,8039635,8039640,8039644,8039656,8039657,8039664,8039666,8039669,8039670,8039675,8039677,8039680,8039681,8039682,8039687,8039689,8039693,8039699,8039701,8039704,8039706,8039710,8039713,8039717,8039718,8039721,8039728,8039729,8039736,8039737,8039743,8039747,8039748,8039752,8039755,8039760,8039763,8039767,8039768,8039770,8039772,8039775,8039778,8039788,8039800,8039803,8039811,8039812,8039815,8039816,8039820,8039824,8039825,8039828,8039833,8039838,8039844,8039853,8039856,8039860,8039862,8039863,8039867,8039871,8039875,8039877,8039880,8039882,8039884,8039885,8039890,8039891,8039897,8039899,8039904,8039906,8039908,8039909,8039912,8039917,8039918,8039931,8039932,8039934,8039935],"arms":{"IB":{"mean_edge":423.42699167904203,"mean_retail_volume_y":64912.91579528382},"CAND":{"mean_edge":423.5436419321892,"mean_retail_volume_y":64692.638828589705}}},"q2":{"n":256,"mean_diff":0.05936293203038412,"se":0.04026419023147057,"seeds":[8038915,8038917,8038919,8038921,8038926,8038933,8038934,8038940,8038942,8038943,8038945,8038949,8038952,8038958,8038962,8038965,8038966,8038968,8038969,8038976,8038978,8038979,8038980,8038985,8039001,8039002,8039012,8039017,8039024,8039030,8039036,8039040,8039042,8039043,8039044,8039059,8039063,8039065,8039068,8039069,8039070,8039071,8039075,8039076,8039077,8039086,8039089,8039095,8039099,8039104,8039108,8039114,8039115,8039120,8039121,8039122,8039126,8039135,8039139,8039140,8039142,8039145,8039153,8039157,8039159,8039160,8039161,8039162,8039164,8039171,8039174,8039178,8039179,8039180,8039183,8039185,8039215,8039216,8039221,8039224,8039225,8039227,8039234,8039235,8039245,8039253,8039256,8039258,8039259,8039260,8039264,8039267,8039274,8039286,8039291,8039299,8039300,8039302,8039310,8039313,8039320,8039321,8039325,8039331,8039332,8039333,8039338,8039339,8039346,8039348,8039350,8039357,8039361,8039366,8039370,8039374,8039375,8039380,8039382,8039389,8039390,8039396,8039397,8039404,8039419,8039427,8039432,8039433,8039443,8039444,8039446,8039448,8039449,8039451,8039452,8039453,8039456,8039458,8039470,8039473,8039482,8039484,8039487,8039489,8039491,8039493,8039497,8039502,8039505,8039506,8039511,8039518,8039520,8039525,8039526,8039531,8039533,8039536,8039537,8039539,8039542,8039545,8039546,8039547,8039548,8039550,8039551,8039556,8039559,8039560,8039565,8039570,8039575,8039578,8039586,8039591,8039595,8039598,8039600,8039604,8039605,8039610,8039614,8039615,8039617,8039622,8039629,8039630,8039643,8039647,8039649,8039652,8039653,8039654,8039660,8039668,8039672,8039674,8039678,8039685,8039686,8039688,8039691,8039696,8039698,8039708,8039711,8039712,8039714,8039723,8039726,8039727,8039732,8039734,8039735,8039745,8039749,8039751,8039758,8039771,8039776,8039787,8039790,8039793,8039798,8039799,8039802,8039810,8039827,8039834,8039837,8039841,8039848,8039849,8039852,8039854,8039858,8039861,8039865,8039869,8039873,8039881,8039887,8039889,8039893,8039902,8039903,8039907,8039910,8039913,8039916,8039919,8039927,8039928,8039929,8039933],"arms":{"IB":{"mean_edge":493.68658464003363,"mean_retail_volume_y":74103.4342994452},"CAND":{"mean_edge":493.745947572064,"mean_retail_volume_y":73910.82522131829}}},"q3":{"n":256,"mean_diff":0.06707394173752057,"se":0.04345126714779415,"seeds":[8038922,8038928,8038931,8038939,8038947,8038950,8038951,8038954,8038955,8038957,8038970,8038971,8038972,8038973,8038981,8038983,8038986,8038987,8038991,8038993,8038994,8038995,8038996,8039003,8039007,8039009,8039015,8039019,8039020,8039021,8039025,8039033,8039035,8039037,8039041,8039048,8039049,8039050,8039054,8039055,8039056,8039058,8039060,8039062,8039067,8039078,8039079,8039081,8039082,8039083,8039085,8039092,8039093,8039094,8039096,8039100,8039105,8039106,8039109,8039112,8039116,8039119,8039124,8039133,8039136,8039138,8039144,8039146,8039147,8039150,8039151,8039169,8039172,8039173,8039176,8039186,8039195,8039196,8039197,8039203,8039206,8039207,8039211,8039213,8039230,8039238,8039240,8039248,8039249,8039261,8039266,8039268,8039270,8039271,8039272,8039275,8039278,8039280,8039281,8039287,8039288,8039293,8039298,8039305,8039309,8039314,8039316,8039317,8039319,8039323,8039327,8039329,8039330,8039334,8039342,8039352,8039353,8039360,8039372,8039373,8039379,8039383,8039388,8039392,8039406,8039409,8039413,8039415,8039416,8039421,8039429,8039430,8039438,8039439,8039442,8039447,8039459,8039476,8039477,8039478,8039480,8039481,8039483,8039485,8039486,8039490,8039499,8039508,8039512,8039513,8039514,8039517,8039523,8039527,8039534,8039535,8039538,8039543,8039554,8039557,8039561,8039563,8039566,8039569,8039572,8039577,8039583,8039588,8039593,8039594,8039597,8039601,8039609,8039612,8039613,8039616,8039626,8039633,8039636,8039638,8039641,8039642,8039655,8039661,8039663,8039665,8039667,8039671,8039673,8039676,8039679,8039683,8039690,8039692,8039694,8039695,8039697,8039700,8039702,8039709,8039715,8039719,8039722,8039725,8039739,8039740,8039741,8039742,8039750,8039754,8039756,8039757,8039761,8039762,8039774,8039781,8039784,8039796,8039797,8039804,8039806,8039807,8039809,8039813,8039814,8039823,8039829,8039830,8039831,8039835,8039836,8039839,8039840,8039842,8039843,8039845,8039851,8039857,8039859,8039866,8039870,8039874,8039876,8039878,8039879,8039883,8039888,8039892,8039895,8039901,8039911,8039915,8039920,8039921,8039926,8039930],"arms":{"IB":{"mean_edge":561.8413811150235,"mean_retail_volume_y":82762.97991440348},"CAND":{"mean_edge":561.9084550567611,"mean_retail_volume_y":82590.31993413859}}},"q4":{"n":256,"mean_diff":0.0011245337758398755,"se":0.049759769274509404,"seeds":[8038912,8038913,8038914,8038916,8038918,8038924,8038925,8038927,8038930,8038932,8038935,8038936,8038938,8038956,8038959,8038963,8038964,8038974,8038977,8038982,8038989,8038992,8038997,8039000,8039006,8039008,8039010,8039011,8039013,8039014,8039016,8039028,8039031,8039034,8039038,8039039,8039046,8039047,8039053,8039061,8039074,8039088,8039091,8039097,8039098,8039102,8039103,8039107,8039110,8039111,8039113,8039123,8039128,8039129,8039134,8039137,8039141,8039148,8039156,8039158,8039165,8039170,8039177,8039182,8039190,8039192,8039198,8039200,8039201,8039208,8039210,8039212,8039214,8039217,8039220,8039222,8039229,8039232,8039236,8039237,8039239,8039242,8039244,8039247,8039252,8039254,8039255,8039257,8039262,8039263,8039265,8039276,8039282,8039283,8039285,8039292,8039294,8039296,8039297,8039301,8039304,8039308,8039312,8039318,8039326,8039328,8039336,8039337,8039340,8039345,8039347,8039351,8039354,8039355,8039356,8039359,8039365,8039367,8039368,8039376,8039381,8039384,8039385,8039386,8039393,8039398,8039399,8039400,8039401,8039405,8039407,8039410,8039414,8039417,8039423,8039424,8039426,8039428,8039431,8039434,8039435,8039436,8039437,8039445,8039450,8039454,8039455,8039457,8039461,8039462,8039464,8039466,8039469,8039475,8039492,8039495,8039500,8039507,8039509,8039510,8039516,8039522,8039544,8039549,8039553,8039562,8039564,8039573,8039574,8039576,8039585,8039587,8039589,8039590,8039592,8039596,8039599,8039607,8039608,8039619,8039620,8039625,8039627,8039628,8039631,8039634,8039637,8039639,8039645,8039646,8039648,8039650,8039651,8039658,8039659,8039662,8039684,8039703,8039705,8039707,8039716,8039720,8039724,8039730,8039731,8039733,8039738,8039744,8039746,8039753,8039759,8039764,8039765,8039766,8039769,8039773,8039777,8039779,8039780,8039782,8039783,8039785,8039786,8039789,8039791,8039792,8039794,8039795,8039801,8039805,8039808,8039817,8039818,8039819,8039821,8039822,8039826,8039832,8039846,8039847,8039850,8039855,8039864,8039868,8039872,8039886,8039894,8039896,8039898,8039900,8039905,8039914,8039922,8039923,8039924,8039925],"arms":{"IB":{"mean_edge":642.4886074573502,"mean_retail_volume_y":91825.92875117969},"CAND":{"mean_edge":642.4897319911261,"mean_retail_volume_y":91703.3899184431}}}},"retail_delta":-177.0212144556249,"arb_delta":-230.9421560617123,"retail_arb_delta_units":"mean Y volume per seed, CAND minus IB","mean_retail_volume_y":{"IB":78401.31469007804,"CAND":78224.29347562243},"mean_arb_volume_y":{"IB":24404.65617783038,"CAND":24173.714021768672},"mean_edge":{"IB":530.3608912228624,"CAND":530.4219441380351},"gas":{"IB":{"afterSwap_peak":236959,"oog":0,"gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":1024,"ok":1024,"max_ok_gas":21796,"sum_ok_gas":22319104,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":11008719,"ok":11008719,"max_ok_gas":22592,"sum_ok_gas":248387505468,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":1024,"ok":1024,"max_ok_gas":21526,"sum_ok_gas":22042624,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":1024,"ok":1024,"max_ok_gas":243227,"sum_ok_gas":249064448,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":11048130,"ok":11048130,"max_ok_gas":236959,"sum_ok_gas":1493641502283,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":1024,"ok":1024,"max_ok_gas":21735,"sum_ok_gas":22256640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]},"CAND":{"afterSwap_peak":237643,"oog":0,"gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":1024,"ok":1024,"max_ok_gas":21796,"sum_ok_gas":22319104,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":11002122,"ok":11002122,"max_ok_gas":22592,"sum_ok_gas":248238760284,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":1024,"ok":1024,"max_ok_gas":21526,"sum_ok_gas":22042624,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":1024,"ok":1024,"max_ok_gas":243237,"sum_ok_gas":249074688,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":11009741,"ok":11009741,"max_ok_gas":237643,"sum_ok_gas":1492824882412,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":1024,"ok":1024,"max_ok_gas":21745,"sum_ok_gas":22266880,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]}},"valid":true,"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[3] = WAD; \n        slots[5] = initialX > 0 ? wdiv(initialY, initialX) : 100 * WAD;\n        slots[6] = 950000000000000; slots[7] = 800000000000000000; slots[8] = 2000000000000000;\n        slots[15] = 400000000000000000 | (uint256(2000000000000000) << 160); slots[13] = 902500000000; slots[14] = slots[5]; \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 = uint64(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        uint256 sigmaForFast = sigmaHat;\n        uint256 fastHat = slots[14];\n        uint256 uncertainty = slots[13];\n        uint256 silent = trade.timestamp > lastTs ? trade.timestamp - lastTs : 0;\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            // Process variance is propagated inside the censored update.\n            if (uncertainty > 100000000000000) uncertainty = 100000000000000;\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        // S: infer a no-trade interval center from the last post-trade spot.\n        uint256 silenceScale = WAD;\n        if (firstInStep && silent > 1) {\n            uint256 g = silent - 1;\n            if (g > 1) g = 1;\n            uint256 w = WAD - _powWad(800000000000000000, g);\n            uint256 s = slots[2] >> 64;\n            if (s == 0) s = pHat;\n            uint256 c = (wmul(s, WAD - prevBidFee) + wdiv(s, WAD - prevAskFee)) / 2;\n            if (c >= pHat) pHat += wmul(w, c - pHat);\n            else pHat -= wmul(w, pHat - c);\n            silenceScale = WAD - wmul(300000000000000000, w);\n        }\n\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[12] = pImplied >= pHat ? 1 : 2; }\n            uint256 adaptiveGate = wmul(sigmaHat, GATE_SIGMA_MULT);\n            if (adaptiveGate < MIN_GATE) adaptiveGate = MIN_GATE;\n            alpha = wmul(alpha, silenceScale);\n            adaptiveGate = wmul(adaptiveGate, silenceScale);\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        // Censored assumed-density posterior. No external or future inputs.\n        uint256 arbProbability;\n        (fastHat, uncertainty, arbProbability) = _posterior(PosteriorInput(\n            fastHat, uncertainty, pImplied, spot, slots[2] >> 64,\n            prevBidFee, prevAskFee, firstInStep, silent, trade.isBuy,\n            trade.reserveY > 0 ? wdiv(trade.amountY, trade.reserveY) : 0\n        ));\n        slots[13] = uncertainty;\n        slots[14] = fastHat;\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        uint256 toxLinear;\n        uint256 toxQuadratic;\n        {\n            uint256 packedAnchor = slots[16];\n            uint256 runMean = uint64(packedAnchor);\n            uint256 sampleCount = packedAnchor >> 64;\n            if (sampleCount < 674) sampleCount++;\n            if (toxEma >= runMean) runMean += (toxEma-runMean)/sampleCount;\n            else runMean -= (runMean-toxEma)/sampleCount;\n            slots[16] = runMean | (sampleCount << 64);\n            toxLinear = _anchorBlend(runMean, toxEma, 712696014807650816);\n            toxQuadratic = _anchorBlend(runMean, toxEma, 1295240753826310656);\n        }\n\n\n        stepTradeCount = stepTradeCount + 1;\n        if (stepTradeCount > STEP_COUNT_CAP) stepTradeCount = STEP_COUNT_CAP;\n\n        uint256 originalLambda = lambdaHat; uint256 originalSize = sizeHat;\n        int256[19] memory nx;\n\n        if (342406799193418304 > 0) {\n            uint256 packedFlow = slots[15];\n            uint256 rate = uint80(packedFlow);\n            uint256 count = uint80(packedFlow >> 80);\n            uint256 meanSize = uint80(packedFlow >> 160);\n            if (rate == 0) rate = 400000000000000000;\n            if (meanSize == 0) meanSize = 2000000000000000;\n            if (isNewStep) {\n                uint256 inst = count / silent;\n                if (inst > 3 * WAD) inst = 3 * WAD;\n                uint256 retention = _powWad(999000000000000000, silent > 64 ? 64 : silent);\n                rate = wmul(rate, retention) + wmul(inst, WAD-retention);\n                count = 0;\n            }\n            uint256 weight = firstInStep ? WAD-arbProbability : WAD;\n            uint256 correctedWeight = weight;\n            if (2 == 2) {\n                uint256 missing = wmul(feeUsed, 196030880396139429888);\n                if (missing > 333333333333333376) missing = 333333333333333376;\n                correctedWeight = wdiv(weight, WAD-missing);\n            }\n            count += correctedWeight;\n            uint256 learning = wmul(WAD-999000000000000000, weight);\n            meanSize = _blend(meanSize, tradeRatio, learning);\n            {\n                uint256 la = packedFlow >> 240;\n                uint256 sn = trade.timestamp - la; if (sn > 32) sn = 32;\n                nx[17] = int256(sn * WAD);\n                if (firstInStep && arbProbability > 500000000000000000) la = trade.timestamp;\n                slots[15]=rate | (count << 80) | (meanSize << 160) | (la << 240);\n            }\n            uint256 retailRate = wmul(rate, 366383424913407168);\n            uint256 retailSize = 2 == 0 ? sizeHat : wmul(meanSize,1883296158119298304);\n            lambdaHat = _blend(lambdaHat,retailRate,342406799193418304);\n            sizeHat = _blend(sizeHat,retailSize,342406799193418304);\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, toxLinear) + wmul(TOX_QUAD_COEF, wmul(toxQuadratic, toxQuadratic)) + wmul(ACT_COEF, actEma);\n        fMid = fMid + wmul(SIGMA_TOX_COEF, wmul(sigmaHat, toxLinear));\n\n        lambdaHat = originalLambda; sizeHat = originalSize;\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 staleHat = wmul(pHat, 700000000000000000) + wmul(fastHat, 300000000000000000);\n            uint256 staleTox = wdiv(absDiff(spot, staleHat), staleHat);\n            if (staleTox > TOX_CAP) staleTox = TOX_CAP;\n            uint256 staleShift = wmul(STALE_DIR_COEF, staleTox);\n            uint256 attractShift = wmul(staleShift, STALE_ATTRACT_FRAC);\n            if (spot >= staleHat) {\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 (!firstInStep && tradeBoost > 16 * BPS) tradeBoost = 16 * BPS;\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        if (firstInStep) {\n            if (askFee > bidFee && bidFee > 30 * BPS) bidFee = 30 * BPS;\n            else if (bidFee > askFee && askFee > 30 * BPS) askFee = 30 * BPS;\n        }\n\n        if (bidFee > askFee && askFee > 36 * BPS) askFee = 36 * BPS;\n        else if (askFee > bidFee && bidFee > 36 * BPS) bidFee = 36 * BPS;\n\n        {\n            unchecked {\n                nx[0] = int256(sigmaHat)*1000/1e12-1000000;\n                nx[1] = int256(lambdaHat)*2/1e12-1000000;\n                nx[2] = int256(sizeHat)*500/1e12-1000000;\n                nx[3] = int256(toxEma)*500/1e12-1000000;\n                nx[4] = int256(actEma)*500/1e12-1000000;\n                nx[5] = int256(dirState)/1e12-1000000;\n                uint256 nh = wmul(pHat,700000000000000000)+wmul(fastHat,300000000000000000);\n                nx[6] = (int256(spot)-int256(nh))*500000000/int256(nh);\n                nx[7] = int256(tradeRatio)*500/1e12;\n                if (!trade.isBuy) nx[7] = -nx[7];\n                nx[8] = int256(arbProbability)*2/1e12-1000000;\n                nx[9] = firstInStep ? int256(1000000) : -int256(1000000);\n                nx[10] = int256(uncertainty)/1e6-1000000;\n                nx[11] = int256(silent>8 ? 8 : silent)*1000000/8;\n                nx[12] = int256(uint256(uint64(slots[16])))*500/1e12-1000000;\n                nx[13] = trade.reserveY > 0 ? int256(wdiv(trade.amountY, trade.reserveY)) : int256(0);\n                nx[14] = int256(stepTradeCount * WAD);\n                nx[15] = int256(prevBidFee);\n                nx[16] = int256(prevAskFee);\n                nx[18] = (int256(trade.isBuy ? wdiv(wmul(spot, gamma), WAD - 30 * BPS) : wdiv(wmul(spot, WAD - 30 * BPS), gamma)) - int256(nh)) * 1e18 / int256(nh);\n                nx[13] = nx[13] * 647054817 / 1e18 + (-618293);\n                nx[14] = nx[14] * 1395287 / 1e18 + (-2037262);\n                nx[15] = nx[15] * 220617911 / 1e18 + (-803057);\n                nx[16] = nx[16] * 228148131 / 1e18 + (-808615);\n                nx[17] = nx[17] * 412565 / 1e18 + (-823811);\n                nx[18] = nx[18] * 274335453 / 1e18 + (1772);\n                for (uint256 ni=0;ni<19;ni++) {\n                    if(nx[ni]>4000000) nx[ni]=4000000;\n                    if(nx[ni]<-4000000) nx[ni]=-4000000;\n                }\n                (int256 hb,int256 ha) = _head(nx);\n                int256 nb = int256(bidFee)+hb*100000000;\n                int256 na = int256(askFee)+ha*100000000;\n                bidFee = nb<0 ? 0 : (nb>int256(MAX_FEE) ? MAX_FEE : uint256(nb));\n                askFee = na<0 ? 0 : (na>int256(MAX_FEE) ? MAX_FEE : uint256(na));\n            }\n        }\n\n        slots[0] = bidFee; slots[1] = askFee; slots[2] = (spot << 64) | 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\n\n    function _head(int256[19] memory x) internal pure returns (int256 b,int256 a) {\n        unchecked {\n            b = 1595387000000; a = 1497519000000;\n            int256 z;\n            z = 1280885 + ((-107366 * x[0]) + (75470 * x[1]) + (-1434737 * x[2]) + (2611701 * x[3]) + (-1968127 * x[4]) + (498956 * x[5]) + (-1826966 * x[6]) + (1169187 * x[7]) + (-3245196 * x[8]) + (-1148729 * x[9]) + (-921570 * x[10]) + (109265 * x[11]) + (1433103 * x[12]) + (-229669 * x[13]) + (219742 * x[14]) + (375225 * x[15]) + (-1261360 * x[16]) + (-412549 * x[17]) + (961910 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (316442 * z); a += (782082 * z);\n            z = -2095320 + ((659660 * x[0]) + (1413691 * x[1]) + (1959144 * x[2]) + (3721413 * x[3]) + (1073255 * x[4]) + (864274 * x[5]) + (-128000 * x[6]) + (354071 * x[7]) + (-617812 * x[8]) + (374823 * x[9]) + (-224917 * x[10]) + (-1628505 * x[11]) + (149379 * x[12]) + (-824564 * x[13]) + (-262341 * x[14]) + (1450166 * x[15]) + (832583 * x[16]) + (163182 * x[17]) + (703949 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (-2084422 * z); a += (-1384243 * z);\n            z = -4427272 + ((2236348 * x[0]) + (3596225 * x[1]) + (-282380 * x[2]) + (1577020 * x[3]) + (2179799 * x[4]) + (3492623 * x[5]) + (-1216393 * x[6]) + (2129282 * x[7]) + (1826186 * x[8]) + (-1991732 * x[9]) + (-106575 * x[10]) + (-2125703 * x[11]) + (-218213 * x[12]) + (915236 * x[13]) + (-702987 * x[14]) + (326939 * x[15]) + (-2528810 * x[16]) + (-188777 * x[17]) + (-3388530 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (85561 * z); a += (-1214412 * z);\n            z = -1190453 + ((-407281 * x[0]) + (-383487 * x[1]) + (-533969 * x[2]) + (-212304 * x[3]) + (-895500 * x[4]) + (419660 * x[5]) + (387993 * x[6]) + (1229205 * x[7]) + (548195 * x[8]) + (367481 * x[9]) + (432121 * x[10]) + (-1574003 * x[11]) + (-1801549 * x[12]) + (297405 * x[13]) + (-44733 * x[14]) + (-146692 * x[15]) + (2815005 * x[16]) + (-590774 * x[17]) + (-652007 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (-899612 * z); a += (3608110 * z);\n            z = -1382536 + ((812911 * x[0]) + (26044 * x[1]) + (3454762 * x[2]) + (-404110 * x[3]) + (-1843245 * x[4]) + (-1187833 * x[5]) + (-988 * x[6]) + (-522881 * x[7]) + (-207291 * x[8]) + (151312 * x[9]) + (122121 * x[10]) + (-2803461 * x[11]) + (348749 * x[12]) + (-862821 * x[13]) + (52674 * x[14]) + (-534659 * x[15]) + (2149968 * x[16]) + (-238333 * x[17]) + (164932 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (-3254410 * z); a += (382447 * z);\n            z = -1484339 + ((1370578 * x[0]) + (-702090 * x[1]) + (1563338 * x[2]) + (-2230662 * x[3]) + (3394238 * x[4]) + (819582 * x[5]) + (1432933 * x[6]) + (1171562 * x[7]) + (-1001541 * x[8]) + (-380503 * x[9]) + (-189448 * x[10]) + (2912018 * x[11]) + (839022 * x[12]) + (-220126 * x[13]) + (-176391 * x[14]) + (715838 * x[15]) + (-2277359 * x[16]) + (-691458 * x[17]) + (432585 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (-145995 * z); a += (-1285247 * z);\n            z = -2224689 + ((-2761832 * x[0]) + (1720287 * x[1]) + (-278947 * x[2]) + (-1743280 * x[3]) + (2604551 * x[4]) + (1715275 * x[5]) + (-784839 * x[6]) + (1502785 * x[7]) + (1066705 * x[8]) + (-791044 * x[9]) + (330669 * x[10]) + (2069919 * x[11]) + (1359621 * x[12]) + (565807 * x[13]) + (406291 * x[14]) + (-1041393 * x[15]) + (282381 * x[16]) + (-195238 * x[17]) + (1776864 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (-1053863 * z); a += (-446914 * z);\n            z = 983789 + ((-2740477 * x[0]) + (-3109628 * x[1]) + (3026844 * x[2]) + (4093007 * x[3]) + (-466828 * x[4]) + (-1923312 * x[5]) + (-1562971 * x[6]) + (1904283 * x[7]) + (1705855 * x[8]) + (-853388 * x[9]) + (2858356 * x[10]) + (-2179155 * x[11]) + (1037620 * x[12]) + (969714 * x[13]) + (684221 * x[14]) + (2683307 * x[15]) + (450194 * x[16]) + (-1083447 * x[17]) + (316701 * x[18]))/1000000;\n            if(z<0) z=0; else if(z>4000000) z=4000000;\n            b += (1186115 * z); a += (67917 * z);\n            b /= 1000000; a /= 1000000;\n        }\n    }\n\n    function _anchorBlend(uint256 mean, uint256 value, uint256 k) internal pure returns (uint256) {\n        if (k == WAD) return value;\n        if (value >= mean) return mean + wmul(value-mean,k);\n        uint256 delta = wmul(mean-value,k);\n        return delta < mean ? mean-delta : 0;\n    }\n\n    struct PosteriorInput {\n        uint256 mu; uint256 v; uint256 obs; uint256 spot; uint256 preSpot;\n        uint256 bid; uint256 ask; bool first; uint256 silent; bool buy; uint256 size;\n    }\n    function _posterior(PosteriorInput memory x) internal pure returns (uint256, uint256, uint256) {\n        if (x.mu == 0) x.mu = x.spot;\n        if (x.v < 10000000000) x.v = 10000000000;\n        uint256 lo = wmul(x.preSpot, WAD-x.bid);\n        uint256 hi = wdiv(x.preSpot, WAD-x.ask);\n        if (x.first) {\n            if (x.silent>1 && x.preSpot>0) {\n                uint256 elapsed=x.silent>8?8:x.silent;\n                x.v += 902500000000*(elapsed-1);\n                (x.mu,x.v)=_band(x.mu,x.v,lo,hi);\n            }\n            x.v+=902500000000;\n        }\n        uint256 mRetail = x.mu;\n        uint256 vRetail = x.v;\n        // A missing own-pool trade is a censored price observation.\n        if (x.first && x.preSpot > 0) {\n            (mRetail, vRetail) = _band(x.mu, x.v, lo, hi);\n        }\n        if (!x.first) {\n            // A later print is retail. Only an interior route is an observation\n            // of the other pool, with explicit observation uncertainty.\n            uint256 fee = x.buy ? x.bid : x.ask;\n            if (fee > 30 * BPS) {\n                uint256 normal = x.buy ? wdiv(wmul(x.spot, WAD-fee), WAD-30*BPS)\n                    : wdiv(wmul(x.spot, WAD-30*BPS), WAD-fee);\n                uint256 residual = wdiv(absDiff(normal, x.mu),x.mu);\n                uint256 noise = 9000000000000 + wmul(residual,residual);\n                uint256 k = wdiv(x.v,x.v+noise);\n                return (_blend(x.mu,normal,k),wmul(x.v,WAD-k),0);\n            }\n            return (x.mu,x.v,0);\n        }\n        uint256 e = wdiv(absDiff(x.obs,x.mu),x.mu);\n        uint256 totalV = x.v + 22500000000;\n        uint256 z = wdiv(wmul(e,e),totalV);\n        uint256 density = _powWad(wdiv(WAD,WAD+z/8),4);\n        uint256 odds = wmul(density,wdiv(4000000000000000,_isqrt(totalV*WAD)));\n        if (x.size > 3000000000000000) odds = wmul(odds,4*WAD/10);\n        if (x.silent > 1) odds = wmul(odds,8*WAD/10);\n        uint256 sd = _isqrt(x.v*WAD);\n        uint256 width = wdiv(hi-lo,x.mu);\n        uint256 distance = x.mu<lo?lo-x.mu:(x.mu>hi?x.mu-hi:0);\n        uint256 zBand = wdiv(wdiv(distance,x.mu),sd);\n        uint256 mass = wmul(wdiv(width,width+2*sd),wdiv(WAD,WAD+wmul(zBand,zBand)));\n        if (mass < WAD/100) mass = WAD/100;\n        odds = wdiv(odds,mass);\n        uint256 prob = wdiv(odds,WAD+odds);\n        uint256 kArb = wdiv(x.v,totalV);\n        uint256 mArb = _blend(x.mu,x.obs,kArb);\n        uint256 mean = _blend(mRetail,mArb,prob);\n        uint256 between = wdiv(absDiff(mArb,mRetail),x.mu);\n        uint256 variance = wmul(prob,wmul(x.v,WAD-kArb)) + wmul(WAD-prob,vRetail)\n            + wmul(wmul(prob,WAD-prob),wmul(between,between));\n        if (variance > 100000000000000) variance = 100000000000000;\n        return (mean,variance,prob);\n    }\n    function _blend(uint256 a,uint256 b,uint256 w) internal pure returns(uint256) {\n        return b>=a ? a+wmul(b-a,w) : a-wmul(a-b,w);\n    }\n    function _band(uint256 mu,uint256 v,uint256 lo,uint256 hi) internal pure returns(uint256,uint256) {\n        // Soft interval likelihood avoids discontinuities at quadrature nodes.\n        uint256 sd=wmul(mu,_isqrt(v*WAD));\n        uint256[3] memory acc;\n        for(uint256 j=0;j<7;j++) {\n            uint256 p=j<3 ? (mu>(3-j)*sd?mu-(3-j)*sd:1) : mu+(j-3)*sd;\n            uint256 w=j==3?72:(j==2||j==4?45:(j==1||j==5?10:1));\n            uint256 distance=p<lo?lo-p:(p>hi?p-hi:0);\n            uint256 z=sd>0?wdiv(distance,sd):0;\n            uint256 likelihood=wdiv(WAD,WAD+4*wmul(z,z));\n            w=wmul(w*WAD,likelihood);\n            acc[0]+=w;acc[1]+=wmul(w,p);\n            uint256 d=wdiv(absDiff(p,mu),mu);\n            acc[2]+=wmul(w,wmul(d,d));\n        }\n        uint256 m=wdiv(acc[1],acc[0]);\n        uint256 d=wdiv(absDiff(m,mu),mu);\n        uint256 second=wdiv(acc[2],acc[0]);\n        return(m,second>wmul(d,d)?second-wmul(d,d):10000000000);\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    // Floor square root: bit-length seed and seven Newton steps (all uint256).\n    function _isqrt(uint256 x) internal pure returns (uint256 r) {\n        if (x == 0) return 0;\n        unchecked {\n            uint256 y = x;\n            r = 1;\n            if (y >> 128 != 0) { y >>= 128; r <<= 64; }\n            if (y >> 64 != 0) { y >>= 64; r <<= 32; }\n            if (y >> 32 != 0) { y >>= 32; r <<= 16; }\n            if (y >> 16 != 0) { y >>= 16; r <<= 8; }\n            if (y >> 8 != 0) { y >>= 8; r <<= 4; }\n            if (y >> 4 != 0) { y >>= 4; r <<= 2; }\n            if (y >> 2 != 0) { r <<= 1; }\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            r = (r + x / r) >> 1;\n            uint256 t = x / r;\n            return r < t ? r : t;\n        }\n    }\n\n    function getName() external pure override returns (string memory) { return \"censored_10\"; }\n}\n","code_sha256":"01e3b53a569a906c27123fc77739256608870037426db7a283393951345bbd1b","notes":["Confirmation only; no search or replica. Gate C uses the supplied RS2 differential callback generator adapted to CAND and its exact frozen port. W = [1] + feature_multipliers + feature_offsets + flattened W1 + b1 + flattened W2 + b2 (217 entries). Port SHA256 b29cd2a078b4c3fc57945a79e927624dd346c44d8cc149dae43f4929aa6d736b.","SETUP succeeded at repository commit 6b6921f8d463314aa7c96234e1be25a25245f704; wheel SHA256 aedb68280aca34c110968f00148387c95885207913fb2cf19a1ab4c5cfd6887a verified. StarterStrategy validation passed. All commands limited to under eight minutes.","Each arm ran alone against the pinned 30 bps VanillaStrategy via amm_sim_rs.run_batch(bytecode, VanillaStrategy, configs, 8). Config construction follows MatchRunner._build_configs with i replaced by the actual seed, including default_rng(seed) and draws in order: retail mean size, arrival rate, gbm sigma. Baseline has 10000 steps per market.","Paired statistics use submission edge CAND minus IB on the same seeds; se is sample standard deviation (ddof=1) / sqrt(n); sumsq is uncentered sum of squared differences. worst5 lists the five smallest individual differences. Quartiles sort all seeds by IB retail_volume_y, q1 quietest.","Retail and arb deltas are directly measured volume_y differences. This engine result exposes no retail/arb edge decomposition; no such split is claimed. Gas tables are sums of direct per-chunk gas_stats, with max_ok_gas combined by maximum. They include normalizer (Baseline) and measured arm (Submission). Peak limit applies to afterSwap.","Artifact JSON SHA256 values equal their URL IDs; CAND Solidity SHA256 matches its artifact and IB Solidity SHA256 is 301941829a44bb60977bb28181a5e4bfa6544f3696763f987054789b2611d686. External inputs are cited in sources.json. All performance and gas numbers here are local measurements."],"engine_wall_seconds_per_arm":{"IB":481.2949888133444,"CAND":471.7667552847415}}
