Rule Craft
DocsRule modulesMenu

Concepts

Rule modules

The building blocks of a rule set: what each one does and which callbacks it needs.

A module is a small, single-purpose piece of pool logic with bounded parameters. Modules are combined, never edited: if you want different behaviour, you pick different parameters within the bounds, or a different module.

ModuleStatusCallbacksWhat it does
Snipe GuardCorebeforeInitialize, afterSwap, afterSwapReturnDeltaCaps buys per block and taxes the opening window.
Size-Scaled FeeCorebeforeSwapThe LP fee grows with trade size against depth.
Buy BurnCoreafterSwap, afterSwapReturnDeltaBurns a share of every buy's token output.
LP StreamCoreafterSwap, afterSwapReturnDeltaRoutes a share of every buy to in-range LPs.
Milestone PotPlannedafterSwap, afterSwapReturnDeltaEvery Nth qualifying buy wins the pot.
Liquidity TimelockCoreFounding liquidity cannot leave before the unlock date.
Arb RecapturePlannedbeforeSwap, afterSwap, beforeSwapReturnDeltaKeeps part of arbitrage value inside the pool.

Order of execution

Inside the hook the order is fixed: the size fee is set in beforeSwap; in afterSwap the guard cap is checked first, then burn, guard tax and stream are taken from the buy's token output, then royalty and protocol share are set aside and the rest is donated. Liquidity Timelock needs no callback: the launcher owns the founding position.

Milestone Pot and Arb Recapture are planned and not part of the on-chain v1. Rule sets can be drafted with them but cannot launch with them.

Full parameter bounds are listed in module parameters.