30
13
What is the meaning of the term "unspent output" in the Bitcoin protocol?
30
13
What is the meaning of the term "unspent output" in the Bitcoin protocol?
42
An unspent output is simply an output of a transaction which isn't yet an input of another transaction.
To take the example from ripper234's answer (in which generated coins are immediately spendable, and we don't have to wait 100 blocks for them to mature), where:
So, after three blocks, there are four unspent outputs:
And there are two spent outputs:
Note that unspent outputs don't merge together. The two unspent 50 BTC outputs at address A are separate, and will remain separate at least until they are spent in a transaction
12
It means "Bitcoins that were not spent".
Imagine the early days, when the blockchain was of length 3 (imaginary chain of events):
So, after 3 blocks, this is the "sum total":
Total 150 BTC in unspent outputs. These are the "unspent coins" - all the generated BTC, without counting transactions that moved BTC twice.
I don't quite understand what you mean by "bitcoins that were not spent". So what is a bitcoin that is spent? When a TX sends 20 BTC from A to B, aren't those coins considered spent? When will a coin be considered spent? – Pacerier – 2013-08-16T05:22:37.037
1@Pacerier The coins in A are considered spent after this tx, but the coins now reside in B in an "unspent form". Note that it's not bitcoins that are actually spent or unspent, it's "outputs". Read Chris' answer for more details. – ripper234 – 2013-08-18T18:06:03.443
Then the number of unspent coins will only increase and never decrease right? What's the point, I mean, Isn't the number of unspent BTCs forever equivalent to the number of BTCs? – Pacerier – 2014-05-22T21:19:36.700
Yes, to total value of unspent transaction output are the total bitcoin in circulation. – Haddar Macdasi – 2015-03-11T15:53:08.167
I must be missing something, as I cant create any logic which can explain the above. A has 50 (I am assuming this is its balance, which we are saying is also called unspent outputs), and sends 20 to B and 30 to C. Now A has zero. Later A magically has 50 again, then 100. Does this mean A started off with more than 50? – John Little – 2018-02-05T13:25:55.743
In the second row, surely A's output WERE spent by making them inputs of B and C, so why are they still unspent? – John Little – 2018-02-05T13:26:02.263
@JohnLittle A is the miner, he got another 50 for the second block he mined. – xczzhh – 2018-02-26T09:34:41.917
Can we assume that: Total balance = Sum of unspent transactions – DeveScie – 2018-05-23T03:44:50.753
@Umarov I think the Total balance = Sum of unspent transactions - Sum of spent transactions. – zhaozhiming – 2018-06-07T07:12:12.317
@zhaozhiming No I don't think so. Read here and here
– DeveScie – 2018-06-08T00:16:56.820@Umarov Yes, you're right. I misunderstood it. Thanks. – zhaozhiming – 2018-06-10T10:03:00.990