mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-23 07:08:13 +00:00
CH02::Alice pays Bob: change example from laptop to podcast episode
Before earlier edits, the second edition text for this chapter was about buying a cup of coffee. The edits changed it to a laptop. The risk profile of a cup of coffee and a laptop are different, making some parts of the text problematic, e.g. Bob accepting payment without waiting for confirmation. This update replaces the example with Alice buying a premium podcast episode, which has a very low risk profile.
This commit is contained in:
parent
3d9794f65a
commit
4725f0f51d
@ -69,14 +69,14 @@ Alice, introduced in the previous chapter, is a new user who has just
|
||||
acquired her first bitcoins. In <<getting_first_bitcoin>>, Alice met with
|
||||
her friend Joe to exchange some cash for bitcoins. Since then, Alice has
|
||||
bought additional bitcoins. Now Alice will make
|
||||
her first retail transaction, buying a laptop from Bob's online store.
|
||||
her first retail transaction, buying access to a premium podcast episode from Bob's online store.
|
||||
|
||||
Bob's web store recently started accepting bitcoin payments by adding a
|
||||
bitcoin option to its website. The prices at Bob's store are listed in
|
||||
the local currency (US dollars), but at checkout, customers have the
|
||||
option of paying in either dollars or bitcoin.
|
||||
|
||||
Alice shops for a laptop and proceeds to the checkout page. At checkout,
|
||||
Alice finds the podcast episode she wants to buy and proceeds to the checkout page. At checkout,
|
||||
Alice is offered the option to pay with bitcoin, in addition to the
|
||||
usual options. The checkout cart displays the price in US dollars and
|
||||
also in bitcoin (BTC), at Bitcoin's prevailing exchange rate.
|
||||
@ -199,12 +199,12 @@ previous transaction's output as its input. In the previous chapter,
|
||||
Alice received bitcoin from her friend Joe in return for cash. That
|
||||
transaction created a bitcoin value locked by Alice's key. Her new
|
||||
transaction to Bob's Store references the previous transaction as an
|
||||
input and creates new outputs to pay for the laptop and receive change.
|
||||
input and creates new outputs to pay for the podcast and receive change.
|
||||
The transactions form a chain, where the inputs from the latest
|
||||
transaction correspond to outputs from previous transactions. Alice's
|
||||
key provides the signature that unlocks those previous transaction
|
||||
outputs, thereby proving to the Bitcoin network that she owns the funds.
|
||||
She attaches the payment for the laptop to Bob's address, thereby
|
||||
She attaches the payment for the podcast to Bob's address, thereby
|
||||
"encumbering" that output with the requirement that Bob produces a
|
||||
signature in order to spend that amount. This represents a transfer of
|
||||
value between Alice and Bob. This chain of transactions, from Joe to
|
||||
@ -370,10 +370,10 @@ View the http://bit.ly/1tAeeGr[transaction from Joe to Alice].
|
||||
====
|
||||
|
||||
As you can see, Alice's wallet contains enough bitcoin in a single
|
||||
unspent output to pay for the laptop. Had this not been the case,
|
||||
unspent output to pay for the podcast. Had this not been the case,
|
||||
Alice's wallet application might have to "rummage" through a pile of
|
||||
smaller unspent outputs, like picking coins from a purse until it could
|
||||
find enough to pay for the laptop. In both cases, there might be a need
|
||||
find enough to pay for the podcast. In both cases, there might be a need
|
||||
to get some change back, which we will see in the next section, as the
|
||||
wallet application creates the transaction outputs (payments).
|
||||
|
||||
@ -393,7 +393,7 @@ for a signature from Bob.
|
||||
|
||||
This transaction will also include a second output, because Alice's
|
||||
funds are in the form of a 0.10 BTC output, too much money for the 0.015
|
||||
BTC cup of laptop. Alice will need 0.085 BTC in change. Alice's change
|
||||
BTC podcast. Alice will need 0.085 BTC in change. Alice's change
|
||||
payment is created by Alice's wallet as an output in the very same
|
||||
transaction as the payment to Bob. Essentially, Alice's wallet breaks
|
||||
her funds into two payments: one to Bob and one back to herself. She can
|
||||
@ -670,7 +670,7 @@ thus providing assurance that the miners accepted it as valid.
|
||||
|
||||
Bob can now spend the output from this and other transactions. For
|
||||
example, Bob can pay a contractor or supplier by transferring value from
|
||||
Alice's laptop payment to these new owners. Most likely, Bob's bitcoin
|
||||
Alice's podcast payment to these new owners. Most likely, Bob's bitcoin
|
||||
software will aggregate many small payments into a larger payment,
|
||||
perhaps concentrating all the day's bitcoin revenue into a single
|
||||
transaction. This would aggregate the various payments into a single
|
||||
|
Loading…
Reference in New Issue
Block a user