Skip to main content

Quick swap (BaiDEX UI)

  1. Open the BaiDEX UI on binibit.com (or BaiDEX subdomain when published)
  2. Connect your wallet (MetaMask, WalletConnect, Telegram-native wallet)
  3. Switch network to BiniChain
  4. Pick the pair (e.g., USBI → an Agent Token)
  5. Enter amount, view price impact and minimum out
  6. Confirm — pay BiniChain gas in BINI, receive output token

Swap via SDK (programmatic)

BaiDEX exposes the standard Uniswap V3 SwapRouter02 interface. Use @uniswap/v3-sdk:

Swap via Solidity (on-chain integration)

Quote a trade (no swap)

Use the V3 Quoter contract to get an expected output amount before swapping:

Multi-hop swaps

V3 supports multi-hop via exactInput (encode path as a sequence of token addresses + fee tiers).
Off-chain routers (1inch, Paraswap) integrate with BaiDEX as a V3 instance — they handle multi-hop automatically.

Slippage settings

Default slippage = 0.50%. For:
  • Tight liquidity pools (small Agent Tokens) → use higher slippage (1-3%)
  • Anchor wBINI/USBI pool → 0.10-0.50% works most days
  • Cross-pool routes → add per-hop slippage budget
See Slippage & MEV.

Approval requirement

Before any swap, the input token’s approve() must be called for the SwapRouter address. Standard ERC-20 approval flow. For repeat traders, the standard pattern is approve(spender, type(uint256).max) — but this gives the router unlimited approval for that token. Trade off security vs convenience.

Gas

Every swap pays gas in native BINI. Typical V3 swap gas: Multiply by current BiniChain gas price for the BINI cost.

AMM mechanics

V3 fork details

Fees

1.00% fee mechanics

Slippage & MEV

Protection settings

Contracts

Router and pool addresses