Berachain: An innovative Layer1 blockchain based on PoL consensus mechanism
Berachain, as the highly anticipated Layer1 blockchain, has attracted many communities and developers with its innovative features and PoL (Proof-of-Liquidity) consensus mechanism. Berachain, which is about to launch the main network, will launch incentive plans and TGE to support early ecological users and project development. As the official audit partner of many well-known blockchains, Beosin will conduct in-depth analysis of Berachain's architecture, three major native applications and its contract execution process.
1. Architecture: Double-layer design, compatible with EVM
Berachain adopts a two-layer architecture:
Berachain nodes are divided into verification nodes and RPC nodes, supporting full node and archive node modes. Each node combines an execution client and a consensus client, supporting mainstream EVM execution clients (Geth, Eragon, Nethermind, Besu, Reth and Ethereumjs) and Berachain's BeaconKit consensus client.
2. Proof-of-Liquidity (PoL): Triple Token Model
The core of Berachain's PoL mechanism is the triple token model:
PoL mechanism encourages users to participate in the ecosystem. Taking BEX (Berachain native DEX) as an example:
Berachain's three native DApps (BEX, Bend, Berps) are the main sources of BGT.
3. PoL and BEX: Native Decentralized Exchange
BEX is the native DEX of Berachain, which is closely integrated with PoL:
BEX's code structure is divided into three parts: BeraCrocMultiSwap contract (multipath redemption), CrocSwapDex contract (user interacts with pools) and Path contract (proxy contracts with different functions). The main logic includes adding liquidity, removing liquidity, token exchange, etc., and optimizing gas consumption using technologies such as curve state management and step-by-step transaction execution.
4. PoL and Bend: Unmanaged Lending Agreement
Bend is Berachain's non-custodial lending agreement, providing HONEY lending services and combining them with the PoL mechanism:
Bend's main contracts include: supply, lending, repayment and liquidation contracts, which respectively manage liquidity provision, lending, repayment and liquidation processes.
5. PoL and Berps: Decentralized Leveraged Trading Platform
Berps is Berachain's decentralized leveraged trading platform that supports perpetual futures contract trading, using $HONEY as collateral. Treasurer earns transaction fees and PoL rewards.
Berps' key contracts include: entry contracts, fee calculation contracts, market management contracts, order management contracts, settlement contracts and vault contracts.
6. Summary
Berachain provides innovative solutions to the DeFi ecosystem through the PoL consensus mechanism and triple token model. Its native DApp (BEX, Bend, Berps) and PoL mechanisms are expected to improve Berachain's transaction depth and user experience.
The above is the detailed content of Explore Berachain: Analysis of Native Protocols and Technical Points. For more information, please follow other related articles on the PHP Chinese website!