Skip to content

feat: BEX (Berachain Exchange) TVL adapter#1

Open
pabl0ramirez wants to merge 1 commit into
mainfrom
feat/bex-berachain-tvl
Open

feat: BEX (Berachain Exchange) TVL adapter#1
pabl0ramirez wants to merge 1 commit into
mainfrom
feat/bex-berachain-tvl

Conversation

@pabl0ramirez

Copy link
Copy Markdown
Owner

Protocol

BEX is the native Balancer V2 fork deployed on Berachain mainnet — the canonical DEX that ships with the chain. It is currently untracked on DeFiLlama.

Technical approach

BEX uses the standard Balancer V2 Vault architecture (central token custody, pool accounting separation). The existing onChainTvl helper in helper/balancer.js handles pool enumeration via PoolRegistered events automatically.

Vault: 0x4be03f781c497a489e3cb0287833452ca9b9e80b
Deploy block: 9384

One file, three lines of logic — the Balancer helper does the heavy lifting.

Test output

berachain   1.17 M
total       1.17 M

Note: Test oracle underprices Berachain-native tokens (HONEY, WBERA, BYUSD). Production price resolution will be significantly higher — the pools hold these tokens at scale.

Checklist

  • timetravel: false
  • Pre-commit gate passes (local hook: OK ($1.17M))
  • Single file, no new dependencies
  • Vault address verified on-chain (has deployed bytecode from block 9384)

BEX is the native Balancer V2 fork on Berachain mainnet, currently
untracked on DeFiLlama. Uses onChainTvl helper to enumerate all pools
via PoolRegistered events from the BEX vault.

Vault: 0x4be03f781c497a489e3cb0287833452ca9b9e80b (deployed block 9384)
Test output: $1.17M (Berachain-native tokens underpriced in test oracle;
production resolution will be significantly higher)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant