# 去中心化應用（DApp）

### 你每天用的 App——Instagram、LINE、銀行 App——都運行在公司的伺服器上。公司可以關閉它、修改規則、甚至偷看你的資料。DApp 不一樣：它運行在區塊鏈上，沒有人能關閉它，規則寫在智能合約裡，公開透明。

***

## 什麼是 DApp？

| 概念 | 說明                        |
| -- | ------------------------- |
| 全名 | Decentralized Application |
| 定義 | 運行在區塊鏈上的應用程式              |
| 核心 | 智能合約                      |
| 特點 | 去中心化、抗審查、透明               |

***

## DApp vs 傳統 App

### 關鍵差異

```
傳統 App：
用戶 → App → 公司伺服器 → 資料庫
         （公司控制一切）

DApp：
用戶 → 前端 → 智能合約 → 區塊鏈
         （沒有中央控制）
```

| 比較   | 傳統 App | DApp    |
| ---- | ------ | ------- |
| 伺服器  | 公司控制   | 區塊鏈節點   |
| 資料   | 公司資料庫  | 區塊鏈公開帳本 |
| 修改規則 | 公司說了算  | 需要共識或治理 |
| 關閉風險 | 公司可以關閉 | 難以關閉    |
| 隱私   | 公司可以看到 | 視設計而定   |

{% hint style="info" %}
**DApp 的核心價值**

DApp 的價值不是「技術更先進」，而是「規則更透明」。當你使用 DApp，你知道它會怎麼運作，因為代碼是公開的。
{% endhint %}

***

## DApp 類型

### 主要類別

| 類別     | 說明     | 代表             |
| ------ | ------ | -------------- |
| DeFi   | 去中心化金融 | Uniswap、Aave   |
| NFT    | 數位收藏品  | OpenSea、Blur   |
| GameFi | 區塊鏈遊戲  | Axie、StepN     |
| Social | 去中心化社交 | Lens、Farcaster |
| DAO    | 去中心化組織 | MakerDAO       |

### 生態系統

```
DApp 生態分布：

Ethereum：
├── DeFi 龍頭（Uniswap、Aave）
├── NFT 市場（OpenSea、Blur）
└── 最多開發者

其他鏈：
├── Solana（高速遊戲、NFT）
├── Polygon（便宜、遊戲多）
├── Arbitrum（L2 DeFi）
└── BSC（便宜、仿盤多）
```

***

## 如何使用 DApp？

### 基本步驟

| 步驟         | 說明                 |
| ---------- | ------------------ |
| 1. 安裝錢包    | MetaMask、Phantom 等 |
| 2. 獲取代幣    | 需要 Gas 費           |
| 3. 連接 DApp | 點擊「連接錢包」           |
| 4. 簽署交易    | 錢包會請求確認            |
| 5. 等待確認    | 交易上鏈               |

### 常用工具

| 工具                                                                                         | 用途          |
| ------------------------------------------------------------------------------------------ | ----------- |
| [DApp 瀏覽器](https://www.0x1.academy/luo-di-an-li/qu-zhong-xin-hua-yong-dapp/dapp-qi)        | 探索 DApp     |
| [DappRadar](https://www.0x1.academy/luo-di-an-li/qu-zhong-xin-hua-yong-dapp/dapp-radar)    | DApp 數據排名   |
| [SOTD](https://github.com/dAAAb/Blockpedia/blob/master/qu-zhong-xin-hua-yong-dapp/sotd.md) | DApp 目錄     |
| [DefiLlama](https://defillama.com)                                                         | DeFi TVL 追蹤 |

***

## DApp 的優缺點

### 優點

| 優點   | 說明          |
| ---- | ----------- |
| 抗審查  | 沒有人能關閉      |
| 透明   | 代碼公開可查      |
| 無需許可 | 任何人都可使用     |
| 可組合性 | DApp 可以互相串接 |

### 缺點

| 缺點    | 說明         |
| ----- | ---------- |
| 使用門檻高 | 需要懂錢包、Gas  |
| 速度慢   | 要等區塊確認     |
| 費用高   | Gas 費可能昂貴  |
| 風險高   | 智能合約可能有漏洞  |
| 用戶體驗差 | 比傳統 App 複雜 |

{% hint style="warning" %}
**智能合約風險**

DApp 的核心是智能合約。如果合約有漏洞，駭客可以盜取資金。使用前要確認合約是否經過審計。
{% endhint %}

***

## DApp 的未來

### 發展趨勢

| 趨勢      | 說明     |
| ------- | ------ |
| 帳戶抽象    | 簡化錢包體驗 |
| Layer 2 | 更便宜、更快 |
| 跨鏈      | 不同鏈互通  |
| Web2 整合 | 降低使用門檻 |

***

## 延伸閱讀

* [Web3](https://www.0x1.academy/luo-di-an-li/qu-zhong-xin-hua-yong-dapp/web3) — Web3 概念
* [DApp 瀏覽器](https://www.0x1.academy/luo-di-an-li/qu-zhong-xin-hua-yong-dapp/dapp-qi) — 如何探索 DApp
* [區塊鏈遊戲](https://github.com/dAAAb/Blockpedia/blob/master/qu-zhong-xin-hua-yong-dapp/undefined-1.md) — GameFi 介紹

***

#### 參考資料

* [DappRadar](https://dappradar.com/)
* [DefiLlama](https://defillama.com/)
