app

How to choose slippage for a BaseSwap swap

For a small swap in a deep Base pool, start with 0.5% slippage and keep it there unless the trade cannot clear. Raise the limit only after checking the pool and token, because a higher setting can let the swap complete at a worse price.

What does a slippage limit protect?

A slippage limit sets the worst output you will accept; it does not guarantee that output. If your quote is 100 tokens and tolerance is 0.5%, the transaction’s minimum output is 99.5 tokens. If the transaction would return less, it reverts instead of swapping.

That limit is separate from price impact, the price change caused by your own trade against the pool. Ethereum.org explains that automated market makers price trades using the changing ratio of assets in a pool. A large order relative to the pool can therefore have high price impact even when the market has not moved.

BaseSwap lets you compare the quoted output with your minimum before signing, helping you spot a stale or unexpectedly poor quote. A transaction can still fail if another trade changes the pool before yours is included. Setting tolerance very high may avoid that failure, but it also permits a worse fill and can make the trade more exposed to sandwich attacks, where trades are placed around yours to worsen its price.

How do you set and check the limit?

Use this sequence for an occasional swap; the percentage is a starting point, not a promise of execution.

  1. Check the quoted output. Note the amount of the token you expect to receive and the network fee shown in your wallet. Don’t confuse the fee with slippage: the fee pays for processing, while slippage limits the swap’s execution price.
  2. Start at 0.5% for a liquid pair. For example, if a quote is 20 tokens, 0.5% gives a minimum of 19.9. The swap fails if its output falls below that threshold.
  3. Check the pool and token if the quote looks poor or the swap fails. Look at the pool’s liquidity, the size of your trade relative to it, and whether the token has transfer rules that affect received amounts. These can explain a high price impact or a quote that does not match the final output.
  4. Adjust only for a reason. If the quote is otherwise acceptable but the pool is moving quickly, try a modest increase, such as 1%, then check the new minimum. If the required tolerance is much higher, reduce the trade or wait for conditions to change rather than accepting an output you would not choose deliberately.
  5. Review the confirmation before signing. Confirm the token, amount, minimum output, and network. If the displayed minimum is below what you are willing to receive, cancel and revise the trade.

Keep the lowest tolerance that lets a reasonable trade clear; if a small swap needs a much higher limit, investigate the quote before proceeding.