> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/learn/zh/stacks-101/proof-of-transfer.md).

# 转移证明（PoX）

<div data-with-frame="true"><figure><picture><source srcset="/files/dda8f99a0f61ca697c7860266951b7a1ff784254" media="(prefers-color-scheme: dark)"><img src="https://629346125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH74xqoobupBWwBsVMJhK%2Fuploads%2FEUW1W0NPEuoCYBtienyL%2Fpox.png?alt=media&amp;token=2edba99c-91f7-4df2-8ea1-aceb9f3bb712" alt=""></picture><figcaption></figcaption></figure></div>

在前面的章节中，我们看到了 Stacks 的愿景和精神，以及它如何在不修改比特币本身的情况下与比特币相连接。本节介绍实现这一机制的 Proof of Transfer，以及它经历过的五个版本。

{% hint style="info" %}
这是一个概念性概览。关于区块生成如何逐步工作，参见 [区块生成](/learn/zh/block-production.md). 关于如何参与以及你能获得什么，参见 [比特币质押](/learn/zh/bitcoin-staking.md).
{% endhint %}

### 什么是 Proof of Transfer？

Stacks 层的共识机制 Proof of Transfer 依赖于 STX 和 BTC。PoX 在精神上类似于比特币的 Proof of Work：比特币矿工消耗电力并获得 BTC 奖励，而 Stacks 矿工消耗已经挖出的 BTC 并获得 STX 奖励。

与 Proof of Work 类似，PoX 使用单一领导者选举。矿工通过花费 BTC 来竞标，并以与出价权重相关的随机概率成为领导者。领导者选举发生在比特币链上；新区块写入 Stacks 层。PoX 重用了比特币矿工已经完成的工作，不会额外消耗显著电力。

与 Proof of Work 类似，PoX 是无需许可的。任何人都可以挖矿，只要愿意花费 BTC。任何持有 STX 的人都可以锁定它来帮助保护链并赚取以比特币计价的奖励，而 BTC 持有者也可以通过质押 BTC 来做同样的事。

PoX 赋予网络两个协同发挥作用的特性。

**经济性。** 矿工的 BTC 资金为支付给参与者的奖励提供资金，因此 Stacks 经济锚定于比特币，而非仅仅依赖通胀。矿工投入 BTC 以争夺出块权，并作为回报获得新铸造的 STX 加上交易费。参与者获得的奖励来自他们所投入的 BTC。

**程序化。** 矿工在比特币上的 BTC 承诺是领导者选举的输入，决定谁构建下一个 Stacks 区块。随后，区块在密码学上相互链接并锚定到比特币，继承其结算保障。PoX 不仅仅是价值交换：它还是对区块进行排序和最终确认、同时保持与比特币 L1 可验证链接的共识引擎。

<div data-with-frame="true"><figure><img src="https://629346125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH74xqoobupBWwBsVMJhK%2Fuploads%2Fdvz2r48jmk1I1ON8gTVt%2Fpox-mechanism.png?alt=media&amp;token=d12e9577-fa8e-4505-b6a5-132aa8b7ef62" alt="Proof of Transfer as a loop between two currencies. Miners spend already-mined BTC to compete for the right to produce a tenure of Stacks blocks, and earn the STX coinbase plus transaction fees in return. The programmatic side runs every Bitcoin block: leader election by a sortition weighted by committed BTC, the winner produces the tenure, and signers validate and append the blocks once 70 percent of signer weight accepts them. The economic side shows every block-commit paying a single output into one reward pool, which auto-bridges to sBTC and pays out in a fixed order: active protocol bonds at their target rate first, then STX-only stakers pro rata from the residual, then the reserve fund. The contract holds no participant addresses and no BTC is burned."><figcaption><p>两种货币朝相反方向流动。BTC 从矿工流向参与者；STX 从协议流向矿工。</p></figcaption></figure></div>

### 谁参与其中

四种角色，另有完整文档在别处。

