Incorrect chainid prevents correct Strategy deployment on Berachain
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.
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:
// 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.
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.
Recommendation
Change the comparison to use the correct chain ID:
- } 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.
Resolution
D2: Fixed in commit ab5b852.
Cyfrin: Verified.