lbamm-standard-hook
Configure AMM Standard Hook via Creator Hook Settings Registry
Skill body
LBAMM Standard Hook Configurator
Generate configuration scripts/contracts for the first-party AMM Standard Hook + Creator Hook Settings Registry.
Project Setup
Before generating code, check the user’s project is configured:
- Foundry:
foundry.tomlmust exist. If not:forge init - LBAMM Core:
lib/lbamm-core/must exist. If not:forge install limitbreakinc/lbamm-core - LBAMM Hooks and Handlers:
lib/lbamm-hooks-and-handlers/must exist. If not:forge install limitbreakinc/lbamm-hooks-and-handlers - Remappings:
remappings.txtneeds both@limitbreak/lbamm-core/=lib/lbamm-core/and@limitbreak/lbamm-hooks-and-handlers/=lib/lbamm-hooks-and-handlers/. Append if missing – do not overwrite existing entries. - Local testing: LBAMM is in audit and not yet on public networks. For local testing, use
lbamm-examples– seelbamm-protocol/references/local-dev.md. Generated scripts should read addresses from environment variables (vm.envAddress) so they work with the local Anvil deployment.
Instructions
-
Parse desired configuration from
$ARGUMENTS– identify what the token issuer wants to configure (trading fees, whitelists, price bounds, trading pause, pool disabling, etc.) -
Resolve ambiguities before generating – if $ARGUMENTS mentions a token without its address, references whitelists without specifying which addresses to include, or leaves fee amounts unspecified, ask in a single message. If clear, proceed.
- Map requirements to
HookTokenSettingsfields:tradingIsPaused– Pause all tradingblockDirectSwaps– Block direct (P2P) swapscheckDisabledPools– Enable pool disable/enable by token issuertokenFeeBuyBPS/tokenFeeSellBPS– Fees on token buys/sells (in token)pairedFeeBuyBPS/pairedFeeSellBPS– Fees on buys/sells (in paired token)minFeeAmount/maxFeeAmount– Fee amount boundspoolTypeWhitelistId– Restrict which pool types can be usedpairedTokenWhitelistId– Restrict which tokens can be pairedlpWhitelistId– Restrict who can provide liquidity
- Generate a Foundry script that:
- Creates whitelists via the Registry (LP, pair token, pool type) if needed
- Calls
registry.setTokenSettings()with the correctHookTokenSettings - Calls LBAMM core
setTokenSettings()with correct packed flags - Syncs hooks if needed
- Include LBAMM core
setTokenSettingscall with correct packed flags:- The AMM Standard Hook supports flags: beforeSwap (0), afterSwap (1), addLiquidity (2), poolCreation (5), flashloans (7), flashloansValidateFee (8), handlerOrderValidate (9)
- Flags removeLiquidity (3), collectFees (4), and hookManagesFees (6) are NOT supported and will cause reverts if set
- Explain each setting and distinguish:
- Pool disabling (
checkDisabledPools+setPoolDisabled) vs trading pause (tradingIsPaused) - Token fees vs paired token fees
- Whitelist IDs (0 = no restriction)
- Pool disabling (
Reference Files
references/standard-hook-api.md– Registry interface, IAMMStandardHook, who can administerreferences/standard-hook-configs.md– Common configuration examples- Protocol knowledge:
lbamm-protocol
When to Use This vs Other Hook Skills
- This skill (lbamm-standard-hook): Configure the pre-deployed first-party AMM Standard Hook via the Creator Hook Settings Registry. No custom Solidity needed – just configuration scripts. Use when built-in settings (trading fees, whitelists, pause, pool disabling) are sufficient.
- lbamm-token-hook: Generate a custom
ILimitBreakAMMTokenHookimplementation. Use when you need behavior beyond what the standard hook provides. - lbamm-pool-hook: Generate a custom
ILimitBreakAMMPoolHookimplementation. Use for per-pool behavior like dynamic fees or oracle pricing.
Skill frontmatter
Work with this as data
Every skill here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for agent skills
4 MCP tools reach this
find_skillsBrowse and filter every skill in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/skills/lbamm-standard-hook"
curl "https://apis.io/api/v1/skills?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.