Skip to main content

How does a token swap find the best price, and what does it cost?

· · 10 min read
BlockTrader365

On Base, BT365 compares pool quotes for your trade size. If both routes exist, the two-step quote must beat the direct quote by more than 0.5%. You sign from your own wallet, and a direct swap settles in one transaction. The confirmation shows the fee. Your slippage setting determines the least you will accept.

This article covers how the route is chosen, which chains and exchanges are used, what it costs, how slippage protection works, and what the swap contract can and cannot do.

How does a token swap find the best price?​

On Base, the same pair of tokens often trades in several pools: Uniswap V2, V3 and V4, and Aerodrome, each with different fees and depth. The price you get depends on which pool, and on your size.

BT365 reads on-chain quotes for your trade size. On Base it checks two kinds of route:

  • Direct: your token straight into the one you want, in each pool that holds the pair.
  • Two steps: through a common token in between. On Base the in-between tokens are USDC, WETH and USDT.

Routes are ranked by how much you would receive. Two routes within 0.1% of each other count as a tie, and the tie goes to the one with less price impact, then less gas.

When do two steps pay off? If the steps run as separate swaps, the second swap adds a second BT365 fee. On Base, when a direct route exists, the two-step quote must beat it by more than 0.5%. On the web, some Robinhood Chain routes run both steps in one swap and must beat an available direct quote by more than 0.15%. On the web and Android, TRON uses the path with the highest quoted output. On Solana, Jupiter can run both steps in one transaction on the web and Android.

Which chains can you swap tokens on with BT365?​

The swap screen lists every chain open to you. The main ones:

ChainWhere the trade goesThrough a BT365 swap contract
BaseUniswap V2, V3, V4; AerodromeYes
EthereumUniswap V2, V3Yes
ArbitrumUniswap V3Yes
Solana (web and Android)JupiterNo; Jupiter's own program
TRON (web and Android)SunSwap V2Yes

On the EVM chains every swap passes through a BT365 swap contract rather than going to the exchange's router directly. That contract is what collects the fee, enforces your minimum and pays the output to you.

What is the fee on a BT365 swap?​

0.35% of the swap's value, lower on most routes while a referral discount is active. On the EVM chains it is paid in the chain's native coin, on top of the trade, not taken out of the tokens you receive. These web examples use the standard rate and assume the contract minimum is lower than the fee shown. In the app, check the fee details before signing. On Android’s Solana screen, the BT365 fee amount, when shown, is an upper estimate.

You swapFeeYour wallet sends
1 ETH for a token1 × 0.35% = 0.0035 ETH1.0035 ETH
1,000 USDC for ETH, both worth $1,0000.35% of $1,000 = $3.50, in ETH1,000 USDC, plus $3.50 of ETH

Two-step routes. When a route runs as two swaps, each swap pays the fee on its own value. On the web and Android, a two-step TRON or Jupiter swap pays the fee once. The same applies to Robinhood Chain routes that the web executes in one transaction.

A token with no price. On most EVM chains, if only the token you receive has a price, the fee is worked out from its value and capped at the value of 0.0005 ETH, though the swap contract's own minimum fee still applies.

What else you pay. Each pool charges its own fee, which is already in the quote, and you pay the chain's gas. On Solana the 0.35% is taken by Jupiter as a platform fee on the trade itself.

What does slippage tolerance do in a swap?​

Between your quote and the moment your transaction is included, other trades can move the pool. Slippage tolerance is how much worse you are willing to accept.

  • It becomes a hard minimum. The swap contract receives a minimum output equal to the quote less your tolerance. If the swap would pay less, it cannot settle. A swap that reverts on-chain can still cost gas. If you paid TRX to rent energy for a TRON swap, that payment is spent too.
  • Default 0.5% on the web. You can set up to 10% there; the apps cap it lower. The web and the Android EVM and Solana swap screens flag slippage above 1%. The Android TRON screen shows the percentage. On the web, zero falls back to 0.5%. On Android, zero is rejected and your previous setting stays active.
  • Two-step routes made of two swaps have a minimum on each step. Each step is held to your tolerance, and the last step must also deliver at least the route's quoted final output less your tolerance. If the second step would pay less, it reverts and you keep the in-between token, such as USDC. On TRON, and on some Robinhood Chain routes on the web, both steps run as one swap with one minimum for the final output; if it reverts, you keep the token you sold.

On the web, two more warnings appear before you confirm:

  • "High price impact" when your trade would move the price by more than 3%, shown in red above 5%.
  • "Suspicious price — swap blocked for your safety." when the quoted output is worth more than 100 times the input, a sign of a broken or manipulated pool. In the Android app this block applies to Solana swaps.

If an EVM token has a reported buy or sell tax above zero, the web swap screen shows the rate for the side you’re trading. Supported Android token pages show the buy and sell tax when both are known. A missing flag does not mean the token has no tax. The swap contract measures what actually arrives rather than trusting the token's stated amount.

Who holds the tokens during a swap?​

You do, until the swap settles. It is signed from your own wallet, whether that is your BT365 wallet or one you connected.

  • Exact approval. When the swap needs a token approval, you approve the swap contract for the amount you are selling.
  • One transaction per swap. The contract takes that amount, sends it to the pool, and pays the output straight to your address in the same transaction. Nothing waits in a BT365 account in between.
  • Where the fee goes. To BT365's fee wallet. The contract's owner can sweep any balance left in the contract to that wallet and can upgrade the EVM swap contracts; the TRON contract cannot be upgraded.

What is a limit order, and how is it different?​

A limit order on BT365 waits until a price you set is available and then swaps. It is on Base: on the web under the "Limit" tab, and in the Android app on a token's page. The iOS app does not offer limit orders.

  • You approve the Permit2 contract for the token once, for an unlimited amount, then sign each order. A relayer executes it when the price is met, through the exchanges' own routers.
  • The fee is 0.35%, taken from the token you sell rather than paid on top.
  • An order expires after one day, one week, one month or one year, as you choose.

Where this stops​

  • Not every pair has a route. Outside Base and Solana a pair needs a listed pool, and a pair with no liquidity returns no quote.
  • No front-running protection is added. BT365 sends swaps through the normal network path; your slippage minimum is the protection against the price moving before your swap lands.
  • Not every region. Spot swaps are not available in some regions, and some stablecoins cannot be swapped in some regions.
  • One chain only. A swap from one chain to another is a cross-chain swap: How does a cross-chain swap work, and what do you actually sign?

BT365 is not available in every jurisdiction, and nothing on this page is investment advice. Trading perpetual futures and prediction markets carries risk of loss.