Open the app

Config schema and limits

Read every field of the module config, every bound the validator enforces on it, and every permanent structural cap it hits.

One HookrNativeMechanicsBlockV2.Config is frozen per pool. This page is the full field list, every bound the validator enforces, and the combinations the contract accepts or rejects.

The Config Struct

struct Config {
    bytes32 poolId;
    address kernel;
    address subject;
    address quote;
    address lockedLiquidityProvider;
    uint40  guardEndBlock;
    uint24  baseFeePips;
    uint24  maxFeePips;
    uint24  snipeTaxPips;
    uint16  surgeSens;
    uint16  burnBps;
    uint16  lpBps;
    uint16  potBps;
    uint16  royaltyBps;
    uint32  potEveryNBuys;
    uint96  maxBuyQuoteAmount;
    uint96  potMinBuyWei;
    address royaltyTo;
    address protocolRecipient;
    uint24  protocolShareBps;
}

ABI-encoded it is exactly 640 bytes. The validator rejects any other length, and rejects a payload that does not re-encode to itself byte for byte, so no dirty high bits or non-canonical encoding can reach the rules.

Fields

NameTypeDescription
poolIdbytes32The pool this config belongs to. Must match the runtime PoolId on every callback
kerneladdressThe root hook. Must be the caller on every module callback
subjectaddressThe token the rules act on
quoteaddressWhat the pool is priced in; address(0) is native
lockedLiquidityProvideraddressThe only address allowed to add liquidity while the guard window is open. Must be the coordinator
guardEndBlockuint40Block at which the guard window closes; zero disables it
baseFeePipsuint24Base LP fee in pips. Must equal limits.baseLpFeePips
maxFeePipsuint24Ceiling of the surge fee in pips
snipeTaxPipsuint24Guard-window surcharge on buys, in pips
surgeSensuint16How fast the surge climbs with trade size
burnBpsuint16Share of subject output withheld on an exact-input buy
lpBpsuint16Share of gross quote input donated to in-range LPs
potBpsuint16Share of gross quote input added to the pot
royaltyBpsuint16Share of the LP-reward and pot cuts paid to royaltyTo
potEveryNBuysuint32How many qualifying buys between pot payouts
maxBuyQuoteAmountuint96Per-block quote buy cap while the guard window is open; zero disables the cap
potMinBuyWeiuint96Smallest buy that advances the pot counter, in quote units
royaltyToaddressRoyalty recipient
protocolRecipientaddressMust equal the module's own immutable recipient
protocolShareBpsuint24The pool's protocol share

Structural Bounds

Enforced by _decodeAndValidate, which every entry point calls.

RuleReverts
config.length == 640 and re-encodes canonicallyInvalidConfig
poolId != 0, kernel != 0, subject != 0InvalidConfig
subject != quoteInvalidConfig
baseFeePips <= MAX_TOTAL_FEE_PIPSInvalidConfig
baseFeePips <= maxFeePips <= MAX_TOTAL_FEE_PIPSInvalidConfig
baseFeePips + snipeTaxPips <= MAX_TOTAL_FEE_PIPSInvalidConfig
surgeSens <= 10InvalidConfig
surgeSens == 0 exactly when maxFeePips == baseFeePipsInvalidConfig
burnBps + lpBps + potBps <= 1_000InvalidConfig
royaltyBps <= 1_000InvalidConfig
royaltyBps != 0 requires royaltyTo != 0 and lpBps + potBps != 0InvalidConfig
royaltyBps == 0 requires royaltyTo == 0InvalidConfig
guardEndBlock == 0 requires lockedLiquidityProvider, snipeTaxPips and maxBuyQuoteAmount all zeroInvalidConfig
guardEndBlock != 0 requires lockedLiquidityProvider != 0InvalidConfig
potBps != 0 requires 2 <= potEveryNBuys <= 100_000InvalidConfig
potBps != 0 requires potMinBuyWei >= MIN_POT_BUY_WEI for a native quote, or potMinBuyWei != 0 for an ERC-20 quoteInvalidConfig
potBps == 0 requires potEveryNBuys == 0 and potMinBuyWei == 0InvalidConfig
protocolShareBps <= MAX_PROTOCOL_SHARE_BPS and protocolRecipient != 0InvalidConfig

Admission Bounds

Enforced on top of the structural rules when a market is opened. See Pool lifecycle.

RuleReverts
protocolRecipient equals the module's own immutable recipientvalidateProtocolShare returns false, then InvalidNativeMechanicsModule
The module's immutable recipient equals coordinator.treasuryBeneficiary()InvalidNativeMechanicsModule
protocolShareBps equals coordinator.protocolShareBps(creator)ProtocolShareTierMismatch(expected, actual)
baseFeePips equals limits.baseLpFeePipsInvalidNativeMechanicsModule
A guard window is requested only on the new-token laneGuardRequiresLockedFoundingPosition
block.number < guardEndBlock <= block.number + MAX_GUARD_BLOCKSInvalidNativeMechanicsModule or InvalidConfig
For an ERC-20 quote with potBps != 0: 3 <= decimals <= MAX_QUOTE_DECIMALS and potMinBuyWei >= 10 ** (decimals - 3)validateProtocolShare returns false, then InvalidNativeMechanicsModule
lockedLiquidityProvider equals the kernel's coordinator() when the guard is onInvalidConfig
The per-pool caps derived by validateStack fit inside the catalog registrationModuleConfigCapsExceedSnapshot

