# 双重支付

**双重支付**是指将同一笔数字货币使用不止一次的行为，既包括将同一单位货币用于两笔相互冲突的交易，也包括在收到货物后撤销付款。这是任何数字支付系统都必须面对的根本性挑战，因为数字信息可以被完美复制，而实体现金不能；它也是电子现金、区块链共识以及离线央行数字货币（CBDC）设计各自都必须解决的核心安全问题。<sup>[1](https://xrpl.org/docs/concepts/consensus-protocol/consensus-principles-and-rules/)</sup><sup> • </sup><sup>[2](https://www.bankofcanada.ca/2020/06/staff-analytical-note-2020-11/)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 将同一价值使用不止一次；与实体钞票不同，这是CBDC系统的核心风险<sup>[2](https://www.bankofcanada.ca/2020/06/staff-analytical-note-2020-11/)</sup> |
| 在线预防 | 可信机构实时验证每笔交易，或由分布式账本中的共识对交易排序，使两笔冲突付款中只有一笔成功<sup>[3](https://www.edpb.europa.eu/system/files/2025-10/digitaleurotokenbasedofflinemodality_en.pdf)</sup><sup> • </sup><sup>[1](https://xrpl.org/docs/concepts/consensus-protocol/consensus-principles-and-rules/)</sup> |
| 比特币的解决方案 | 点对点分布式时间戳服务器，将交易哈希进工作量证明链，只要诚实节点控制多数CPU算力即安全<sup>[4](https://www.thebitcoinpaper.org/white-paper/)</sup> |
| 早期历史 | 戴维·乔姆的盲签名（1982年），以及与阿莫斯·菲亚特、莫尼·纳奥尔合作提出的不可追踪电子现金（1988年），均针对数字现金中的双重支付问题<sup>[5](https://dblp.org/rec/conf/crypto/Chaum82.html)</sup><sup> • </sup><sup>[6](https://dblp.org/rec/conf/crypto/ChaumFN88.html)</sup> |
| 主要攻击类型 | 竞速攻击、芬尼攻击和Vector76攻击针对未确认或仅一次确认的交易；多数（51%）攻击针对链本身<sup>[7](https://doi.org/10.1145/3596906)</sup> |
| 有记录的损失 | 2018年比特币黄金遭受51%攻击，攻击者实施双重支付，窃取价值约1800万美元的BTG<sup>[8](https://link.springer.com/article/10.1007/s40747-026-02256-w)</sup> |
| 离线风险 | 离线数字支付中的处理延迟会增加双重支付风险；损失通常由商户承担<sup>[9](https://www.federalreserve.gov/econres/notes/feds-notes/offline-payments-implications-for-reliability-and-resiliency-in-digital-payment-systems-20240816.html)</sup> |

## 问题所在

货币在一处花掉，就不能同时在另一处花掉。在支付系统中，两笔交易可以各自单独有效，但不能同时有效：如果爱丽丝持有10美元，并把它同时发给鲍勃和查理，系统必须以所有参与者都能接受的方式决定哪笔付款成功。传统系统通过中心化机构解决这一问题，例如银行作为账户余额的唯一保管者，决定哪张支票能够清算。没有中心化机构的分布式系统则必须另寻他法。<sup>[1](https://xrpl.org/docs/concepts/consensus-protocol/consensus-principles-and-rules/)</sup>

这一困难是数字价值所特有的。与硬币或钞票不同，数字信息可以被轻易且完美地复制，因此数字货币需要额外的防复制机制。[数字签名](https://www.edgepedia.org/zh/digital-signature)足以阻止伪造，但防止双重支付还需要进一步保障：能够抵御篡改的本地价值存储设备、由组织监管的中心化账本，或分布式账本内部的共识。<sup>[2](https://www.bankofcanada.ca/2020/06/staff-analytical-note-2020-11/)</sup>

## 预防方法

**可信机构。** 在在线数字货币中，每笔交易都与可信机构（如中央银行或分布式账本）保持通信渠道，因此可以通过让该机构在接受交易前实时验证每笔交易来防止双重支付。<sup>[3](https://www.edpb.europa.eu/system/files/2025-10/digitaleurotokenbasedofflinemodality_en.pdf)</sup> 在分布式账本中，双重支付问题可以归结为对交易排序：如果所有人都就两笔冲突交易中哪笔先发生达成一致，确定性的排序规则便能在没有中心方的情况下决定胜者。例如，XRP账本采用共识轮次，参与者在轮次中就一组交易达成一致，并按确定性顺序处理它们。<sup>[1](https://xrpl.org/docs/concepts/consensus-protocol/consensus-principles-and-rules/)</sup>

**工作量证明共识。** 为解决双重支付问题，比特币白皮书提出了一种点对点分布式时间戳服务器：每笔交易被哈希后加入一条连续的基于哈希的[工作量证明](https://www.edgepedia.org/zh/proof-of-work)链，形成一条除非重新完成工作量否则保持不变的记录。只要多数CPU算力由不串通攻击网络的节点控制，诚实矿工就能生成最长链并超越攻击者，重花尝试会被验证节点拒绝。<sup>[4](https://www.thebitcoinpaper.org/white-paper/)</sup><sup> • </sup><sup>[10](https://www.ecb.europa.eu/press/conferences/shared/pdf/20171130_ECB_BdI_conference/payments_conference_2017_academic_paper_wandhoefer.pdf)</sup> 美国国家标准与技术研究院指出，工作量证明等昂贵共识模型正是防止双重支付需求的直接产物，而共识机制的区块排序保证正是防止双重支付的关键。<sup>[11](https://csrc.nist.gov/projects/privacy-enhancing-lw-distributed-ledger-technology)</sup>

**安全硬件与阈值。** 对于离线支付，对策位于设备层面：安全元件保护加密密钥并支持双重支付检测，单个设备可离线持有的金额可以设限，以使风险保持在可接受范围内。<sup>[12](https://www.bankofcanada.ca/2023/02/staff-analytical-note-2023-2/?trk=article-ssr-frontend-pulse_little-text-block)</sup><sup> • </sup><sup>[13](https://www.bankofengland.co.uk/report/2025/digital-pound-experiment-report-offline-payments)</sup> 离线支付模式的一种实用缓解措施，是根据商户的风险承受能力设定离线支付阈值。<sup>[9](https://www.federalreserve.gov/econres/notes/feds-notes/offline-payments-implications-for-reliability-and-resiliency-in-digital-payment-systems-20240816.html)</sup>

## 对区块链支付的攻击

有几种有特定名称的攻击针对在完全确认之前就被接受的付款。<sup>[7](https://doi.org/10.1145/3596906)</sup>

- **竞速攻击。** 攻击者创建两笔花费同一批币的冲突交易，一笔付给商户，一笔将资金转回攻击者拥有的地址，并将两笔同时广播。两笔都有效，但只有一笔能被挖出；如果攻击者的交易先被挖出，商户就什么也收不到。<sup>[7](https://doi.org/10.1145/3596906)</sup>
- **芬尼攻击。** 攻击者挖出一个包含向自己转账交易的区块但将其扣留，用一笔冲突的未确认交易向商户付款，并在商户接受后释放预挖区块，使该付款失效。失败概率为t/T，其中t是找到区块与完成付款之间的时间，T是平均出块时间。<sup>[14](https://doi.org/10.1016/j.bcra.2025.100378)</sup>
- **Vector76攻击。** 竞速攻击与芬尼攻击的结合，即使商户等待一个区块确认也仍然有效。<sup>[7](https://doi.org/10.1145/3596906)</sup><sup> • </sup><sup>[15](https://www.egr.msu.edu/~renjian/pubs/Blockchain-IoT.pdf)</sup>
- **多数（51%）攻击。** 控制多数算力的攻击者秘密挖出一条替代链，以逆转已确认的交易。51%的多数足以确保攻击在统计上最终成功，不过成本最小化的攻击者会选择略高一些的份额。<sup>[16](https://academic.oup.com/qje/article/140/1/1/7824430)</sup> 此类攻击主要是算力较低的小型工作量证明币种的特征。<sup>[17](https://researchportal.northumbria.ac.uk/en/publications/cryptocurrency-value-and-51-attacks-evidence-from-event-studies/)</sup>

在权益证明系统中，计算方式有所不同。在以太坊上，控制总质押以太币34%的攻击者可以造成双重最终性，即两条分叉同时最终确定，但在此过程中会通过罚没机制销毁其全部质押；若达到66%或以上，攻击者可以最终确定其偏好的链，用该协议自己的话说，就是可以花费、回滚、再花费。<sup>[18](https://ethereum.org/developers/docs/consensus-mechanisms/pos/attack-and-defense)</sup>

## 确认数与概率

对于控制网络算力不到一半的攻击者，双重支付攻击成功的概率随确认数增加而指数下降。<sup>[19](https://arxiv.org/abs/1610.07985)</sup><sup> • </sup><sup>[25](https://nakamotoinstitute.org/library/bitcoin/)</sup> 中本聪最初的分析计算了算力占比为q的攻击者在z个确认后追上的概率，但后来西里尔·格伦斯潘和里卡多·佩雷斯-马尔科——这两位研究者曾就比特币数学发表大量成果——用正则化不完全贝塔函数的闭式公式修正了该分析。他们的结果表明，成功概率高于中本聪的计算，因此需要更多确认数，尤其是当攻击者的算力份额显著时。<sup>[20](https://arxiv.org/abs/1702.02867)</sup> 对于接受零确认支付的商户，针对比特币零售场景的研究认定，手续费替换（RBF）攻击是最重大的威胁，并建议在启用RBF时至少等待一个确认。<sup>[21](https://www.sciencedirect.com/science/article/pii/S0268401223001081)</sup>

## 离线支付与CBDC

离线支付是指付款方和收款方都无法访问网络的支付，此时双重支付最难防止，因为交易发生时无法联系任何中心化机构。<sup>[3](https://www.edpb.europa.eu/system/files/2025-10/digitaleurotokenbasedofflinemodality_en.pdf)</sup> 美联储指出，双重支付是所有数字支付类型的风险，但在离线交易中会随处理延迟而增加，并且是商户面临的最大风险之一，损失通常由商户承担，这使其成为离线数字支付方式被采用的主要障碍。<sup>[9](https://www.federalreserve.gov/econres/notes/feds-notes/offline-payments-implications-for-reliability-and-resiliency-in-digital-payment-systems-20240816.html)</sup> 如果资金在同步之前即时结算，离线系统与在线系统之间的差异可能导致双重支付。<sup>[12](https://www.bankofcanada.ca/2023/02/staff-analytical-note-2023-2/?trk=article-ssr-frontend-pulse_little-text-block)</sup>

测试离线功能的中央银行已将此视为一项设计约束。在对[英格兰银行](https://www.edgepedia.org/zh/bank-of-england)2020年CBDC讨论文件的回应中，许多回应者指出，基于设备的方法带有双重支付风险，需要安全硬件，而且离线交易在一方重新联网之前不会完全最终化，因此有人建议将离线使用限制在一定金额以下的支付。<sup>[22](https://www.bankofengland.co.uk/paper/2021/responses-to-the-bank-of-englands-march-2020-discussion-paper-on-cbdc)</sup> 英格兰银行的数字英镑实验探索了四种离线方案；所有方案都使用安全元件来支持双重支付防范和防伪或密钥保护，其中一种使用机密计算来支持检测。<sup>[13](https://www.bankofengland.co.uk/report/2025/digital-pound-experiment-report-offline-payments)</sup> 加拿大银行的工作人员指出，长时间离线使用——类似于现金式使用——仍是一个未解决的研究问题。<sup>[2](https://www.bankofcanada.ca/2020/06/staff-analytical-note-2020-11/)</sup>

## 历史

这一问题远早于区块链。创立DigiCash的密码学家戴维·乔姆于1982年引入了用于不可追踪支付的[盲签名](https://www.edgepedia.org/zh/blind-signature)，<sup>[5](https://dblp.org/rec/conf/crypto/Chaum82.html)</sup> 并于1988年与阿莫斯·菲亚特、[莫尼·纳奥尔](https://www.edgepedia.org/zh/moni-naor)在CRYPTO会议上发表了《不可追踪的电子现金》，描述了带有双重支付检测的数字现金。<sup>[6](https://dblp.org/rec/conf/crypto/ChaumFN88.html)</sup><sup> • </sup><sup>[23](https://nakamotoinstitute.org/library/detecting-double-spending/)</sup> 2008年的比特币白皮书将其贡献表述为在没有可信第三方的情况下解决双重支付，因为如果仍然需要可信方来防止双重支付，数字签名本身就失去了优势。<sup>[4](https://www.thebitcoinpaper.org/white-paper/)</sup>

## 市场后果

一项针对13种工作量证明加密货币发生的14次单独51%攻击的事件研究发现，多数攻击会立即导致相应币价下跌12%至15%，且价格在一周后不会恢复到攻击前水平，尽管市场在攻击后表现出高效率。<sup>[17](https://researchportal.northumbria.ac.uk/en/publications/cryptocurrency-value-and-51-attacks-evidence-from-event-studies/)</sup> 2018年比特币黄金攻击在5月持续约三天半，针对交易所实施，说明了实际模式：交易所是主要目标，因为深厚的订单簿使大规模双重支付有利可图，而交易所的应对方式是提高确认要求或关闭存款钱包。<sup>[24](https://btgofficial.org/responding-to-attacks/)</sup>

## References

1. [Consensus Principles and Rules, XRP Ledger documentation](https://xrpl.org/docs/concepts/consensus-protocol/consensus-principles-and-rules/)
2. [Security of a CBDC, Bank of Canada Staff Analytical Note 2020-11](https://www.bankofcanada.ca/2020/06/staff-analytical-note-2020-11/)
3. [The Digital Euro and its token-based offline modality, EDPB Support Pool of Experts (Tibor Jager, September 2025)](https://www.edpb.europa.eu/system/files/2025-10/digitaleurotokenbasedofflinemodality_en.pdf)
4. [Satoshi Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System](https://www.thebitcoinpaper.org/white-paper/)
5. [David Chaum (1982). Blind Signatures for Untraceable Payments, dblp record](https://dblp.org/rec/conf/crypto/Chaum82.html)
6. [Chaum, Fiat, Naor (1988). Untraceable Electronic Cash, CRYPTO 1988, dblp record](https://dblp.org/rec/conf/crypto/ChaumFN88.html)
7. [Security Aspects of Cryptocurrency Wallets: A Systematic Literature Review, ACM Computing Surveys](https://doi.org/10.1145/3596906)
8. [51% attack vulnerability of nascent blockchains: a comprehensive review, Complex & Intelligent Systems](https://link.springer.com/article/10.1007/s40747-026-02256-w)
9. [Offline Payments: Implications for Reliability and Resiliency in Digital Payment Systems, Federal Reserve FEDS Notes](https://www.federalreserve.gov/econres/notes/feds-notes/offline-payments-implications-for-reliability-and-resiliency-in-digital-payment-systems-20240816.html)
10. [The future of digital retail payments in Europe, ECB conference paper](https://www.ecb.europa.eu/press/conferences/shared/pdf/20171130_ECB_BdI_conference/payments_conference_2017_academic_paper_wandhoefer.pdf)
11. [Privacy-Enhancing Lightweight Distributed Ledger Technology, NIST CSRC](https://csrc.nist.gov/projects/privacy-enhancing-lw-distributed-ledger-technology)
12. [A central bank digital currency for offline payments, Bank of Canada Staff Analytical Note 2023-2](https://www.bankofcanada.ca/2023/02/staff-analytical-note-2023-2/?trk=article-ssr-frontend-pulse_little-text-block)
13. [Digital pound experiment report: Offline payments, Bank of England](https://www.bankofengland.co.uk/report/2025/digital-pound-experiment-report-offline-payments)
14. [Double-spending attacks in cross-blockchain ecosystems, Blockchain: Research and Applications](https://doi.org/10.1016/j.bcra.2025.100378)
15. [Blockchain and IoT analysis, Michigan State University](https://www.egr.msu.edu/~renjian/pubs/Blockchain-IoT.pdf)
16. [Trust at Scale: The Economic Limits of Cryptocurrencies and Blockchains, Quarterly Journal of Economics](https://academic.oup.com/qje/article/140/1/1/7824430)
17. [Shanaev, Shuraeva, Vasenin, Kuznetsov (2019). Cryptocurrency value and 51% attacks: evidence from event studies, Journal of Alternative Investments 22(3), 65-77](https://researchportal.northumbria.ac.uk/en/publications/cryptocurrency-value-and-51-attacks-evidence-from-event-studies/)
18. [Ethereum proof-of-stake attack and defense, ethereum.org](https://ethereum.org/developers/docs/consensus-mechanisms/pos/attack-and-defense)
19. [An Analysis of Attacks on Blockchain Consensus, arXiv](https://arxiv.org/abs/1610.07985)
20. [Grunspan, Pérez-Marco (2017). Double spend races, arXiv](https://arxiv.org/abs/1702.02867)
21. [Bitcoin double-spending risk and countermeasures at physical retail locations, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0268401223001081)
22. [Responses to the Bank of England's March 2020 Discussion Paper on CBDC](https://www.bankofengland.co.uk/paper/2021/responses-to-the-bank-of-englands-march-2020-discussion-paper-on-cbdc)
23. [Detecting Double Spending, Satoshi Nakamoto Institute](https://nakamotoinstitute.org/library/detecting-double-spending/)
24. [Responding to Attacks, Bitcoin Gold](https://btgofficial.org/responding-to-attacks/)
25. [Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto Institute](https://nakamotoinstitute.org/library/bitcoin/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Security governance and internet policy › Cryptographic protocols › Application protocols: voting, payment, and commerce

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/double-spending

English original: https://www.edgepedia.org/double-spending
