원클릭으로
lbamm-position-hook
Generate complete ILimitBreakAMMLiquidityHook Solidity implementations for per-position liquidity policies
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate complete ILimitBreakAMMLiquidityHook Solidity implementations for per-position liquidity policies
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-position-hook |
| description | Generate complete ILimitBreakAMMLiquidityHook Solidity implementations for per-position liquidity policies |
| user-invocable | true |
| disable-model-invocation | true |
| argument-hint | [description of desired position hook behavior] |
Generate a complete ILimitBreakAMMLiquidityHook implementation based on the user's requirements. Position hooks enforce per-position policies on liquidity operations (add, remove, collect fees).
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-coreremappings.txt needs @limitbreak/lbamm-core/=lib/lbamm-core/. Append if missing -- do not overwrite existing entries.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 -- identify what the position hook should do (time-lock liquidity, KYC-gate LP positions, charge deposit/withdrawal fees, track rewards, etc.)
Resolve ambiguities before generating -- if $ARGUMENTS references external contracts without addresses (e.g., "a KYC registry", "a reward token", "an NFT collection"), ask whether to use an existing contract (get the address) or create one. Clarify time-lock durations, fee amounts, or other values if unspecified and impactful. Ask in a single message. If clear, proceed.
Determine which callbacks are needed:
validatePositionAddLiquidity -- validate/gate LP deposits, charge deposit feesvalidatePositionRemoveLiquidity -- validate/gate LP withdrawals, charge withdrawal feesvalidatePositionCollectFees -- validate fee collection, charge fees on fee claimsGenerate a complete Solidity contract that:
pragma solidity 0.8.24;ILimitBreakAMMLiquidityHookliquidityHookManifestUri()Explain the position identity impact -- the hook address becomes part of the base position ID:
basePositionId = keccak256(abi.encodePacked(provider, liquidityHook, poolId))
Different hooks create different positions even for the same provider and pool. This means positions created with this hook are distinct from positions without it.
Explain fee behavior:
(hookFee0, hookFee1)maxHookFee0/maxHookFee1 set by the caller(0, 0) from callbacks that don't charge feesreferences/position-hook-interface.md -- Full interface, callback signatures, position identity, hook call orderingreferences/position-hook-patterns.md -- Annotated examples: time-lock, KYC-gated, fee-on-depositlbamm-protocolLiquidityModificationParams.liquidityHook. Use for position-specific policies -- time locks, per-position access control, position-level fee collection, reward tracking. The hook becomes part of the position identity.setTokenSettings. Broadest surface -- 10 flags covering swaps, liquidity, pool creation, flashloans, and handler orders. Use when behavior should apply to ALL pools involving a token.(0, 0) fees still allows itLiquidityContext provides provider, token0, token1, and positionIdmaxHookFee0/maxHookFee1 -- if the hook returns more, the transaction revertsmsg.sender == LBAMM_CORE in callbacks to prevent unauthorized invocation@limitbreak/lbamm-core/src/interfaces/hooks/ILimitBreakAMMLiquidityHook.sol
@limitbreak/lbamm-core/src/DataTypes.sol