بنقرة واحدة
lbamm-pool
Generate pool creation code for Dynamic, Fixed, and Single Provider pools
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate pool creation code for Dynamic, Fixed, and Single Provider pools
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Design an apptoken -- map high-level requirements to protocols, configuration steps, and implementation skills
Apptoken ecosystem knowledge -- token standards (ERC-721C, ERC-1155C, ERC-20C), apptoken categories, cross-protocol integration patterns. Use this skill whenever the user asks about apptokens, Creator Token Standards, ERC-20C/ERC-721C/ERC-1155C, Limit Break tokens, cross-protocol integration, or how the apptoken ecosystem fits together.
Generate integration code for the LBAMM CLOBTransferHandler -- on-chain limit order book with maker deposits, FIFO order filling, and price-linked lists. Generates Foundry scripts for maker flows (deposit, open/close orders, withdraw) and taker flows (filling orders through AMM swaps). Use this skill whenever the user asks about LBAMM CLOB, on-chain order books, limit orders on LBAMM, maker/taker flows, CLOB deposits, or filling CLOB orders.
LBAMM transfer handler architecture -- how transfer handlers work during swap settlement, the ILimitBreakAMMTransferHandler interface, executor validation hooks, callback patterns, and custom handler development. Use this skill whenever the user asks about LBAMM transfer handlers, swap settlement, ammHandleTransfer, custom settlement logic, ITransferHandlerExecutorValidation, how swaps use transfer data, or writing a custom handler contract.
Generate DEX integration contracts that call LBAMM
Generate integration code for the LBAMM PermitTransferHandler -- gasless swap execution via EIP-712 signed permits with optional cosigner. Generates Foundry scripts, signing code, and transferData encoding for fill-or-kill and partial fill permit swaps.
| name | lbamm-pool |
| description | Generate pool creation code for Dynamic, Fixed, and Single Provider pools |
| user-invocable | true |
| disable-model-invocation | true |
| argument-hint | [pool type and configuration description] |
Generate complete pool creation code -- Foundry scripts or helper contracts -- for any of the 3 LBAMM pool types.
Before generating code, check the user's project is configured:
foundry.toml must exist. If not: forge initlib/lbamm-core/ must exist. If not: forge install limitbreakinc/lbamm-coreforge install limitbreakinc/lbamm-pool-type-fixedforge install limitbreakinc/lbamm-pool-type-single-providerforge install limitbreakinc/amm-pool-type-dynamicremappings.txt needs @limitbreak/lbamm-core/=lib/lbamm-core/ plus the pool type remapping. Append if missing -- do not overwrite existing entries.
@limitbreak/lbamm-pool-type-fixed/=lib/lbamm-pool-type-fixed/@limitbreak/lbamm-pool-type-single-provider/=lib/lbamm-pool-type-single-provider/@limitbreak/amm-pool-type-dynamic/=lib/amm-pool-type-dynamic/lbamm-examples -- see lbamm-protocol/references/local-dev.md. Generated scripts should read addresses from environment variables (vm.envAddress) so they work with the local Anvil deployment.Parse requirements from $ARGUMENTS -- determine pool type and configuration
Resolve ambiguities before generating -- if $ARGUMENTS doesn't specify token addresses, pool type (Dynamic vs Fixed vs Single Provider) isn't clear from context, or initial price/liquidity details are missing, ask in a single message. If clear, proceed.
Determine the pool type:
Generate complete Foundry script or contract that:
PoolCreationDetails with correct poolType address, fee (or 55_555 for dynamic fees), token0/token1 (correctly ordered: token0 < token1), poolHook, and poolParamsabi.encode(DynamicPoolCreationDetails(tickSpacing, sqrtPriceRatioX96))abi.encode(FixedPoolCreationDetails(spacing0, spacing1, packedRatio))abi.encode(SingleProviderPoolCreationDetails(salt, sqrtPriceRatioX96))createPool() with optional initial liquidityExplain key parameters:
Compute the deterministic poolId and explain its encoding
references/dynamic-pool.md -- Dynamic pool creation, tick spacing, sqrtPriceX96, liquidity modificationreferences/fixed-pool.md -- Fixed pool creation, height spacing, constant rate, asymmetric positionsreferences/single-provider-pool.md -- Single provider creation, oracle hook, single LP mechanicslbamm-protocoltoken0 must be less than token1 (numerically lower address) -- will revert with LBAMM__CannotPairIdenticalTokens or produce wrong pool ID3000 means 30% fee, which is almost never what you wantfee = 55_555 without a pool hook that implements getPoolFeeForSwap() -- swaps will revert@limitbreak/lbamm-core/src/interfaces/core/ILimitBreakAMMLiquidity.sol
@limitbreak/lbamm-core/src/DataTypes.sol