diff --git a/onchain/src/abstracts/ThreePositionStrategy.sol b/onchain/src/abstracts/ThreePositionStrategy.sol index d3e2c0b..c8b011e 100644 --- a/onchain/src/abstracts/ThreePositionStrategy.sol +++ b/onchain/src/abstracts/ThreePositionStrategy.sol @@ -30,10 +30,10 @@ abstract contract ThreePositionStrategy is UniswapMath, VWAPTracker { int24 internal constant DISCOVERY_SPACING = 11_000; /// @notice Minimum discovery depth multiplier uint128 internal constant MIN_DISCOVERY_DEPTH = 200; - /// @notice Maximum safe anchorWidth: ensures 34 * MAX_ANCHOR_WIDTH * TICK_SPACING / 100 fits in int24 - /// @dev With TICK_SPACING=200: 34 * 1233 * 200 = 8,384,400 ≤ int24 max (8,388,607). - /// anchorWidth=1234 produces 8,391,200 which overflows int24 and reverts in Solidity 0.8. - uint24 internal constant MAX_ANCHOR_WIDTH = 1233; + /// @notice EVOLUTION OVERRIDE: unbounded anchor-width exploration (see tools/push3-evolution/evolution.patch). + /// @dev Production cap is 1233; values above 123358 overflow int24 anchorSpacing (200 + 68 * anchorWidth) + /// and revert — tolerable in evolution context where reverts are scored as zero fitness. + uint24 internal constant MAX_ANCHOR_WIDTH = type(uint24).max; /// @notice The three liquidity position types enum Stage {