← Protocols
Berachain
01Description

EVM-identical Layer 1 with a Proof-of-Liquidity (PoL) consensus model. Validators secure the chain by staking BERA, and block rewards are emitted as non-transferable BGT that is directed via gauges to whitelisted PoL Reward Vaults. Mainnet chain ID is 80094, gas token BERA, executed by a Cosmos-SDK consensus layer (BeaconKit) with an EVM execution client.

02Best for
  • 01DeFi apps that want PoL emissions and validator incentives
  • 02EVM-identical Solidity deploys (Foundry/Hardhat work unchanged)
  • 03BeraSwap / Honey / BGT integrations
  • 04consumer apps targeting Berachain users
03Install
  • pnpm add viem wagmi
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_BERA_RPC_URLClientBerachain RPC URL (mainnet: https://rpc.berachain.com).
NEXT_PUBLIC_BERA_CHAIN_IDClientChain ID — 80094 for mainnet, 80084 for bArtio testnet (legacy), 80069 for Bepolia.
05Prompt snippet
Use viem's built-in `berachain` chain: `import { berachain } from 'viem/chains'` then `createPublicClient({ chain: berachain, transport: http(process.env.NEXT_PUBLIC_BERA_RPC_URL) })`. Mainnet chain ID is 80094, gas token BERA, native bridge contracts are at `bartio.bridge.berachain.com` (mainnet bridge UI on hub.berachain.com). Solidity contracts compile and deploy unchanged with Foundry — `forge create --rpc-url $BERA_RPC --private-key $PK src/MyContract.sol:MyContract`. To plug into PoL emissions, register a Reward Vault via `BerachainRewardsVaultFactory.createRewardsVault(stakingToken)`, then governance whitelists it for BGT inflation. Read BGT balances and validator-directed boosts from the `BGT` contract; redeem BGT to BERA via `BGT.redeem(receiver, amount)`.
06Gotchas
  • Berachain mainnet only launched February 6, 2025 — bridges, indexers, oracles, and infra are still maturing. Do not assume parity with Ethereum mainnet tooling and verify each provider supports chain 80094 specifically.
  • Three tokens with very different roles: BERA (gas + stake), BGT (non-transferable governance/rewards, only earned via PoL or validator stake), HONEY (overcollateralized stablecoin). Mixing them up in UX or accounting is a common bug.
  • BGT is non-transferable — it can be delegated to validators or redeemed 1:1 for BERA, but cannot be sent peer-to-peer or LP'd directly. Any flow that assumes ERC-20 transfer semantics will revert.
  • PoL Reward Vaults must be whitelisted by governance to receive BGT emissions. Deploying a vault is permissionless; getting emissions is not — plan the proposal and timeline.
  • Multiple testnets have existed (Artio, bArtio, Bepolia) and have been deprecated in turn. Pin the chain ID and RPC in env, and verify your fork/RPC matches the current testnet — old guides reference dead networks.
  • Validator set is permissioned and small; the chain is young. For high-value flows assume some Sky-Mavis-style operational risk and prefer mainnet only after due diligence on validator decentralization.
07Alternatives