Constants

ConstantValueWhere
MAX_TOTAL_FEE_PIPS500,000 (50%)HookrNativeMechanicsBlockV2
MAX_PROTOCOL_SHARE_BPS5,000 (50%)HookrNativeMechanicsBlockV2 as uint16, mirrored on the coordinator as uint24
MIN_POT_BUY_WEI0.001 etherHookrNativeMechanicsBlockV2
MAX_QUOTE_DECIMALS36HookrNativeMechanicsBlockV2
MAX_GUARD_BLOCKS100,000HookrNativeMechanicsBlockV2 and the admission library
MIN_SQRT_PRICE_LIMIT4295128740canonical full-fill limit for zeroForOne
MAX_SQRT_PRICE_LIMIT1461446703485210103287273052203988822378723970341canonical full-fill limit for one-for-zero
DEAD0x000000000000000000000000000000000000dEaDburn destination
SUPPLY1,000,000,000e18fixed supply of a new-token market
MAX_INITIAL_BUY_SUBJECTSUPPLY * 500 / 10_000 (5e25)ceiling on the creator's same-transaction buy
DYNAMIC_FEE_FLAG0x800000required PoolKey.fee
MAX_MODULE_DATA_LENGTH3,904longest module data a swap or a creator buy may carry
(inline bound in HookrMarketCoordinatorV5._validateMarketArgs)type(int16).maxtickSpacing must be positive and no larger; there is no named constant

Catalog Registration Ceiling

registerModule fixes a structural ceiling for the module across every pool it will ever serve, permanently. There is no updater.

FieldValue
requiredHookFlags10444 (0x28cc)
phaseMaskall phases
executionModeSTATEFUL_V1
maxLpFeeSurchargePips500,000
maxSpecifiedQuoteTakeBps4,000
maxUnspecifiedQuoteTakeBps2,500
maxSubjectTakeBps1,000
callbackGasLimit2,000,000

Every pool's own validateStack output must fit inside these. Treat the registration values as part of the reviewed configuration, not as incidental deployment parameters.

validateStack derives a pool's two quote-take caps from its surcharge ceiling:

(surgeMax, snipeMax) = _surchargeCeiling(cfg);
surchargeSlicePips   = ((surgeMax + snipeMax) * share) / BPS;
specifiedPips        = surchargeSlicePips + ((burnBps * share) / BPS) * 100;
specifiedCap         = lpBps + potBps + ceilDiv(specifiedPips, 100);
unspecifiedCap       = ceilDiv(surchargeSlicePips, 100);

Worked against the example pool in Open a new-token market, with baseFeePips = 3000, maxFeePips = 10000, snipeTaxPips = 250000, burnBps = 200, lpBps = 50, potBps = 50 and share = 2000: the surcharge ceiling is 257,000 pips, the slice is 51,400 pips, specifiedCap comes out at 654 bps and unspecifiedCap at 514 bps. Both fit inside the registration.

The registration is sized against the module's structural maxima rather than any one pool. The specified cap peaks at 3,500 bps, reached with lpBps + potBps = 1,000, baseFeePips = 0, the full 500,000-pip surcharge ceiling and a 5,000 bps share; the unspecified cap peaks at 2,500 bps under the same ceiling and share. The registered 4,000 and 2,500 cover both, and maxSubjectTakeBps = 1,000 equals the structural burn ceiling. registerModule is one-shot and generation-wide, and there is no updater, so these four numbers are part of the reviewed configuration.

Combination Matrix, per Lane

RuleNew-token laneExisting-asset lane
Native mechanics modulerequiredrequired
Base LP feerequired, must equal limits.baseLpFeePipssame
Surgeallowedallowed
Guard windowallowed, up to 100,000 blocksrejected, GuardRequiresLockedFoundingPosition
Auto burnallowedallowed
LP rewardallowedallowed
Potallowed, subject to the floorallowed, subject to the floor
Royaltyallowed, at most 10% of the cutssame
Founding positioncreated and never removablenone; lpFeeRecipient must be zero
Creator buyallowed, at most 5% of supplyrejected

Combination Matrix, per Asset

OK is allowed and coherent. WARN is allowed by the contract and needs a warning in any interface. BLOCK is rejected by the contract.

Subject \ QuoteETHHOOKRUSDGTokenized stockOther ERC-20
New Hookr tokenOKOKOKOK, WARN pause registryOK
Existing ERC-20OK, WARN burn if the token is not yourssamesamesame, plus WARN pause registrysame
HOOKROK, burn deflates HOOKRBLOCK, subject equals quoteOKOK, WARN pause registryOK
Tokenized stockOK, WARN burn destroys shares, WARN pause registrysamesameOK, both warningssame
USDG or another stablecoinOK, WARN burn destroys dollarssameBLOCK, subject equals quoteOK, WARN pause registrysame

The reasons behind each WARN are in RWA and ERC-20 quotes.