Know which code receives the call.
BitBlocks Finance combines native protocol contracts with external liquidity integrations. This reference keeps those trust boundaries explicit.
BitBlocks V2
Router
The V2 entry point for swaps, adding liquidity, removing liquidity, and native BNB wrapping paths.
Factory and pairs
The factory creates deterministic pair contracts. Each pair holds two reserves, mints LP tokens, and enforces the 0.25% fee-adjusted invariant.
BitBlocks V3
A concentrated-liquidity AMM forked from PancakeSwap V3, itself a fork of Uniswap V3. Solidity 0.7.6.
Factory, deployer and pools
The factory registers pools per pair and fee tier; the PoolDeployer deploys them with CREATE2. Fee tiers are 0.01%, 0.05%, 0.3% and 1%.
Position manager
The NonfungiblePositionManager creates and initializes pools, mints position NFTs (BBKFI-V3-POS), and handles increase, decrease, collect and burn.
Swap routers
The V3 SwapRouter executes pure V3 routes. The BitBlocks Smart Router executes routes that mix BitBlocks V2 pairs and V3 pools in one transaction.
Read helpers
QuoterV2 quotes V3 swaps, TickLens reads initialized ticks for liquidity charts, and an interface Multicall batches reads.
Rewards
MasterChef
A single farm manager with multiple pool IDs, BBKFI minting, pool weights, deposit fees, reward debt and emergency withdrawal. It is the owner and only minter of BBKFI.
SmartChef
Independent single-pool staking contracts with pre-funded rewards, per-block rate, fixed start/end blocks and optional wallet limits.
External integrations
The quote engine also knows PancakeSwap V2, PancakeSwap V3, and optional 1inch endpoints. These are not BitBlocks-owned protocol contracts. A winning external route changes the approval spender and execution target, and adds the 0.15% platform fee.
| Integration | Used for | Enabled by |
|---|---|---|
| PancakeSwap V2 Router | V2 quotes | Included in router registry |
| PancakeSwap Quoter V2 | V3 fee-tier quotes | Included in V3 quote path |
| PancakeSwap Smart Router | Execution of PancakeSwap V2 and V3 routes, with on-chain platform fee | Included in router registry |
| 1inch Classic Swap v6 | Aggregated quotes and transaction data | Environment provider flag + server API key |
The mirrored source demonstrates implementation behavior; it is not an audit report. This documentation intentionally makes no “audited” claim without a named report, scope, date, and artifact.
Where to continue
- Contract addresses — canonical values used by the current frontend configuration and V3 deployment record.
- Architecture — call flows, formulas, permissions, governance, and failure boundaries.
- Frontend reference — route providers, defaults, token registry, and deep links.