# 礦工

### 礦工（Miner）是使用電腦設備進行大量運算，以驗證交易、產生新區塊，並獲得加密貨幣獎勵的人。他們是區塊鏈網路的守護者——沒有礦工，就沒有比特幣。

***

## 礦工做什麼？

礦工的工作就像是區塊鏈的「記帳員」：

| 工作   | 說明                  |
| ---- | ------------------- |
| 收集交易 | 從交易池中選取待處理的交易       |
| 驗證交易 | 確認交易是否合法（餘額足夠、簽名正確） |
| 打包區塊 | 將交易打包成新區塊           |
| 運算競賽 | 不斷嘗試找到符合條件的哈希值      |
| 廣播區塊 | 找到後向全網廣播新區塊         |

***

## 礦工的收入來源

### 1. 區塊獎勵

成功挖出區塊的礦工獲得新發行的代幣。

| 時間        | 比特幣區塊獎勵   |
| --------- | --------- |
| 2009-2012 | 50 BTC    |
| 2012-2016 | 25 BTC    |
| 2016-2020 | 12.5 BTC  |
| 2020-2024 | 6.25 BTC  |
| 2024 以後   | 3.125 BTC |

### 2. 交易手續費

區塊中每筆交易的手續費都歸礦工所有。隨著區塊獎勵減半，手續費會成為越來越重要的收入來源。

{% hint style="info" %}
**為什麼叫「礦工」？**

因為挖掘新的比特幣就像開採金礦——需要投入設備和電力，透過「工作」來獲得報酬。
{% endhint %}

***

## 礦工的成本

| 成本項目 | 說明            |
| ---- | ------------- |
| 礦機   | ASIC 或 GPU 設備 |
| 電費   | 最大的持續成本       |
| 場地   | 需要散熱和穩定電力     |
| 維護   | 設備維修和更換       |

{% hint style="success" %}
**礦工的生存法則**

幣價 × 挖礦數量 > 電費 + 其他成本

如果成本高於收入，礦工就會關機，導致全網算力下降。
{% endhint %}

***

## 礦工 vs 驗證者

以太坊在 2022 年從 PoW 轉向 PoS 後，「礦工」變成了「驗證者」：

| 項目 | 礦工（PoW）  | 驗證者（PoS）   |
| -- | -------- | ---------- |
| 投入 | 算力       | 質押代幣       |
| 耗能 | 高        | 低          |
| 設備 | ASIC/GPU | 一般電腦       |
| 代表 | 比特幣      | 以太坊、Solana |

***

## 延伸閱讀

* [算力](/qu-kuai-lian-ru-he-da-cheng-gong-shi/wa/suan-li.md) — 礦工的運算能力
* [礦池](/qu-kuai-lian-ru-he-da-cheng-gong-shi/wa/chi.md) — 礦工合作的組織
* [礦機](/qu-kuai-lian-ru-he-da-cheng-gong-shi/wa/undefined-4.md) — 礦工使用的設備
* [礦工費用](/bi-te-bi/bi-te-bao/gong-yong.md) — 支付給礦工的手續費
* [工作量證明](/qu-kuai-lian-ru-he-da-cheng-gong-shi/consensus/pos-1.md) — 礦工參與的共識機制

***

#### 參考資料

* [Bitcoin Mining - Investopedia](https://www.investopedia.com/terms/b/bitcoin-mining.asp)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.0x1.academy/qu-kuai-lian-ru-he-da-cheng-gong-shi/wa/gong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
