In-depth analysis of HyperLiquid's technical architecture: Safety of cross-chain bridges and analysis of HyperEVM dual-chain structure

robot
Abstract generation in progress

HyperLiquid After the Speculation Cooldown: Analyzing Its Cross-Chain Bridges and HyperEVM Architecture from a Technical Perspective

HyperLiquid, as a highly regarded on-chain order book exchange, has a TVL that has surpassed $2 billion, earning it the title of "on-chain Binance". This article will delve into HyperLiquid from the perspectives of technical structure and security, focusing on the construction and risks of its cross-chain bridges contracts, as well as the dual-chain architecture of HyperEVM and HyperL1.

HyperLiquid cross-chain bridges解析

HyperLiquid has deployed a cross-chain bridges contract on Arbitrum to store users' USDC assets. The bridge contract includes four groups of validators:

  • hotValidatorSet: responsible for high-frequency operations such as user withdrawals
  • coldValidatorSet: responsible for modifying system configurations, handling bridge contract locking status, etc.
  • lockers: similar to a security committee, can suspend bridge contract operations in emergency situations
  • finalizers: Confirm cross-chain bridges status changes, such as user deposits and withdrawals.

The hype is fading, analyzing Hyperliquid's bridge contract, HyperEVM, and its potential issues from a technical perspective

Deposit Process

The HyperLiquid bridge contract uses the Permit method of EIP-2612 to handle deposits, allowing only USDC to be deposited. The deposit operation is relatively simple, using the batchedDepositWithPermit function to process multiple deposits in batch.

The hype has subsided, an analysis of Hyperliquid's bridge contracts, HyperEVM, and its potential issues from a technical perspective

Withdrawal Process

The withdrawal process is relatively complex:

  1. Users initiate withdrawal requests and need to gather 2/3 of the signing weight from the hotValidatorSet.
  2. Enter the 200 seconds "dispute period"
  3. Two situations may arise during the dispute period:
    • Lockers believe there is an issue and can vote to freeze the contract.
    • coldValidatorSet can invalidate some withdrawal requests
  4. After the dispute period ends, the finalizers call the function to finalize the final state and transfer USDC to the user.

The hype is receding, a technical interpretation of Hyperliquid's bridge contract, HyperEVM, and its potential issues

cross-chain bridge locking mechanism

  • Need 2 lockers to vote to lock the bridge contract
  • You can withdraw your vote through the unvoteEmergencyLock function.
  • Unlocking requires 2/3 signature weight from coldValidatorSet, and can simultaneously update the validator set.

Validator set update

The updateValidatorSet function updates the hotValidatorSet, requiring signatures from all members, with a 200-second dispute period.

The hype is waning, interpreting the bridge contract of Hyperliquid, HyperEVM, and its potential issues from a technical perspective

Potential Risks of Cross-Chain Bridges

  1. Hackers controlling coldValidatorSet can bypass defenses to steal assets.
  2. Finalizers may refuse to confirm withdrawals, leading to review attacks.
  3. Lockers may maliciously lock the bridge contract, hindering withdrawals.

The hype is waning, analyzing Hyperliquid's bridge contract, HyperEVM, and its potential issues from a technical perspective

HyperEVM and Dual-Chain Architecture

HyperLiquid adopts a dual-chain architecture:

  • HyperLiquid L1(L1): Order book dedicated chain, permissioned
  • HyperEVM(EVM): permissionless chain, capable of deploying smart contracts

Two chains interact through Precompiles and Events:

  • Precompiles: EVM reads L1 state
  • Events: EVM writes data to L1

The hype is fading, an analysis of Hyperliquid's bridge contract, HyperEVM, and its potential issues from a technical perspective

HyperBFT consensus

Based on the improvement of HotStuff, the theoretical processing speed can reach 2 million orders per second.

The hype is fading, interpreting Hyperliquid's bridge contract, HyperEVM and its potential issues from a technical perspective

Developer's Notes

  1. msg.sender may be the system contract address rather than the user address.
  2. The non-atomicity of EVM and L1 interaction may lead to asset risks.
  3. The EVM contract address needs to create a mapping account on L1.
  4. Cross-chain assets may temporarily be unable to check the balance.

The hype retreat, an analysis of Hyperliquid's bridging contracts, HyperEVM, and its potential issues from a technical perspective

Overall, HyperEVM is similar to the layer 2 architecture based on HyperLiquid L1, but it offers higher interoperability. Developers need to pay attention to handling various edge cases in cross-chain interactions.

The tide of speculation recedes, a technical interpretation of Hyperliquid's bridge contract, HyperEVM, and its potential issues

The hype is receding, a technical interpretation of Hyperliquid's bridge contract, HyperEVM, and its potential issues

The hype has receded, an analysis from a technical perspective of Hyperliquid's bridge contract, HyperEVM, and its potential issues

HYPE-0.15%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 7
  • Share
Comment
0/400
WinterWarmthCatvip
· 16h ago
TVL does not represent security.
View OriginalReply0
0xSherlockvip
· 16h ago
The architecture is eye-catching and worth seeing.
View OriginalReply0
SmartContractWorkervip
· 16h ago
The contract code is fine.
View OriginalReply0
TokenStormvip
· 16h ago
The crypto world must keep an eye on the eagle.
View OriginalReply0
CountdownToBrokevip
· 16h ago
Take care, no need to thank you suckers.
View OriginalReply0
PumpBeforeRugvip
· 16h ago
TVL does not equal the safest
View OriginalReply0
rekt_but_resilientvip
· 16h ago
Danger looms, continue to act.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)