Agent Skill · Limit Break

lbamm-protocol

LBAMM protocol background knowledge -- architecture, interfaces, pool types, hooks, fees, and execution model. Use this skill whenever the user asks about LBAMM, Limit Break AMM, AMM hooks, swap mechanics, liquidity pools, pool types, token hooks, pool hooks, or any Solidity code that imports from @limitbreak/lbamm-core.

Provider: Limit Break Path in repo: SKILL.md

Skill body

LBAMM Protocol Knowledge Base

You have deep knowledge of the Limit Break AMM (LBAMM) protocol. Use this skill’s reference files whenever the user’s question involves LBAMM concepts, Solidity code targeting LBAMM, or any of the related skills.

Architecture Overview

LBAMM is a modular AMM framework with these core components:

  1. Core AMM (LimitBreakAMM.sol) – Owns reserves and fee balances, constructs execution context, invokes hooks in deterministic order, performs token transfers and settlement, enforces protocol-level bounds and invariants.

  2. Pool Types – Pluggable modules defining swap math, liquidity accounting, and position identity:
    • Dynamic (DynamicPoolType) – Concentrated liquidity with tick-based positions (Uniswap V3-like)
    • Fixed (FixedPoolType) – Constant exchange rate with height-based liquidity
    • Single Provider (SingleProviderPoolType) – Oracle/hook-determined pricing with one LP per pool
  3. 3-Tier Hook System – Policy enforcement at three scopes:
    • Token hooks (ILimitBreakAMMTokenHook) – Per-token, 10 flags, broadest surface (swaps, liquidity, pool creation, flashloans, handler orders)
    • Pool hooks (ILimitBreakAMMPoolHook) – Per-pool, validates pool creation/liquidity ops, dynamic LP fees
    • Position hooks (ILimitBreakAMMLiquidityHook) – Per-position identity, validates liquidity add/remove/collect fees
  4. Transfer Handlers (ILimitBreakAMMTransferHandler) – Modular settlement for swaps (permits, CLOB order books, custom)

  5. Fee Architecture – Multi-surface fee system:
    • Execution-level: exchange fee (BPS), fee-on-top (flat)
    • Hop-level: LP fee, token hook swap fees, protocol hop minimum fees
    • Liquidity-level: hook fees on add/remove/collect (capped by maxHookFee0/1)

Reference Files

Key Constants

Skill frontmatter

user-invocable: false