| 角色         | 他们做什么                                                   | 进一步阅读                                       |
| ---------- | ------------------------------------------------------- | ------------------------------------------- |
| 矿工         | 花费 BTC 以竞争获得生产一段 Stacks 区块序列的权利，并赚取 STX coinbase 奖励加交易费 | [挖矿](/learn/zh/block-production/mining.md)  |
| Stacks 签名者 | 验证并追加区块。当持有至少 70% 权重的签名者批准后，区块即被接受                      | [签名](/learn/zh/block-production/signing.md) |
| 比特币质押者     | 在 Bitcoin L1 上用自己的私钥锁定 BTC，并与 STX 配对，赚取以 BTC 计价的收益      | [比特币质押](/learn/zh/bitcoin-staking.md)       |
| 仅 STX 质押者  | 将 STX 质押给签名者，并从满足债券义务后剩余的部分中获得一份收益                      | [质押](/learn/zh/block-production/staking.md) |

<div data-with-frame="true"><figure><img src="https://629346125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH74xqoobupBWwBsVMJhK%2Fuploads%2FzAtvzskQHJVfcsoeztzV%2Fpox-participants.png?alt=media&amp;token=3bb65c7d-41f7-4d5f-9914-4bc65bf8b523" alt="The four roles side by side. Miners spend BTC, produce a tenure of Stacks blocks, and earn the STX coinbase plus fees. Stacks signers validate and append blocks, and 70 percent of weight accepts a block, where weight is staked STX. Bitcoin stakers lock BTC and STX, either native BTC on L1 under their own keys or sBTC, solo or pooled, and earn BTC yield paid first. STX-only stakers stake STX to a signer while it stays in their own account, and earn the residual. Staked STX is what gives a signer its weight, subject to a 50,000 STX minimum counted in aggregate per signer."><figcaption><p>被质押的 STX 决定了签名者的权重。矿工投入的 BTC 决定收益支付来源。</p></figcaption></figure></div>

### 机制如何运作

{% stepper %}
{% step %}
**领导者选举**

矿工在一笔比特币交易中投入 BTC，该交易携带一个区块哈希和 VRF 种子。密码学抽签会为每个比特币区块选出一个赢家，按每个矿工投入的 BTC 加权，既确定又不可预测。赢家生成该任期的 Stacks 区块。
{% endstep %}

{% step %}
**奖励分配**

矿工投入的 BTC 为奖励池提供资金。在 PoX-5 下，每次区块提交只支付单个输出，资金池自动桥接到 sBTC，并通过三段式瀑布分配进行支付：先支付活跃协议债券，然后是仅 STX 质押者，最后是储备。每 1,050 个比特币区块计算一次分配，每个奖励周期两次。
{% endstep %}

{% step %}
**区块签名**

签名者复制并按顺序排列矿工提出的区块。每个签名者的投票都有权重，当持有至少 70% 权重的签名者批准后，区块就会被追加。签名者集合在一个奖励周期内固定，并在准备阶段确定。
{% endstep %}
{% endstepper %}

在 PoX 的每个版本中，周期结构都相同：一个奖励周期由 2,100 个比特币区块组成，包括 2,000 个区块的奖励阶段，随后是 100 个区块的准备阶段。锚定区块是在准备阶段中确认的第一个 Stacks 区块，而下一个周期的签名者集合由该区块时的链状态决定。

<div data-with-frame="true"><figure><img src="https://629346125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH74xqoobupBWwBsVMJhK%2Fuploads%2FMUtNf02zRPRN1sQ357Y1%2Fpox-reward-cycle.png?alt=media&amp;token=50a2728e-507f-40ea-89e3-19dd449c5143" alt="A reward cycle drawn as a horizontal bar of 2,100 Bitcoin blocks, numbered 0 to 2,099. The first 2,000 blocks are the reward phase and the last 100 are the prepare phase, followed immediately by the next cycle. Two markers sit on the bar: distributions are calculated every 1,050 blocks, twice per reward cycle, and the anchor block is the first Stacks block confirmed in the prepare phase, from which the next cycle&#x27;s signer set is determined."><figcaption><p>周期会无间断地重复：准备阶段之后的下一个区块就是下一周期的区块 0。</p></figcaption></figure></div>

