feat: BNB Smart Chain (56) support — AAVE V3 / Uniswap V3 / Chainlink / Superfluid / WBNB#3
Merged
Merged
Conversation
… / Superfluid / WBNB
Adds Chains.BnbMainnet (56) plus per-protocol addresses across the
five catalog modules whose protocols have meaningful BNB deployments.
Every address was verified live via eth_getCode against a BNB RPC
before merge.
Per-protocol additions:
aaveV3
pool 0x6807dc923806fE8Fd134338EABCA509979a7e0cB
oracle 0x39bc1bfDa2130d6Bb6DBEfd366939b4c7aa7C697
(no wethGateway — native is BNB, not ETH)
uniswapV3
swapRouter02 0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2
quoterV2 0x78D78E420Da98ad378D7799bE8f4AF69033EB077
factory 0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7
nonfungiblePositionManager 0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613
universalRouter 0x4Dae2f939ACf50408e13d58534Ff8c2776d45265
permit2 0x000000000022D473030F116dDEE9F6B43aC78BA3 (same address everywhere)
tokens.WETH WBNB (0xbb4C...95c) — see naming note below
tokens.USDC Binance-Peg USDC (0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d)
chainlink
ethUsdFeed 0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e
btcUsdFeed 0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf
bnbUsdFeed 0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE (new — BNB-only field for the chain's native-asset feed)
wrapped
weth WBNB (0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c)
superfluid
cfaForwarder 0xcfA132E353cB4E398080B9700609bb008eceB125 (same address as Ethereum / Base)
Catalog-wide naming decision: `wrapped.weth[Chains.BnbMainnet]` and
`uniswapV3.tokens.WETH[Chains.BnbMainnet]` both map to WBNB, not to
Binance-Peg WETH (0x2170Ed0880ac9A755fd29B2688956BD959F933F8). The
field name stays `weth` so chain-agnostic consumers can write
`Protocols.wrapped.weth[chainId]` without per-chain branching; the
semantic is "the canonical wrapper of the chain's native gas token,"
documented in both files. Templates that need bridged WETH on BNB
specifically should pass that address inline.
Catalog protocols deliberately NOT added on BNB (not deployed there):
Aerodrome (Base-only), Compound V3 (probe failed at the address I
expected — may not deploy on BNB at all; revisit when an official
address surfaces), Ethena (sUSDe vault is L1-only), Frax Ether,
Lido, Rocket Pool, Sky, Spark, Morpho Blue.
Test changes:
- "AAVE V3 covers the same chain set" invariant relaxed: Pool +
Oracle must match chain sets, but WETH Gateway is now subset
of Pool (gateway absent on BNB).
- SwapRouter02 + Permit2 per-chain tests extended with BNB.
- Pool-has-addresses-on-every-covered-chain test extended.
- All 15 tests pass; no new tests needed for the additions
themselves since the address-shape walk already covers them.
Bumps to 0.2.0 (minor — new chain is additive, never patch).
Downstream consumers (ava-sdk-js, context-memory, studio) pick up
BNB by bumping the catalog dep; no code changes required in any of
them since they all consume Protocols.X[chainId] generically.
Operator-side prereqs verified separately and tracked in
avs-infra/Adding_A_New_Chain.md's BNB Lessons subsection:
- Arachnid CREATE2 deployer present (0x4e59...956C)
- ERC-4337 EntryPoint v0.6/v0.7/v0.8 all canonical
- Moralis natively supports BNB for token enrichment
- Tenderly Simulation API requires a Request for BNB
(chain 56 + 97 in the Request bucket of their Node column);
workflows:simulate falls back to deterministic summary until
Tenderly grants access. Request filing tracked separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Chains.BnbMainnet = 56plus addresses for AAVE V3, Uniswap V3, Chainlink, Wrapped (WBNB), and Superfluid on BNB Smart Chain. Bumps to 0.2.0 (minor — new chain is additive).Every address was verified live via
eth_getCodeagainst a BNB RPC before merge.What's added
tokens.WETH(= WBNB) +tokens.USDC(Binance-Peg)bnbUsdFeedfield for the chain's native-asset feedweth[BnbMainnet]→ WBNB (0xbb4C…d95c)Naming decision:
wrapped.wethon chains without native ETHProtocols.wrapped.weth[Chains.BnbMainnet]andProtocols.uniswapV3.tokens.WETH[Chains.BnbMainnet]both map to WBNB, not to Binance-Peg WETH (0x2170Ed0880ac9A755fd29B2688956BD959F933F8).Rationale: the catalog's
wethfield is semantically "the canonical wrapper of the chain's native gas token." Keeping the field name stable means chain-agnostic consumers can writeProtocols.wrapped.weth[chainId]without per-chain branching. Both modules carry a clear comment explaining this; templates that specifically need bridged WETH on BNB pass that address inline.Catalog protocols deliberately NOT added on BNB
These don't deploy there:
Tests
15/15 pass (
yarn test:run). Three test updates:it("AAVE V3 covers the same chain set on Pool/Oracle/WETH Gateway")relaxed to"... Pool + Oracle cover the same chains; WETH Gateway is a subset"— necessary because BNB has Pool + Oracle but no WETH Gateway. The relaxed invariant is still meaningful: gateway ⊆ pool.it("ships SwapRouter02 on every covered chain")— added BNB row.it("Permit2 is at the same address on every covered chain")— added BNB to the loop.The address-shape walk and namespace-surface tests already cover the new addresses for free.
Downstream impact
Zero — every downstream consumer (
@avaprotocol/sdk-js, context-memory, studio) readsProtocols.X[chainId]generically. Bumping the catalog dep is all that's needed; no code changes in any of them.Operator-side prereqs (tracked separately)
The infra work for actually accepting requests on BNB lives in
avs-infra/Adding_A_New_Chain.md, BNB Lessons subsection. Status as of this PR:0x4e59…956C)workflows:simulatefalls back to the deterministic summary until access landsSmart wallet factory + paymaster on BNB are deferred per the runbook's "connectivity-only" rollout (Phase 0.5).
Test plan
yarn typecheck— cleanyarn test:run— 15/15 passyarn build— emits CJS 28.5 kB + ESM 27.0 kB + dist .d.tsnode --input-type=module -e "...") — every BNB address resolvesnpm pack --dry-run— 45 files, valid 0.2.0 tarball@avaprotocol/sdk-js, context-memory, studio) to@avaprotocol/protocols@^0.2.0to pick up BNB🤖 Generated with Claude Code