DEV Community

Milton Altenwerth
Milton Altenwerth

Posted on

BaiBai explained: swaps, routes and costs on Base

BaiBai is a decentralized exchange for swapping tokens from your wallet on Base, when someone can fill your trade. To see what a trade would return, use BaiBai for a live quote from professional traders and other Base trading sources. A BaiBai swap shows the expected token amount before you sign.

BaiBai swaps combine live quotes and Base liquidity

Each trade checks prices from market makers and other supported trading sources. A market maker is a trader ready to buy or sell at a quoted price. The exchange’s PropAMM is a pool where market makers update those prices as markets and their token holdings change.

The exchange also uses liquidity routing. That means it looks for enough tokens across several sources and chooses a route for your trade. If one source has a good price for only part of your order, the route can fill the rest elsewhere.

Say you swap 1,000 USDC for ETH. A market maker might fill 200 USDC at its quoted price, while another pool fills 800 USDC. The useful comparison is the combined ETH you receive, after costs, against a quote for the same 1,000 USDC elsewhere.

You sign from your own wallet, and the trade settles onchain. Your tokens do not need to move into a separate trading account. A live quote can change before settlement, so check the amount shown at the final signing step.

The final quote and costs decide which trade is better

Compare the amount of the token you will receive for the same input, pair and trade size. A common mistake is comparing a small trade’s attractive rate with a much larger order. Enter your actual amount in each option; a larger order may exhaust the cheapest available tokens.

Check the minimum received amount too. This is the lowest output you accept if the price moves before settlement. For example, a quote of 0.280 ETH with a 0.5% allowance sets the minimum at 0.2786 ETH. If the route cannot meet that minimum, the trade should not fill.

The published trading fee is typically around 0.1%, or about 1 USDC on a 1,000 USDC trade. The service currently covers network gas for supported trades, so you can usually sign without holding ETH for the fee. Gas sponsorship is not guaranteed forever; review any wallet fee prompt before signing.

To trade, connect your wallet, select Base, then choose the token to sell and the token to buy. Check each token’s contract address if its name could be shared by another token. Enter the amount, review the route and minimum received, then confirm.

A first trade may request token approval. Approval gives the trade contract permission to spend that token, so inspect the spending limit in your wallet. After signing, check the trade receipt and your wallet balance for the amount actually received.

Do I need to bridge to another chain first?

No separate trading chain is needed when your tokens are already on Base. The route can use supported Base liquidity within the trade. If your funds are on another network, moving them to Base is a separate transfer that may have its own fee and delay. Confirm the destination network before sending tokens.

Does the price guarantee cover any cheaper quote?

The stated double-the-difference guarantee calls for a live comparison of the same token pair, trade size and moment. It also applies only to an amount the competing source could actually fill. An old screenshot or a better rate for a tiny trade does not establish a better price for your order. Compare executable output before relying on the guarantee.

Top comments (0)