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, liquidity positions, 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
Assumed block time0.45 seconds (reward and APR estimates)

Swap defaults

SettingValue
Default input / outputBNB → BBKFI
Default slippage30 bps / 0.3%
Presets0.3%, 0.5%, 1%
Maximum slippage50%
Default deadline5 minutes (adjustable from 1 to 120)
Native BNB Max reserve0.002 BNB kept for gas
Medium price impact3%
High price impact5%
Blocked price impact15%
V2 LP fee assumption25 bps per hop
Platform fee15 bps / 0.15% on PancakeSwap and 1inch routes only
Quote refreshDebounced 300 ms; refreshed every 10 seconds

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, puts tokens the wallet holds first, and can resolve custom contract metadata.

Inclusion in a token list is metadata, not due diligence. Always verify token contracts and liquidity.

Route selection

VenuePaths quotedRouting bases
BitBlocks V2Direct and multi-hopWBNB, BUSD, USDT, ETH, BBKFI, WBBK V2, WBBK V1
PancakeSwap V2Direct and multi-hopSame as BitBlocks V2
BitBlocks V3Direct or one intermediate, all four tiersWBNB, USDT, BBKFI, WBBK V2
BitBlocks mixedTwo hops, one V2 and one V3WBNB, USDT, BBKFI, WBBK V2
PancakeSwap V3Single hop, tiers 0.01%, 0.05%, 0.25%, 1%None
1inchAggregated, when enabledProvider-defined

Net of fees

Third-party quotes have the 0.15% platform fee deducted before comparison, so minimum received and route ranking are both net amounts.

Net of gas

When BNB or WBNB is on one side, estimated network cost is converted to the output token and subtracted before ranking.

1inch candidate

The optional provider is included only when its public feature flag is true; server routes still require an API key.

Winner

The highest net output wins, with no tie-break favoring any venue. The selected route supplies the execution and allowance-spender address.

Liquidity defaults

SettingValue
Default version for new positionsV3 (?version=v2 selects V2)
Default V3 fee tier0.3%
V3 fee tiers0.01%, 0.05%, 0.3%, 1%
Range presetsFull range plus three ± presets per tier (see V3 guide)
Liquidity slippage and deadlineSame defaults as swap: 0.3%, 5 minutes
Small-pool threshold in PoolsPools under US$ 10 TVL hidden by default
Pool data sourceBitBlocks Finance info backend, about 5-minute snapshots

URL parameters and routes

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 pages use these paths:

PathPurpose
/liquidityPools tab (default)
/liquidity?tab=positionsMy positions
/liquidity/add/0xTokenA/0xTokenBPrefilled V3 add flow
/liquidity/add/0xTokenA/0xTokenB/3000Prefilled V3 add flow with a fee tier
/liquidity/add/0xTokenA/0xTokenB?version=v2Prefilled V2 add flow
/liquidity/pool/0xPoolPool page for a V2 pair or V3 pool
/liquidity/v3/123V3 position page by NFT token ID
/liquidity/remove/0xTokenA/0xTokenBV2 removal flow

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 route’s router: BitBlocks Router, V3 SwapRouter, BitBlocks Smart Router, PancakeSwap Smart Router, or the 1inch spender.
  • Adding V2 liquidity approves the BitBlocks Router for both ERC-20 sides.
  • Creating or increasing a V3 position approves the NonfungiblePositionManager, with maximum allowance and exact-amount fallback.
  • Removing V3 liquidity and collecting fees need no token approval; the wallet must own the position NFT.
  • Removing V2 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