<p>There are multiple parts of the protocol that play together to concert a solution to the doublespend problem.</p>
<p>Transactions generally have first-party mutability: just like Mallory can promise the same $10-bill to both Alice and Bob, a sender of bitcoins can create multiple conflicting versions of a transaction.</p>
<p>Bitcoin is a distributed system with transmission delays: we cannot guarantee that every participant sees the same messages at the same time. It follows that we cannot prevent a sender from submitting conflicting transactions to different network participants. However, a monetary system's purpose is to track ownership of funds—just like Mallory can promise both, but finally only hand the bill to either Alice or Bob, we want bitcoins to only be transferred to one recipient.</p>
<p>So, if we cannot prevent the network from having conflicting information, how do we converge every participant on a single shared truth?
We need a mechanism that produces a canonical order of the events in the network.</p>
<p>To that end, we hold a lottery. Each participant submits their recount of the events as block candidates. Eventually, we draw a winning lot. Naturally, we require that a block must be a legitimate continuation of our shared journal: transactions must be valid, and the block cannot contain any conflicting instructions. Invalid block candidates just get discarded, but a winning block is promptly announced to all; by randomly promoting a single author's point-of-view to the shared truth, we break the tie.</p>
<p>Bitcoin's proof-of-work mechanism takes here the role of the lottery. Every hashing attempt by miners is the submission of a lot. Since miners have real-world costs for hardware investments and energy, they're incentivized to build on each other's blocks rather than paying to enter a separate lottery to write a diverging history. Over time, as more blocks are found, transactions get buried under a heap of proof-of-work and they become probabilistically immutable.</p>
<p>As the emerging blockchain is single-file and each block may not contain conflicting transactions, bitcoins can now only be spent once.</p>
<p>So, who was responsible? Every node on the network enforces the rules, guaranteeing that blocks don't create new money or spend it twice. The miners take the role of authoring block candidates, and they must not include double-spends lest they get rejected by the nodes. However, the proof-of-work mechanism regulates the frequency with which blocks are found and induces the economic incentives for collaboration and convergence.</p>

CC BY-SA 4.0
2022-05-15T14:38:24.807Z
So, as I see it. The primary purpose of the bitcoin protocol is precisely to solve the double-spend problem in a trustless manner (i.e., without the needed of a trusted intermediary)?
StatsScared
CC BY-SA 4.0
2022-05-15T22:32:15.707Z
Do we expend all this effort just to create a trustless, censorship-resistant transaction ordering mechanism to solve the double-spending problem? Yes, exactly: because we don't know of a way to do this without sacrificing some of the properties we look for.
Murch
CC BY-SA 4.0
2022-05-14T18:20:05.453Z
2022-05-15T22:32:14.080Z
2022-05-15T22:32:14.080Z
Murch
<p>I understand that a key innovation in bitcoin is that it solves a key problem faced by previous attempts at a digital currency: the double-spend problem.</p>
<p>In addition, I also understand that the bitcoin protocol involves several steps, from the moment a transaction is broadcasted to when the transaction has been included in a valid block of the bitcoin blockchain.</p>
<p>At what stage does the bitcoin protocol tacked the double-spend problem? E.g., can the 'solution' be attributed to the proof-of-work mechanism or is it tackle by several elements?</p>
<p><strong>EDIT:</strong> I am thinking of the bitcoin protocol in 'stages'. But do correct me if this is the wrong framing.</p>

<proof-of-work><doublespend><consensus>
What stage of the bitcoin protocol deals (or 'solves') the double-spend problem?
StatsScared
# What stage of the bitcoin protocol deals (or 'solves') the double-spend problem?

(Asked by: username_0 on 2022-05-14)

I understand that a key innovation in bitcoin is that it solves a key problem faced by previous attempts at a digital currency: the double-spend problem.

In addition, I also understand that the bitcoin protocol involves several steps, from the moment a transaction is broadcasted to when the transaction has been included in a valid block of the bitcoin blockchain.

At what stage does the bitcoin protocol tacked the double-spend problem? E.g., can the 'solution' be attributed to the proof-of-work mechanism or is it tackle by several elements?

**EDIT:** I am thinking of the bitcoin protocol in 'stages'. But do correct me if this is the wrong framing.

**Tags:** proof-of-work, doublespend, consensus


---

## 1 answers

### Answer by username_1 on 2022-05-14. Score: 2 | Accepted answer

There are multiple parts of the protocol that play together to concert a solution to the doublespend problem.

Transactions generally have first-party mutability: just like Mallory can promise the same $10-bill to both Alice and Bob, a sender of bitcoins can create multiple conflicting versions of a transaction.

Bitcoin is a distributed system with transmission delays: we cannot guarantee that every participant sees the same messages at the same time. It follows that we cannot prevent a sender from submitting conflicting transactions to different network participants. However, a monetary system's purpose is to track ownership of funds—just like Mallory can promise both, but finally only hand the bill to either Alice or Bob, we want bitcoins to only be transferred to one recipient.

So, if we cannot prevent the network from having conflicting information, how do we converge every participant on a single shared truth?
We need a mechanism that produces a canonical order of the events in the network.

To that end, we hold a lottery. Each participant submits their recount of the events as block candidates. Eventually, we draw a winning lot. Naturally, we require that a block must be a legitimate continuation of our shared journal: transactions must be valid, and the block cannot contain any conflicting instructions. Invalid block candidates just get discarded, but a winning block is promptly announced to all; by randomly promoting a single author's point-of-view to the shared truth, we break the tie.

Bitcoin's proof-of-work mechanism takes here the role of the lottery. Every hashing attempt by miners is the submission of a lot. Since miners have real-world costs for hardware investments and energy, they're incentivized to build on each other's blocks rather than paying to enter a separate lottery to write a diverging history. Over time, as more blocks are found, transactions get buried under a heap of proof-of-work and they become probabilistically immutable.

As the emerging blockchain is single-file and each block may not contain conflicting transactions, bitcoins can now only be spent once.

So, who was responsible? Every node on the network enforces the rules, guaranteeing that blocks don't create new money or spend it twice. The miners take the role of authoring block candidates, and they must not include double-spends lest they get rejected by the nodes. However, the proof-of-work mechanism regulates the frequency with which blocks are found and induces the economic incentives for collaboration and convergence.

> **Comments:**
> **username_0**: So, as I see it. The primary purpose of the bitcoin protocol is precisely to solve the double-spend problem in a trustless manner (i.e., without the needed of a trusted intermediary)?  
> **username_1**: Do we expend all this effort just to create a trustless, censorship-resistant transaction ordering mechanism to solve the double-spending problem? Yes, exactly: because we don't know of a way to do this without sacrificing some of the properties we look for.  

---

