Traderjoexyz

Traderjoexyz uses slippage limits to bound the output of exact-input swaps

Updated

Traderjoexyz, previously branded Trader Joe and now LFJ, lets you adjust swap slippage tolerance; an exact-input swap can revert if output falls below its minimum amount. A wider tolerance accepts a lower floor for the same quote. Liquidity, trade size, and routing still determine the swap's execution conditions.

For the same exact-input quote, wider slippage tolerance lowers the minimum output without improving the route's liquidity.

Quotes, minimum output, and route selection

A swap quote estimates output for a selected input amount and route, while the minimum output defines the lowest acceptable execution amount. For an exact-input quote, a percentage allowance reduces the quoted output to a minimum token amount. Token-unit rounding affects the integer amount the contract receives.

LFJ's Meta-Aggregator compares routes from multiple aggregators and lets you inspect or select an available route. A different route can change the quote, pool fees, and execution conditions. Compare routes using the same input amount and output token, then review the corresponding minimum output. A route with a higher quoted return can still face changes before execution.

For Liquidity Book routing, LBQuoter supplies amounts, pool versions, and fee information for a proposed token path. Its quote helps construct a swap; it doesn't reserve liquidity.

Trade size and liquidity at the active price

Liquidity Book swaps consume liquidity at fixed-price bins and may cross into another bin when the available reserves can't satisfy the amount. That movement can affect the quote before submission. Price impact describes the trade's own effect on price; slippage concerns the difference between expected and executed output. Reducing an input amount can reduce pressure on that liquidity, although other trades can still change execution conditions. Raising tolerance adds no reserves to a bin.

What changes when slippage tolerance increases?

For a new exact-input swap, higher tolerance lowers the output floor for an unchanged quote, allowing a larger adverse deviation during execution. It can prevent a rejection caused by that floor, provided the swap meets its other requirements. A swap can succeed close to the new minimum, so compare that amount with the delivery you intended.

A tighter tolerance narrows the acceptable deviation. Even a small adverse change can then cause a revert if the final output misses the submitted floor.

A fresh quote can change the floor even when the percentage stays the same. If the quoted output falls, applying the same tolerance produces a lower minimum. Refreshing a quote therefore requires another look at the acceptable token amount. The percentage alone doesn't preserve an earlier exchange rate. Price impact already reflected in the quote remains separate from changes between quoting and execution.

In the LFJ DEX swap interface, enabled Safe Mode blocks swaps with price impact above 5%. Increasing slippage tolerance doesn't disable this separate guard. Turning off Safe Mode removes that interface barrier; it doesn't improve the quote or waive the router's amount bound. This interface threshold isn't a universal limit imposed on every aggregated route or router call.

Before accepting a lower minimum output

An exact-input swap's insufficient-output error means it couldn't meet its submitted floor, while a refreshed quote describes a later liquidity state. Compare the original bound with the new quote for the same input and output tokens. Changing tolerance makes sense only while the newly permitted output remains acceptable for that trade.

  • If the fresh quote already offers unacceptable output, reconsider the input amount or an available alternative route.
  • If price impact is high, compare a smaller input before widening the permitted quote deviation.
  • If the failure identifies insufficient output, judge the proposed minimum in output-token units.
  • If a token deducts transfer fees, check whether the selected route supports that behavior.
  • If execution can wait for a chosen price, consider a supported terminal limit order.

Limit orders for a target exchange rate

LFJ terminal limit orders let a trade wait for onchain liquidity at a chosen price, with partial fills and a selected expiry. The aggregator monitors liquidity capable of meeting the order's price. A market price touching the target doesn't establish enough liquidity to fill the whole amount. When only part of the order has matching liquidity, a partial fill can leave a remainder outstanding.

LFJ terminal limit orders deduct a 1% platform fee from the output when they execute. A fill at the chosen exchange rate therefore delivers fewer tokens than its gross quoted output. The applicable order fee belongs in any comparison with a market swap's expected delivery.

An unfilled order stops executing after its selected expiry. Users must manually claim funds from expired unfilled orders, so expiry alone doesn't complete the return of funds.

Swap-method limits in LBRouter V2.2

LBRouter V2.2 supports exact-input and exact-output methods, which constrain different sides of the trade. These contract capabilities don't establish which method every interface or aggregated route uses.

Amount bounds

Fixed input

An exact-input method fixes the amount sent and allows the output to vary at or above its floor. The V2.2 swapExactTokensForTokens method reverts if its computed final output is below amountOutMin. The guard constrains the final output of the complete path, which can include several pool swaps within the router call.

Visual outline: Traderjoexyz - Fixed input
Diagram: Fixed input.

View full-size image

Fixed output

An exact-output method targets the output amount and limits the input required to obtain it. In swapTokensForExactTokens, amountInMax caps that input. If the required amount exceeds the cap, the router reverts. Increasing this cap permits greater input spending for the same output target.

Transfer-fee support

Some token contracts deduct fees during transfers, changing how much the recipient receives. The method swapExactTokensForTokensSupportingFeeOnTransferTokens measures the recipient's output-token balance increase and checks it against amountOutMin. That check includes deductions the output token makes on delivery. An ordinary method's computed swap output can differ from the recipient's net increase when the output token charges a transfer fee. A wider tolerance doesn't establish token compatibility; the chosen swap method must support the transfer behavior.

Failures beyond the slippage bound

LBRouter swaps can fail on deadlines, token-path requirements, or spending permissions even when output would satisfy the amount bound. An insufficient-output error identifies a particular failed check. A generic wallet error doesn't establish that slippage caused the rejection, so changing the percentage without identifying the failed requirement can leave the cause untouched.

An ERC-20 input needs sufficient balance and spending authorization for the contract drawing those tokens. Increasing an exact-output swap's input cap doesn't expand that authorization. The allowance must cover the input the swap actually uses. Path errors concern the route's token addresses, pool versions, or required structure; tolerance doesn't correct those inputs.

A swap rejected before broadcast incurs no onchain execution fee for that attempt. An included EVM transaction that reverts still costs the gas its execution consumed.

LBRouter rejects execution when the block timestamp exceeds the submitted deadline. Output can meet its amount bound while timing fails. Changing slippage can't extend the deadline in a submitted call. The router reports this separate failure as LBRouter__DeadlineExceeded.

Still wondering about Traderjoexyz?

Does changing slippage in the interface update a swap already submitted?

Changing the interface setting doesn't alter an already submitted EVM swap transaction. Its signed input data contains the original amount bound. A different bound requires a separately authorized transaction. Editing the percentage also doesn't cancel the pending transaction, which may still execute under its original conditions.

Is slippage tolerance an additional fee on Traderjoexyz?

Slippage tolerance defines an acceptable deviation from the quote, not an additional fee. Raising it doesn't automatically deduct that percentage from the swap. Pool fees, any applicable platform fee, and network gas have separate charging rules.

Can an exact-input swap receive more than its quoted output?

An exact-input swap can return more than its quote if execution conditions improve. Its minimum-output bound sets a floor without capping favorable output. This applies to the fixed-input method's swap result; token transfer deductions can still affect the net amount the recipient receives.

What token units does amountOutMin use?

amountOutMin uses the output token's integer base units. A displayed token amount requires conversion using that token's decimal precision before a direct router call. Input and output tokens can use different precision. ERC-20 makes the decimals method optional, so an integration shouldn't assume every token exposes it.

How does the output minimum relate to the tokens' later market value?

A swap's minimum output constrains token quantity at execution, without fixing the tokens' subsequent market value. Later market prices determine what those tokens can buy or sell for.