F-2025-0007·wrong-chain-id

Incorrect chainid prevents correct Strategy deployment on Berachain

Fixedvaultetfstrategyd2-contracts
TL;DR

Strategy::constructor uses block.chainid == 80000 to detect Berachain, but the correct Berachain chain ID is 80094. The Berachain branch never executes on the real chain, leaving facets uninitialised.

Severity
MEDIUM
Impact
MEDIUM
Likelihood
HIGH
Method
MManual review
CAT.
Complexity
LOW
Exploitability
HIGH
02Section · Description

Description

The Strategy contract is deployed across multiple chains and uses block.chainid checks in its constructor to wire up the correct facet selectors per chain. The Berachain branch is gated on the wrong chain ID:

solidity
// Strategy::constructor, L216
} else if (block.chainid == 80000) { // @audit Berachain id is 80094

According to the official Berachain documentation, the chain ID is 80094, not 80000. As a result, when the constructor runs on the actual Berachain network, the Berachain branch is skipped entirely and the Berachain-specific facets (Bera_Module, RewardVault selectors, etc.) are never registered.

03Section · Impact

Impact

  • Facets intended for deployment on Berachain are not initialised when the strategy is deployed.
  • Any call into Berachain-specific functionality routes through the fallback with no matching selector and reverts.
  • The strategy cannot perform any of its Berachain integrations until a new instance is deployed with the corrected chain ID.
04Section · Recommendation

Recommendation

Change the comparison to use the correct chain ID:

solidity
- } else if (block.chainid == 80000) {
+ } else if (block.chainid == 80094) {

Add a unit test that simulates each supported block.chainid and asserts the expected facets are registered.

05Section · Resolution

Resolution

D2: Fixed in commit ab5b852.

Cyfrin: Verified.

Status
Fixed
Fix commit
ab5b852
F-2025-0007