Type: DLMM (Liquidity Book) | Docs: docs.traderjoexyz.com
Overview
LFJ (formerly Trader Joe) implements the Liquidity Book model - a Discrete Liquidity Market Maker (DLMM) that organizes liquidity into discrete price bins. Within a single bin, trades execute at a constant price with zero slippage. Bin sizes are defined by thebinStep parameter (in bps), allowing LPs to control their price exposure granularity.
Functions
getLFJPools()
Returns all active LFJ Liquidity Book pairs on Monad. ReturnsgetLFJPrice()
Returns the spot price for a token pair from the best LFJ pair. Parameters
Returns
number. price of tokenA in units of tokenB from the active bin.
getLFJPairCount()
Returns the total number of LFJ pairs deployed on Monad. Returnsnumber. count of all LFJ LB pairs.
getLFJPairsForTokens()
Finds all LFJ pairs for a specific token combination across all bin steps. Parameters
Returns
LFJPool[]. all pairs matching the token combination, sorted by liquidity.
LFJ pairs with smaller
binStep values (e.g. 1-5 bps) are suitable for stableswap-like pairs. Pairs with larger bin steps (20-100 bps) are better for volatile asset pairs.