Docs Swap
Routes and prices
How a swap is routed, and how to read price impact, slippage and Min received.
Carbium Swap at https://dex.carbium.io finds a route for your swap. The swap card shows the rate, the price impact and the minimum you receive before you sign. A quote is an estimate and can change before your transaction lands.
How a swap is routed
Carbium Swap routes your swap through liquidity pools on Solana that third parties run. A route can go straight from one token to the other, pass through other tokens on the way, or split across several pools.
Reading the route
The bottom of the card shows the rate as "1 A ≈ N B" for your two tokens.
The same area has a badge with a number and Market. The number is how many steps the route has. A step is one swap through one pool. Press the badge to open the route panel.
The route panel draws the route:
- The token you pay with and the token you receive sit on the top row.
- Tokens the route passes through sit below them.
- Each step shows a venue label and a percentage. When the route splits, the percentage is the share that goes through that pool.
Press a token to open it on Solscan. Press a step to open its pool on Solscan. Close the panel with the X, the Esc key or a click outside it.
Hover the fee label on the card to see:
- the router fee
- "Network (≈)", an estimate of the network fee
- "Hops", the number of steps
Fees are on Fees.
Price impact
Once you enter an amount, the card shows the route's price impact as a percentage, next to the dollar value of what you receive. It turns red when the impact is high.
The card shows a dollar value with each amount and compares the two.
| When | What the card does |
|---|---|
| The price impact or the gap in dollar value is high | Pressing SWAP opens a dialog first. It reads "High Price Impact" or "High Price Difference" and warns that funds may be lost. Press Confirm to continue, or close the dialog. |
| The price impact is higher still | Pressing SWAP does not send the swap. The card shows a message that starts "High price impact" and asks you to change your inputs. |
| The gap in dollar value is higher still | The button reads "Volatility risk" and cannot be pressed. |
Slippage tolerance and Min received
Slippage tolerance is how far the price may move against you between the quote and the moment your swap lands.
To set it:
- Press the Settings icon at the top of the card to open the Slippage tolerance panel.
- Pick a preset, or type a value under Custom and press Save.
The panel highlights the preset in use and shows "High slippage, proceed with caution" when the value is high. The setting is kept in your browser.
Min received on the card is the floor for the current tokens, amount and slippage tolerance. It shows "-" until there is a quote for exactly those inputs. If the swap would return less than this amount, it does not go through.
Quote refresh
While an amount is entered, the card refreshes the quote on its own every few seconds. The ring at the top of the card counts down to the next refresh. Press it for a new quote at once.
Changing the amount, a token or the slippage tolerance also gets a new quote. The button can read "Updating quote..." while it loads.
The card stops refreshing while its browser tab is in the background and refreshes when you return.
If the button reads "No route for this pair", try a different amount or token. If it reads "Service issue, retrying...", the card retries by itself. The other messages are on Troubleshooting.
Developers: the quote and swap API is documented at carbium.sh/docs.