🎉 The #CandyDrop Futures Challenge is live — join now to share a 6 BTC prize pool!
📢 Post your futures trading experience on Gate Square with the event hashtag — $25 × 20 rewards are waiting!
🎁 $500 in futures trial vouchers up for grabs — 20 standout posts will win!
📅 Event Period: August 1, 2025, 15:00 – August 15, 2025, 19:00 (UTC+8)
👉 Event Link: https://www.gate.com/candy-drop/detail/BTC-98
Dare to trade. Dare to win.
The Mystery of Bitcoin Double Spending: Rare Vulnerabilities and Future Challenges
Bitcoin Trading Repetition Phenomenon: An Interesting but Low-Risk Vulnerability
Overview
Bitcoin transactions typically use unspent outputs by referencing the ID of a previous transaction. These outputs can only be spent once; otherwise, it leads to a double-spending problem. However, in Bitcoin's history, there have been indeed two sets of completely identical transactions. This situation occurs because coinbase transactions do not have inputs and instead generate new coins. Therefore, two different coinbase transactions can potentially be constructed in exactly the same way, resulting in their transaction IDs being the same. Besides this, duplicate transaction IDs can only occur due to hash collisions, but this is nearly impossible in cryptographically secure hash functions.
These two sets of duplicate transactions occurred between November 14 and 15, 2010, spanning approximately 16 hours. Although d5d2....8599 appeared later on the blockchain than e3bf....b468, we still categorize it as the first duplicate transaction.
Duplicate transaction details
The mempool.space block explorer shows the case of the first duplicate transaction appearing in two different blocks. Interestingly, different block explorers may have different default behaviors when displaying duplicate transactions.
Among the four blocks involved, only one block contained other transactions, merging 1 BTC and 19 BTC into a single output of 20 BTC.
Repeatable Output Spendability
The value of each repeated transaction is 50 BTC, involving a total of 200 BTC or 100 BTC, depending on the understanding. As of now, these Bitcoins have not been spent. Theoretically, the person with the relevant private keys can spend these Bitcoins, but only 100 BTC can actually be recovered because the repeated 50 BTC cannot be spent. As for which block these coins will be spent from, it may be undefined.
The Issue of Repeated Transactions
Duplicate transactions can cause confusion for wallets and block explorers, and may also pose potential attack risks. For example, it could lead to double spending or attacks on exchanges.
Solutions
To address the issue of double spending, the Bitcoin community has taken the following measures:
BIP30: Introduced and implemented in 2012, it prohibits the use of duplicate TXIDs for transactions unless the previous TXID has been spent.
BIP34: Activated in 2013, requires the coinbase transaction to include the block height, ensuring that all transactions should be unique.
Stop BIP30 Check: In 2015, due to the implementation of BIP34, nodes stopped the costly BIP30 check.
Potential Risks
Although BIP34 resolved most issues, there is still a potential risk of duplication in some blocks prior to the activation of BIP34, where the scriptSigs of the coinbase transactions may match future block heights. The next block that may have a duplicate transaction is 1,983,702, which is expected to be generated around January 2046.
Conclusion
Considering the difficulty and cost of copying trades, as well as the scarcity of opportunities to exploit it, this vulnerability does not pose a major security threat to Bitcoin. However, due to its uniqueness and long-term impact, it remains an interesting issue worth monitoring. A complete fix for this problem may be required in the future through methods such as soft forks.