Skip to Content
Protocol referenceFrontend reference
Protocol reference · Interface

The configuration between intent and calldata.

This page documents the current frontend constants that materially influence routes, quote validation, approvals, and user-visible behavior.

Next.jswagmi + viemRainbowKit

Network and wallet

SettingCurrent value
Supported chainBNB Smart Chain mainnet
Chain ID56
Native gas tokenBNB
Wallet UIRainbowKit
Client stackwagmi + viem
RPC strategyOptional primary RPC plus ordered public fallback list

Swap defaults

SettingValue
Default input / outputBNB → BBKFI
Default slippage30 bps / 0.3%
Presets0.3%, 0.5%, 1%
Maximum slippage50%
Default deadline300 seconds
Medium price impact3%
High price impact5%
Blocked price impact15%
V2 LP fee assumption25 bps per hop
1inch partner fee15 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:

ParameterPurpose
buyToken=0x…Prefill the output asset; input defaults to BNB unless buying BNB
tokenIn=0x…Prefill the input asset
amountIn=1.25Prefill 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 permit to 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.

Last updated on