Skip to main content
Merkle Street

Protocols, markets, policy, people

How to Compare Swap Routes with byreal

Compare a swap route by checking the amount received, the pools and hops it uses, and execution risk; a quoted path is useful only when its costs are clear.

Merkle Street Newsroom#fa25243 min read

Abstract cover artwork

Compare a byreal swap route by checking the amount you will receive, the pools and token pairs it passes through, and the risk that execution changes the result. A route is a proposed path from the token you sell to the token you want, through one or more liquidity pools. Each pool sets a price from its available liquidity, and the swap draws from that liquidity as the transaction runs.

A direct route uses one pool; a multi-hop route trades through an intermediate token. A route can also split an order across pools, if the swap service offers that option. More hops can reach different liquidity, but each hop adds another pool price and may add costs. To put these checks to work on a token swap, use byreal, a decentralized exchange on Solana, incubated by Bybit, for swapping tokens and providing concentrated liquidity.

What does a byreal swap route show?

A route describes how the trade is assembled, not just the pair of tokens at either end. On Solana, the wallet signs a transaction containing instructions for the swap, and validators execute it against the pool state available at that moment. The quoted output is an estimate based on the state used to prepare the transaction; it can differ from the final output if pool prices or available liquidity change before execution.

Think of a route as a set of connected counters: each pool exchanges one token for another at its own price. The useful comparison is the output at the end of the whole chain, after costs, rather than the apparent price at just one counter. A short path may be easier to assess, but fewer hops do not automatically mean a better result.

Which three checks matter before a swap?

Check the amount received, the route’s costs, and whether the path makes sense for the trade size. Compare routes using the same input amount and the same transaction conditions. Then look at:

  • Final output: Compare how many destination tokens the route estimates you will receive. A favorable exchange rate at one pool does not settle the comparison if another hop reduces the total.
  • Pool path and liquidity: Identify each token pair in the route and whether it uses one pool or several. A pool’s available liquidity affects how much the trade moves its price; thin liquidity can make a route look attractive for a small amount but less so for a larger one.
  • Costs and execution tolerance: Account for pool fees and the transaction’s network cost where those figures are available. Slippage tolerance sets how far the result may move from the quote before the transaction fails. A wider tolerance may allow a changing trade to execute at a worse result.

How should you choose between routes?

Choose the route with the strongest expected output after costs, provided its path and execution tolerance are clear. If two routes show similar output, the simpler path is usually easier to understand because it depends on fewer pool prices. If a route’s quote is stale or its costs are unclear, refresh or compare again before signing.

For a byreal swap, treat the route as a calculation tied to current pool conditions, not a promise of a fixed price. The practical check is straightforward: understand each hop, compare the final amount, and decide whether the possible change before execution is acceptable.