Traderjoexyz

Traderjoexyz Liquidity Book - Bin Selection and Liquidity Shapes

Updated

Traderjoexyz Liquidity Book lets liquidity providers choose fixed-price bins and distribute deposits across them to define a trading range. A position earns swap fees when trades use its funded bins. Bin spacing, allocation shape, and token composition determine which price movements the deposit can serve.

Trader Joe adopted the LFJ brand in September 2024; Liquidity Book remains the name of its bin-based automated market maker (AMM).

Bin placement for trading and token conversion

Bin placement determines where swaps can use your deposit and whether it starts with one token or both. Each bin holds liquidity at a fixed exchange rate. The active bin is the pool's current trading price. A spread of funded bins can support trading as that price moves through the range. A deposit on one side can aim to exchange tokens when trading reaches those prices.

The pair labels its assets token X and token Y. With prices expressed as Y per X, bins above the active bin contain X, and bins below it contain Y. As trading pushes price upward, X liquidity trades into Y; downward movement converts Y liquidity into X. Each selected price therefore determines where inventory can change, even when the initial deposit contains only one asset.

Pool identity and deposit limits

An existing pool fixes the token pair, bin step, and contract version your position uses. Confirm token addresses and quote direction before choosing prices. Liquidity management needs the matching router: the V2.2 LBRouter manages V2.2 pairs, while older pairs need their compatible router. Deposit settings include minimum amounts actually added and an allowed active-bin movement. These constraints govern the addition transaction. A wallet's token approval alone doesn't create a funded position.


How does bin step change a selected price range?

Bin step sets the percentage distance between neighboring bins, so the same number of bins covers different price intervals in pools with different steps. It belongs to the pool configuration. Choosing a distribution within an existing pool doesn't change that pool's spacing.

Price spacing

Adjacent prices

Bin spacing uses basis points, with one basis point equal to 0.01%. If s denotes the pool's bin step in basis points, the next higher bin's price equals the previous price multiplied by (1 + s/10,000). This multiplier describes a relative increase, so the absolute price gap grows at higher prices.

Range endpoints

A range spanning n gaps between its lowest and highest bins has an endpoint price ratio of (1 + s/10,000)^n. A contiguous selection has one fewer gap than bins. Read the endpoint prices as well as the bin count. Comparing counts alone can hide substantially different coverage between pools.

Traderjoexyz Liquidity Book - How does bin step change a selected price range?
How does bin step change a selected price range?

View full-size image


Which liquidity shape fits the prices you want to fund?

Spot suits an even allocation, Curve concentrates around a central price, and Bid-Ask targets fluctuations within the funded interval. Each liquidity shape assigns deposit amounts across selected bins. Range width and allocation are separate choices. Positions can share the same endpoints while committing different amounts to the prices between them.

Spot allocation

Spot distributes liquidity uniformly across the chosen range. Widening that range divides a fixed deposit among more bins, leaving a smaller allocation at each level. This supports more price locations while reducing the capital concentrated at any particular one. A narrow Spot range concentrates that same capital across fewer prices.

Curve allocation

Curve concentrates more liquidity around a central price and distributes a portion through surrounding bins. This supports heavier participation near the center with lighter allocations elsewhere. Price movement toward the edges reaches smaller allocations. The central price you choose therefore matters alongside the overall width of the range.

Bid-Ask allocation

Bid-Ask places larger allocations in bins farther from the active price to target fluctuations within the chosen interval. Its effectiveness depends on trading reaching the prices where the shape places liquidity. A quiet price or a move outside the range can leave much of the allocation idle. This shape requires reassessment when market activity shifts away from its funded prices.

Custom distributions can combine shapes and weight individual bins. A familiar shape name doesn't guarantee suitable exposure or prevent divergence loss.

What if the active bin moves before you add liquidity?

The V2.2 router rejects a liquidity addition if the active bin moves beyond its submitted bin-ID tolerance. The activeIdDesired parameter records the expected active bin, and idSlippage sets the permitted deviation. These settings apply to adding liquidity; swap slippage limits govern a different operation.

In this hypothetical case, a deposit draft would fund the active bin and neighboring bins. Trading moves the active bin beyond the draft's allowed movement before submission. No liquidity-addition transaction has been signed or submitted, so revising the draft moves no pool reserves.

The provider refreshes the active-bin reading, sets the draft's expected active-bin ID to that reading, and revises the relative bin offsets and token allocations. The new draft includes the active bin, respects token placement on each side, and retains a deliberate movement bound. Only after reviewing that revised distribution does the provider sign and submit the addition.

