> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melt.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# System Architecture

> Three-layer architecture: Source Layer, Melt Protocol Layer, and HyperCore Execution

## Three-Layer Design

Melt operates across three distinct layers, each handling a specific function in the asset lifecycle.

### Layer 1: Source Layer

The Source Layer manages interactions with external chains where underlying assets originate.

* **RWAs via Ethereum** — tokenized equities, treasuries, and commodities from regulated issuers (Ondo Finance, Backed Finance)
* **Crypto assets via L1 bridges** — blue-chip tokens bridged from their native chains
* **Cross-chain routing via deBridge** — Smart Buy/Sell uses deBridge for swapping and bridging from any supported chain (Ethereum, Arbitrum, Base, BSC, Solana, and 25+ more)
* **Lock & Mint security** — assets are locked in audited bridge contracts before any minting occurs

### Layer 2: Melt Protocol Layer

The protocol layer, deployed on HyperEVM, governs the core bridge logic and token lifecycle.

**Key contracts:**

* **MeltHub** — Central hub on HyperEVM that receives bridge messages, mints wrapped tokens, and routes to HyperCore
* **MeltBridge** — Source chain contracts that lock tokens and send cross-chain messages via LayerZero V2
* **MeltAsset** — HIP-1 compatible ERC20 tokens representing bridged assets
* **MeltFactory** — Deploys new wrapped tokens and manages HyperCore integration lifecycle

### Layer 3: HyperCore Execution

The execution layer where Melt Assets settle as native HIP-1 tokens on the HyperCore.

* **Native CLOB trading** — Melt Assets trade on Hyperliquid's central limit order book
* **Sub-second settlement** — same latency as native USDC/HYPE transactions
* **Full composability** — compatible with the broader Hyperliquid ecosystem

## Data Flow

### Smart Buy / Smart Sell (Cross-Chain via deBridge)

```
Source Chain (Ethereum/Arbitrum/Base/Optimism/Solana)
  │
  ├── deBridge: swap input token → USDC, bridge to HyperEVM
  │
  ▼
HyperEVM
  │
  ├── CoreDepositWallet: deposit USDC to HyperCore spot balance
  │
  ▼
HyperCore
  │
  └── Spot order on CLOB (USDC → Melt Asset)
```

### Direct Mint / Redeem (Institutional via LayerZero)

```
Source Chain (Ethereum)
  │
  ├── Lock tokens in MeltBridge
  │
  ▼
LayerZero V2 (Cross-chain messaging)
  │
  ▼
HyperEVM (MeltHub)
  │
  ├── Mint wrapped MeltAsset tokens
  ├── Deduct protocol fees
  │
  ▼
HyperCore (via precompiles)
  │
  ├── Transfer to HyperCore spot balance
  └── Trade on CLOB order book
```
