Quick swap (BaiDEX UI)
- Open the BaiDEX UI on binibit.com (or BaiDEX subdomain when published)
- Connect your wallet (MetaMask, WalletConnect, Telegram-native wallet)
- Switch network to BiniChain
- Pick the pair (e.g., USBI → an Agent Token)
- Enter amount, view price impact and minimum out
- Confirm — pay BiniChain gas in BINI, receive output token
Swap via SDK (programmatic)
BaiDEX exposes the standard Uniswap V3SwapRouter02 interface. Use @uniswap/v3-sdk:
Swap via Solidity (on-chain integration)
Quote a trade (no swap)
Use the V3Quoter contract to get an expected output amount before swapping:
Multi-hop swaps
V3 supports multi-hop viaexactInput (encode path as a sequence of token addresses + fee tiers).
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
Approval requirement
Before any swap, the input token’sapprove() 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:| Swap type | Gas estimate |
|---|---|
| Single-hop within one pool | ~150,000 gas |
| Multi-hop (2 pools) | ~250,000 gas |
| Multi-hop (3 pools) | ~350,000 gas |
Related
AMM mechanics
V3 fork details
Fees
1.00% fee mechanics
Slippage & MEV
Protection settings
Contracts
Router and pool addresses