### Proof of Transfer 的版本

Proof of Transfer 以 Clarity 智能合约的形式在 Stacks 网络上实现，并已经历五个版本。

| 版本    | 日期         | 主网合约                                                                                                     | SIP                                                                                                  |
| ----- | ---------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| PoX 5 | 2026-07-30 | [SP000000000000000000002Q6VF78.pox-5](https://explorer.hiro.so/txid/SP000000000000000000002Q6VF78.pox-5) | [SIP-045](https://github.com/stacksgov/sips/blob/main/sips/sip-045/sip-045-pox-5-bitcoin-staking.md) |
| PoX 4 | 2024-04-22 | [SP000000000000000000002Q6VF78.pox-4](https://explorer.hiro.so/txid/SP000000000000000000002Q6VF78.pox-4) | [SIP-021](https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md)              |
| PoX 3 | 2023-05-27 | [SP000000000000000000002Q6VF78.pox-3](https://explorer.hiro.so/txid/SP000000000000000000002Q6VF78.pox-3) | [SIP-022](https://github.com/stacksgov/sips/blob/main/sips/sip-022/sip-022-emergency-pox-fix.md)     |
| PoX 2 | 2023-03-20 | [SP000000000000000000002Q6VF78.pox-2](https://explorer.hiro.so/txid/SP000000000000000000002Q6VF78.pox-2) | [SIP-015](https://github.com/stacksgov/sips/blob/main/sips/sip-015/sip-015-network-upgrade.md)       |
| PoX 1 | 2021-01-15 | [SP000000000000000000002Q6VF78.pox](https://explorer.hiro.so/txid/SP000000000000000000002Q6VF78.pox)     | [SIP-007](https://github.com/stacksgov/sips/blob/main/sips/sip-007/sip-007-stacking-consensus.md)    |

PoX-5 是自最初设计以来最大的变更。矿工投入的 BTC 不再直接支付给 stacker 奖励地址，也不再有任何代币被销毁，而且 BTC 持有者现在可以通过质押 BTC 参与，而不仅仅是持有 STX。关于发生了什么变化以及先前的 stackers 需要做什么，参见 [PoX-5 中发生了哪些变化](https://docs.stacks.co/operate/staking-stx/whats-changed-in-pox-5).

该 [示例合约](/cookbook/clarity/example-contracts.md) 部分包含对 PoX-4 合约的逐步讲解。

***

### 其他资源

* \[[SIP-001](https://github.com/stacksgov/sips/blob/main/sips/sip-001/sip-001-burn-election.md)] SIP-001 提供了选择比特币来保护 Stacks 的全部原因列表。
* \[[SIP-007](https://github.com/stacksgov/sips/blob/main/sips/sip-007/sip-007-stacking-consensus.md)] 原始的 stacking 和 Proof of Transfer 设计细节。
* \[[SIP-021](https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md)] Nakamoto 升级：快速且可靠的区块
* \[[SIP-045](https://github.com/stacksgov/sips/blob/main/sips/sip-045/sip-045-pox-5-bitcoin-staking.md)] PoX-5：比特币质押和发行计划
* \[[Stacks 开发者 YT](https://youtu.be/YynwIJIXJWw?si=9DXsd9PzMN14xt-L)] PoX：幕后机制
* \[[Stacks 开发者 YT](https://youtu.be/4UJ3ZK8JsrI?si=m8VSVIuCwIyOe3pe)] 开发者如何测试 Stacks 网络？
* \[[Hiro YT](https://youtu.be/2Bmo1cK0C8k?si=uiYaXudIhjxkNaS6)] Stacks 的 Proof of Transfer 智能合约解析


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.stacks.co/learn/zh/stacks-101/proof-of-transfer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
