The configuration between intent and calldata.
This page documents the current frontend constants that materially influence routes, quote validation, approvals, and user-visible behavior.
Network and wallet
| Setting | Current value |
|---|---|
| Supported chain | BNB Smart Chain mainnet |
| Chain ID | 56 |
| Native gas token | BNB |
| Wallet UI | RainbowKit |
| Client stack | wagmi + viem |
| RPC strategy | Optional primary RPC plus ordered public fallback list |
Swap defaults
| Setting | Value |
|---|---|
| Default input / output | BNB → BBKFI |
| Default slippage | 30 bps / 0.3% |
| Presets | 0.3%, 0.5%, 1% |
| Maximum slippage | 50% |
| Default deadline | 300 seconds |
| Medium price impact | 3% |
| High price impact | 5% |
| Blocked price impact | 15% |
| V2 LP fee assumption | 25 bps per hop |
| 1inch partner fee | 15 bps / 0.15% |
Curated swap assets
The initial list includes BNB, BBKFI, WBBK V2, BUSD, USDT, ETH, WBNB, and deprecated WBBK V1. BFIRE is included as an extra searchable project asset. The modal then merges the Trust Wallet BSC token list and can resolve custom contract metadata.
Inclusion in a token list is metadata, not due diligence. Always verify token contracts and liquidity.
Route selection
V2 candidates
Direct paths and routes through configured base assets are quoted on BitBlocks and PancakeSwap routers in parallel.
V3 candidates
Common PancakeSwap V3 fee tiers are probed, with spot information used to estimate price impact.
1inch candidate
The optional provider is included only when its public feature flag is true; server routes still require an API key.
Winner
Successful quotes are sorted by raw output. The selected route supplies the execution and allowance-spender address.
URL parameters
The swap screen accepts:
| Parameter | Purpose |
|---|---|
buyToken=0x… | Prefill the output asset; input defaults to BNB unless buying BNB |
tokenIn=0x… | Prefill the input asset |
amountIn=1.25 | Prefill a decimal exact-input amount |
Liquidity routes also support pair-prefilled add URLs and address-based removal URLs generated by the interface.
Approval paths
- Swap detects EIP-2612 support, signs typed data, then submits
permitto the token on-chain with maximum allowance and a one-hour deadline. - Standard swap approval targets the selected router or 1inch spender.
- Adding liquidity approves the BitBlocks liquidity router for both ERC-20 sides.
- Removing liquidity can sign a V2 LP permit; the router call must reuse the permit deadline.
- MasterChef approval targets the MasterChef contract.
- SmartChef approval targets that individual pool address.
Live data disclaimer
Contract addresses and hard safety thresholds belong in version-controlled configuration. Quotes, balances, allowances, reserves, pool state, APR, token prices, provider availability and transaction receipts are live data. Consumers should not cache the latter as if they were protocol constants.