Sending Fractions of a Coin or Multiple Coins

Published by Mario Oettler on

Let us go back to the transactions. For simplicity, we said that Alice sends one coin to Bob. But what if she wants to send him a smaller amount? In Bitcoin, only complete coins can be consumed. But they can be split into multiple recipients.

Alice has 1 coin and wants to send 0.7 coins to Bob. So, she creates a transaction with one input and two outputs (recipients). One recipient is Alice herself. This is a change address where the excess payment is returned. It is like in a shop where you hand over a Euro bill to the cashier and receive 0.3 Cents back as change.

Alice wants to send 0.7 coins to Bob and receives 0.3 coins as change.

Alice would create a transaction saying:

Bob is allowed to spend 0.7 coins from Alice, and Alice is allowed to spend 0.3 coins from Alice. In total, this adds up to one coin. This way, Bob receives 0.7 coins which he can spend and Alice 0.3 coins as change.

Now, Alice wants to send more than one coin to Bob. This is done by creating a transaction with two or more inputs. Here, Alice wants to send 1.5 coins to Bob, but she has only two unspent transactions available with 1 coin each.

Alice combines two unspent transaction outputs in one transaction.

She would now create a transaction saying. Bob is allowed to spend 1.5 coins and Alice is allowed to spend 0.5 coins. Take transactions A and B as input. In total, we have an input of two coins and an output of two coins.

Categories:

if()