Skip to main content

Overview

Melt is a cross-chain token bridge built on LayerZero V2. It enables:
  1. Bridge In — Lock ERC-20 tokens on a source chain, receive wrapped tokens on HyperEVM.
  2. Bridge In to HyperCore — Same as above, but tokens land directly in your HyperCore spot balance for immediate trading.
  3. Bridge Out — Burn wrapped tokens on HyperEVM, receive original tokens on the source chain.
  4. Wrap / Unwrap — Convert between native HyperEVM tokens and their Melt-wrapped equivalents (same-chain only).
See Deployment Addresses for all contract addresses.

Core Concepts

Config Key

Every token is identified by a configKey — a hash of the original token address and its source chain:
  • sourceEid is the LayerZero Endpoint ID of the source chain (0 for same-chain HyperEVM tokens).
  • Use MeltHub.getConfigKey(originalToken, sourceEid) to compute it on-chain.

LayerZero Endpoint IDs

Recipient Encoding

Bridge functions accept recipients as bytes32. To convert an address:

Fee Directions

Melt fees are directional:
  • IN — applied on wrap() and bridge-in (source → HyperEVM). Deducted from the amount received.
  • OUT — applied on unwrap() and bridgeOut() (HyperEVM → source). Deducted from the amount sent.

Flows

Bridge In (Source → HyperEVM)

Bridge tokens from a source chain to receive wrapped tokens on HyperEVM.
1

Approve

Approve the MeltBridge contract to spend your tokens.
2

Quote LayerZero fee

3

Bridge

4

Wait for delivery

LayerZero delivery takes ~1–5 minutes. Track using the guid from the receipt.
5

Receive

Wrapped tokens arrive on HyperEVM. Amount received = amount - fee (IN direction fee).
Events to monitor:

Bridge In to HyperCore

Bridge tokens directly into your HyperCore spot balance for immediate trading.
Your recipient address must be activated on HyperCore. The transaction reverts with CoreUserNotActivated otherwise. The token must also have HyperCore configured (coreLinked = true).
1

Approve

Approve the MeltBridge contract to spend your tokens.
2

Quote LayerZero fee (2x gas for toCore)

3

Bridge with toCore = true

4

Receive on HyperCore

Tokens land in your HyperCore spot balance. The amount is converted from EVM decimals to Core decimals using the token’s decimalDiff.
Events to monitor:

Bridge Out (HyperEVM → Source)

Burn wrapped tokens on HyperEVM to receive original tokens on the source chain.
1

Approve

Approve MeltHub to spend your wrapped tokens.
2

Quote LayerZero fee

3

Bridge out

4

Receive on source chain

Original tokens are released from the bridge. Amount received = amount - fee (OUT direction fee).
Events to monitor:

Wrap / Unwrap (Same-Chain)

For tokens native to HyperEVM that have a Melt-wrapped version (identified by sourceEid = 0). Wrap (original → wrapped):
  1. Approve MeltHub to spend the original token.
  2. Call:
  3. Receive amountOut = amount - fee (IN direction).
Unwrap (wrapped → original):
  1. Approve MeltHub to spend the wrapped token.
  2. Call:
  3. Receive amountOut = amount - fee (OUT direction).

Errors Reference


Fee Structure

  • Fees are charged in basis points (1 bps = 0.01%). The current protocol fee is 30 bps (0.30%) for all tokens.
  • Fee calculation: fee = amount * feeBps / 10_000.
  • Fees are directional — IN and OUT fees may differ.
  • Designated Market Makers may have discounted fee overrides configured via MeltFeeController. If your address has an override, it takes precedence over the token’s default fee.
  • Fees are collected as wrapped tokens held by MeltHub.

Checking Your Fee


Function Signatures

MeltBridge (Source Chain)

MeltHub (HyperEVM)

LayerZero Types