Skip to main content
Pre-Release Documentation

This describes a pre-release version of LBAMM. Interfaces and behavior may change.

Verify the exact repository commit before building production integrations.

Errors

This page documents custom errors defined by the LBAMM Core contract.

Pool types, hooks, and transfer handlers may define additional custom errors.
Integrators should review those modules directly when handling revert cases.


General

  • LBAMM__ArrayLengthMismatch()
    Array parameters had mismatched lengths.

  • LBAMM__BytesLengthExceedsMax()
    Bytes length adjustment exceeded the maximum supported size ( > 2^32-1 ).

  • LBAMM__CallerMustBeSelf()
    A self-only function was called by an address other than the AMM itself.

  • LBAMM__Overflow()
    An arithmetic overflow occurred.

  • LBAMM__Underflow()
    An arithmetic underflow occurred.


Pool Creation

  • LBAMM__CannotPairIdenticalTokens()
    Pool creation attempted with token0 == token1.

  • LBAMM__InvalidPoolId()
    The provided poolId failed validation.

  • LBAMM__InvalidPoolType()
    The provided pool type address has an insufficient number of leading zero bytes.

  • LBAMM__LiquidityDataDoesNotCallAddLiquidity()
    Pool creation liquidityData did not encode an addLiquidity call.

  • LBAMM__PoolAlreadyExists()
    A pool with the same deterministic poolId is already initialized.

  • LBAMM__PoolCreationWithLiquidityDidNotAddLiquidity()
    Pool creation included liquidity data, but no liquidity was actually added.

  • LBAMM__PoolCreationWithNoCodeAtToken()
    Pool creation attempted where one of the token addresses had no code.

  • LBAMM__PoolFeeMustBeLessThan100Percent()
    Pool fee exceeded the maximum ( > 10,000 BPS ).


Swaps

  • LBAMM__ActualAmountCannotExceedInitialAmount()
    Pool type returned an actual input/output exceeding the initially specified amount.

  • LBAMM__CannotPartialFillAfterFirstHop()
    Multi-hop swap partially filled after the first hop.

  • LBAMM__DeadlineExpired()
    Swap deadline has passed.

  • LBAMM__InvalidExtraDataArrayLength()
    Extra data array length was invalid (e.g., per-hop hook data length mismatch).

  • LBAMM__InvalidPoolFeeBPS()
    Pool fee BPS was invalid - exceeds 10,000 BPS for swap by input or 9,999 BPS for swap by output.

  • LBAMM__InvalidPoolFeeHook()
    Dynamic fee sentinel was used without a valid pool fee hook (or hook invalid).

  • LBAMM__InvalidPoolId()
    The provided poolId(s) do not exist or resulted in a final input/output token that does not match the swap order.

  • LBAMM__LimitAmountExceeded()
    Output swap required more input than limitAmount allows.

  • LBAMM__LimitAmountNotMet()
    Input swap produced less output than limitAmount requires.

  • LBAMM__NoPoolsProvidedForMultiswap()
    Multi-hop swap was called with an empty route.

  • LBAMM__PartialFillLessThanFees()
    A partial fill (output-mode) was smaller than hook fees required.

  • LBAMM__PartialFillLessThanMinimumSpecified()
    Actual filled amount was less than minAmountSpecified.

  • LBAMM__PoolHookDataNotSupported()
    Pool hook data was provided but not supported for direct swaps.

  • LBAMM__RecipientCannotBeAddressZero()
    Swap recipient was address(0).


Liquidity

  • LBAMM__ExcessiveHookFees()
    Total hook fees exceeded maxHookFee0 and/or maxHookFee1.

  • LBAMM__ExcessiveLiquidityChange()
    Liquidity modification exceeded the configured maximum bounds.

  • LBAMM__InsufficientLiquidityChange()
    Liquidity modification did not meet the configured minimum bounds.

  • LBAMM__PoolDoesNotExist()
    A referenced pool does not exist when managing liquidity.


Fees

  • LBAMM__ExchangeFeeTransferFailed()
    Transfer of exchange fee to recipient failed.

  • LBAMM__FeeAmountExceedsInputAmount()
    Fee-on-top amount exceeded the swap input amount (input-mode).

  • LBAMM__FeeAmountExceedsMaxFee()
    Exchange Fee BPS exceeded the maximum allowed for the swap mode.

  • LBAMM__FeeOnTopTransferFailed()
    Transfer of fee-on-top to recipient failed.

  • LBAMM__FeeRecipientCannotBeAddressZero()
    Fee recipient was address(0) while a non-zero fee was specified.

  • LBAMM__InsufficientInputForFees()
    Input amount was insufficient to cover required fees.

  • LBAMM__InsufficientOutputForFees()
    Output amount was insufficient to cover required fees.

  • LBAMM__InsufficientProtocolFee()
    Pool type returned an invalid / insufficient protocol fee.

  • LBAMM__ProtocolFeeTransferFailed()
    Transfer of protocol fees failed.


Flashloans

  • LBAMM__CannotCollectFeesDuringFlashloan()
    Fee collection was attempted during a flashloan operation.

  • LBAMM__FlashloansDisabled()
    Flashloans are disabled (fee BPS configured above allowed max).

  • LBAMM__FeeTokenNotAllowedForFlashloan()
    Flashloan fee token was not allowed for the loan token.

  • LBAMM__FlashloanExecutionFailed()
    Flashloan callback did not return the expected value.

  • LBAMM__FlashloanFeeTokenCannotBeAddressZero()
    Flashloan fee token was the zero address.

  • LBAMM__InvalidFlashloanBPS()
    Flashloan fee BPS was invalid (exceeds supported range).


Transfer & Settlement

  • LBAMM__InputNotWrappedNative()
    Native value was provided but the input token was not wrapped native.

  • LBAMM__InsufficientValue()
    msg.value was insufficient for required wrapped-native payment.

  • LBAMM__InvalidTransferHandler()
    Transfer handler calldata was provided but did not decode to a valid address.

  • LBAMM__RefundFailed()
    Refund transfer (excess native value) failed.

  • LBAMM__TokenInTransferFailed()
    Transfer of tokenIn failed.

  • LBAMM__TokenOutTransferFailed()
    Transfer of tokenOut failed.

  • LBAMM__TokenOwedTransferFailed()
    Transfer of a token owed to a user failed.

  • LBAMM__TransferHookFeeTransferFailed()
    Transfer of a hook fee failed.

  • LBAMM__ValueNotUsed()
    msg.value was provided but not used.


Hooks & Token Settings

  • LBAMM__HookFlagsMissingRequiredFlags()
    Enabled hook flags did not include all required flags.

  • LBAMM__UnsupportedHookFlags()
    One or more enabled hook flags were not supported by the hook, or when clearing the token hook a non-zero packedSettings was supplied.

Limit Break

TwitterLimitBreak.comMedium

© 2026 Limit Break International, Inc. All rights reserved.

Privacy PolicyTerms of ServiceCookie PolicyDo Not Sell My Info