Swap / DEX·Avalanche · Arbitrum · BNB Chain · Ethereum · Monad
LFJ (formerly Trader Joe)
Avalanche-origin DEX rebranded from Trader Joe to LFJ. Liquidity Book (DLMM) replaces traditional bonding curves with discrete price bins, giving LPs zero-slippage trades within a bin and configurable, asymmetric liquidity shapes. Now multi-chain across Avalanche, Arbitrum, BNB, Ethereum, and Monad.
- 01Avalanche-native token swaps
- 02DLMM bin-based concentrated liquidity
- 03auto-pool yield strategies
- 04Token Mill launches
- 05meta-aggregated multi-chain routing
- pnpm add @traderjoe-xyz/sdk-v2 viem
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_AVALANCHE_RPC_URL | Client | Avalanche C-Chain RPC URL used to query LFJ Liquidity Book pairs and the LBRouter. |
Use LFJ for swaps and LPing via Liquidity Book (DLMM). Quote and execute swaps through the `LBRouter` (Avalanche: `0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30`) using `getSwapOut(pair, amountIn, swapForY)` and `swapExactTokensForTokens(amountIn, amountOutMin, pairBinSteps[], tokenPath[], to, deadline)` — paths require both the token list and the per-hop `binStep`. With `@traderjoe-xyz/sdk-v2` use `RouteV2`, `TradeV2.getTradesExactIn`, and `TradeV2.swapCallParameters` to encode multi-hop routes. LB pairs are identified by `(tokenX, tokenY, binStep)`; liquidity is added per-bin via `LBRouter.addLiquidity` with a distribution array (`distributionX`/`distributionY`/`deltaIds`) defining the shape (spot, curve, bid-ask).
- ⚑DLMM liquidity is per-bin, not range-based — out-of-range bins earn nothing and a sharp move can leave 100% of your liquidity in the wrong asset (impermanent loss is realized as inventory).
- ⚑A pair is `(tokenX, tokenY, binStep)`; the same token pair with different bin steps (e.g. 10 vs 25) are completely different pools with different liquidity — always pass the matching `binStep` in the route.
- ⚑Rebrand: imports are still `@traderjoe-xyz/sdk-v2` but docs, frontends, and contract owners are at `lfj.gg` / `lfj-gg` GitHub org — old links to traderjoexyz.com 301-redirect.
- ⚑Auto-pools (Vault strategies) re-balance for users but charge management + performance fees and can underperform during one-sided trends — read the strategy before depositing.
- ⚑MEV: very tight bin steps (1bp) behave like CEX order books and are sandwich-friendly on slow chains; quote with `getSwapOut` immediately before sending and pass tight `amountOutMin`.
- ⚑JOE token + sJOE staking still exists post-rebrand; rewards are claimable from the `sJOE` contract but veJOE was deprecated — don't follow outdated tutorials referencing veJOE boost.