Hyperlane Warp Route TypeDescription
Native Token HWREnables direct transfers of native gas tokens (e.g., ETH) across chains without wrapping.
Collateral-Backed ERC20Locks ERC20 tokens as collateral on the source chain for cross-chain transfers.
Synthetic ERC20Mints new ERC20 tokens on the destination chain to represent the original tokens.
Hyperlane Warp Routes 2.0Allows liquidity to be sourced from multiple collateral tokens.
Specialized HWRAdds advanced features or integrates with specific use cases (e.g., vaults, fiat-backed tokens.)

Please note that this document does not include ERC721 HWRs.

Core HWR Types

Native Token HWRs

Implemented in HypNative.sol, native HWRs handle the transfer of native gas tokens (e.g. ETH on Ethereum or Arbitrum, MNT on Mantle) across different chains.

Features

  • Directly transfers native tokens without wrapping.
  • Uses msg.value for transfer amount.
  • Handles excess msg.value as hook payment.
  • Supports donations through a receive() function.

See the implementation for more details.

Collateral-Backed ERC20 HWR

Implemented in HypERC20Collateral.sol, collateral HWR enable ERC20 tokens to be locked as collateral on the source chain and then used to mint a synthetic representation on the destination chain.

Features

  • Wraps existing ERC20 tokens as collateral for transfers.
  • Locks tokens in the contract on the source chain.
  • Releases equivalent tokens on the destination chain.
  • Uses SafeERC20 for secure token transfers.

See the implementation for more details.

Synthetic ERC20 HWR

Implemented in HypERC20.sol, synthetic HWRs mint new tokens on the destination chain that represent the original tokens from the source chain. The original tokens are not transferred but remain locked.

Features

  • Maintains consistent total supply across all chains.
  • Supports custom token attributes (name, symbol, decimals).
  • Mints new tokens on the destination chain.
  • Burns tokens on the source chain when transferred back.

See the implementation for more details.

Advanced Features

TokenRouter functionality

All HWRs extend the TokenRouter contract, which provides the core functionality for HWR token transfers.

Features

  1. Message Structure: Uses TokenMessage library for encoding and decoding token transfer messages.

  2. Transfer Initiation: transferRemote function initiates cross-chain transfers.

  3. Message Handling: _handle function processes incoming transfer messages.

  4. Abstract Methods:

    • _transferFromSender: Implemented by all HWRs to handle token collection.
    • _transferTo: Implemented by all HWRs to handle token distribution.

TokenMessage Format

[32 bytes for recipient][32 bytes for amount][remaining bytes for metadata]

This standardized format ensures consistent handling across different HWR implementations while allowing for extensibility through metadata.

See the implementation for more details.

FastTokenRouter Transfers

Implemented in FastTokenRouter.sol, this router extends TokenRouter and provides faster token transfers through a liquidity provider mechanism.

Features

  • Allows liquidity providers to fulfill transfer requests before message processing.
  • Includes a fastFee to incentivize liquidity providers.
  • Introduces fastTransferId for unique transfer identification.

See the implementation for more details.

Specialized HWR Extensions

1. Fast Collateral Transfers (FastHypERC20Collateral)

  • Combines fast transfer capabilities with collateral-backed ERC20 functionality.
  • See the implementation for more details.

2. Vault Integration (HypERC4626OwnerCollateral, HypERC4626Collateral)

3. Fiat-Backed Tokens (HypFiatToken)

  • Designed for stablecoins and other fiat-backed tokens, implementing specific mint and burn operations.
  • See the implementation for more details.

4. Scaled Native Tokens (HypNativeScaled)

  • Scales native token values for consistency across chains with different decimals.
  • See the implementation for more details.

5. xERC20 Integration (HypXERC20 & HypXERC20Lockbox)

References

For setup examples & use cases, check out Hyperlane Warp Routes: Example Usage.