// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; /// @title KibbleConstants /// @notice Protocol parameters (docs §2). All constants, nothing adjustable. library KibbleConstants { /// @notice Max supply, docs §2. uint256 internal constant MAX_SUPPLY = 10_000_000e18; /// @notice Genesis LP mint, docs §2 / §6. The only mint outside emission. uint256 internal constant GENESIS_SUPPLY = 1_000_000e18; /// @notice Rig price, docs §3: 1 HYPE. uint256 internal constant RIG_PRICE = 1e18; /// @notice Power draw denominator: 1 rig draws exactly 1/60,000 HYPE per block (docs §2). uint256 internal constant DRAW_DIVISOR = 60_000; /// @notice Tank balances are stored in "power units" = wei × 60,000, so one rig drains exactly /// 1e18 units per block and a full era is exactly 216,000e18 units = 3.6 HYPE. uint256 internal constant UNITS_PER_RIG_BLOCK = 1e18; /// @notice Era length in Elysium blocks, docs §2. uint256 internal constant ERA_LENGTH = 216_000; /// @notice Era 1 emission, docs §5: 4,500,000 KIBBLE (20.8333 per block as the ratio ERA1_EMISSION / ERA_LENGTH). uint256 internal constant ERA1_EMISSION = 4_500_000e18; /// @notice KIBBLE power discount, docs §4: credit = KIBBLE × TWAP / 0.9 = KIBBLE × TWAP × 10 / 9. uint256 internal constant KIBBLE_CREDIT_NUM = 10; uint256 internal constant KIBBLE_CREDIT_DEN = 9; /// @notice TWAP window in blocks, docs §2. uint256 internal constant TWAP_WINDOW = 10_000; /// @notice Pool parameters (decision: Uniswap v4, native HYPE / KIBBLE, 0.3%, tickSpacing 60, no hook). uint24 internal constant POOL_FEE = 3000; int24 internal constant TICK_SPACING = 60; /// @notice Max deviation of the execution price from the TWAP for protocol swaps (Burner, Zapper), in bps. /// Safety bound against sandwiching of public burn / zap calls (not a docs mechanic, see README). uint256 internal constant MAX_TWAP_DEVIATION_BPS = 1000; }