In this case, the transaction succeeds and the recipient's LBToken balances increase for the deposited bin IDs. These balances record liquidity shares at specific prices. A fresh active-bin reading matches a funded ID, confirming that the position is in range at that moment. Later trades can move the active bin again.


Swap-fee participation and pool activity

Swap-fee income requires trades to use liquidity you've actually funded. Only liquidity in the active bin earns swap fees. Your share also depends on your ownership of that bin's liquidity. A position can sit inside its overall endpoints while allocating little to the price currently trading. The pool's configured base and variable fees influence income from those trades. A fee estimate for the whole pool doesn't describe the allocations of an individual position.

Inventory changes and rebalancing limits

Price movement changes the token mix as traders exchange against funded reserves. A position entirely below the active price holds Y; one entirely above holds X. Keeping that inventory may serve a deliberate conversion strategy. Moving liquidity toward the active price changes which exchange rates the remaining assets can serve.

Rebalancing reallocates liquidity, often through withdrawals from selected bins and deposits elsewhere. It can also involve swapping tokens to obtain the required mix. Gas and associated swap costs reduce the value available for the new allocation. Keeping earned fees in a bin doesn't move its funded price. A directly managed position won't automatically follow a moving market.

Divergence loss is the shortfall caused by the changing token mix relative to holding the initial tokens. Concentration can amplify that exposure. A wider range spreads liquidity across more prices, but no allocation shape eliminates inventory risk. Changing the range doesn't erase inventory losses or previous transaction costs.

Traderjoexyz Liquidity Book - common questions

Are Liquidity Book positions represented by ERC-721 NFTs?

Liquidity Book represents direct positions through LBToken balances for individual bin IDs, rather than ERC-721 NFTs. Shares within the same bin of the same pair are fungible. Different bin IDs represent different price locations. LBToken has a multi-token design similar to ERC-1155, with implementation differences, so an integration must support the actual receipt contract.

Why can an active-bin deposit incur a composition fee?

An active-bin deposit can incur a composition fee when its token proportions differ from the bin's existing composition. In V2.2, this mismatch creates an implicit swap effect the contract charges for. The calculation uses the effective deposited amounts and the pool's fee parameters. Depositing at the active price therefore doesn't establish that a particular token mix has no composition cost.

Which bin IDs does liquidity removal use?

Liquidity removal uses absolute bin IDs identifying the funded prices, while additions can specify offsets relative to the active bin. Removal amounts describe LBToken shares to burn, not quantities of the underlying tokens. The returned assets come from those shares' portion of the selected bins' reserves. Minimum token-output settings can reject a withdrawal whose returned amounts fall below the submitted bounds.

Where do tokens left over after adding liquidity go?

A V2.2 liquidity addition returns unused tokens to its configured refund recipient. The router distinguishes amounts actually added from amounts left over. Liquidity receipts go to the configured position recipient, which can differ from the refund recipient. The deposit budget alone doesn't establish the position's size; LBToken balances record the liquidity shares credited at each funded bin.

How do token decimals affect the price of a chosen bin?

Token decimals determine how a raw-unit bin price converts into a price expressed in whole tokens. In V2.2, after decoding the fixed-point price, multiply it by 10 raised to the difference between token X decimals and token Y decimals. The adjusted price expresses Y per X. This conversion doesn't change the bin's reserves or the pool's bin step.

When can an inactive bin still earn incentive rewards?

An inactive bin can earn Concentrated Incentives rewards if an enabled pool's configured reward range includes it. That range moves with the active bin, and eligible liquidity shares the rewards proportionally. Swap-fee eligibility follows the active bin separately. A range suitable for trading participation may therefore differ from the eligible reward range, and incentive availability depends on the particular pool's active program.

Are LFJ Auto-Pools still rebalancing positions on Avalanche and Arbitrum?

LFJ's Auto-Pools on Avalanche and Arbitrum have been sunset, and their automated rebalances are no longer active. They were a separate liquidity-management layer over Liquidity Book. Existing holders can claim remaining funds through the pools interface. Withdrawal returns a proportional share of the current asset composition, including accrued fees. It doesn't restore the original deposit mix.

Could a wide liquidity range require multiple addition transactions?

A wide distribution can require multiple addition transactions because populating many bins increases execution gas. The usable batch size depends on the deployment's gas constraints and the interface's batching support. A successful transaction can therefore fund only part of a planned distribution. The bin IDs and deposited allocations establish which portion exists; a single confirmation doesn't establish that every planned batch completed.