Bitcoin Forum

Other => Beginners & Help => Topic started by: vortexz on August 31, 2014, 10:33:07 PM



Title: how many bitcoins will there be ?
Post by: vortexz on August 31, 2014, 10:33:07 PM
I've heard a while ago that there will be a limited numer of bitcoins available and that at some point all bitcoins will be mined.
is that true ?
how many bitcoins are still out there to be mined and by what year will all be mined ?


Title: Re: how many bitcoins will there be ?
Post by: shorena on August 31, 2014, 10:42:42 PM
I've heard a while ago that there will be a limited numer of bitcoins available and that at some point all bitcoins will be mined.
is that true ?

Yes.

how many bitcoins are still out there to be mined and by what year will all be mined ?

The total amount of bitcoin is hardcoded to be 21 million BTC at max. The mining rewards half after a certain amount of time, which will result in almost 21 million btc sometime in the next century (year ~2140)


Title: Re: how many bitcoins will there be ?
Post by: pringbit on August 31, 2014, 11:02:25 PM
Exactly 21 millions, take a look at the bitcoin wiki, you will find some interesting informations:

http://it.wikipedia.org/wiki/Bitcoin


Title: Re: how many bitcoins will there be ?
Post by: AceWallen on September 01, 2014, 02:45:37 AM
Exactly 21 millions, take a look at the bitcoin wiki, you will find some interesting informations:

http://it.wikipedia.org/wiki/Bitcoin

keep in mind, however, that this hard limit can always be changed by altering the source code, should devs decide to do that. in the case of such a fork, it would be up to the miners to prevent the new fork from developing, and to keep the old code intact.

highly unlikely, but just throwing it out there. ;)


Title: Re: how many bitcoins will there be ?
Post by: notlist3d on September 01, 2014, 05:58:06 AM
Exactly 21 millions, take a look at the bitcoin wiki, you will find some interesting informations:

http://it.wikipedia.org/wiki/Bitcoin

keep in mind, however, that this hard limit can always be changed by altering the source code, should devs decide to do that. in the case of such a fork, it would be up to the miners to prevent the new fork from developing, and to keep the old code intact.

highly unlikely, but just throwing it out there. ;)

We will see I highly doubt they would do a fork at this point..... but guess you never know.  I think you have a better chance winning lottery :)


Title: Re: how many bitcoins will there be ?
Post by: BeginToMine on September 01, 2014, 06:08:51 AM
That would couse a huge drop in value of BTC if devs would try to change amount of total BTC possible to mine.


Title: Re: how many bitcoins will there be ?
Post by: santaClause on September 01, 2014, 06:44:15 AM
Exactly 21 millions, take a look at the bitcoin wiki, you will find some interesting informations:

http://it.wikipedia.org/wiki/Bitcoin
This number will technically be a little bit less due to the fact that some TXs have outputs that were sent to unspendible addresses.


Title: Re: how many bitcoins will there be ?
Post by: oceans on September 01, 2014, 12:51:08 PM
In answer to your question on how many there are still out there to be mined I am not sure a solid answer can be given on that but as stated above I do know that there are 21 million out there so I would imagine with bitcoin not being too popular at the moment there may still be quite a lot to be mined but I could not say that for sure.


Title: Re: how many bitcoins will there be ?
Post by: jeroenn13 on September 01, 2014, 01:28:32 PM
Fixed 21 million BTC will be mined.


Title: Re: how many bitcoins will there be ?
Post by: minerpumpkin on September 01, 2014, 02:51:56 PM
Exactly 21 millions, take a look at the bitcoin wiki, you will find some interesting informations:

http://it.wikipedia.org/wiki/Bitcoin

keep in mind, however, that this hard limit can always be changed by altering the source code, should devs decide to do that. in the case of such a fork, it would be up to the miners to prevent the new fork from developing, and to keep the old code intact.

highly unlikely, but just throwing it out there. ;)

Devs could do whatever they want. It is up to the miners and the network though, whether those changes really become reality! That's the beauty of Bitcoin everyone can decide what he agrees to or just leave it be.


Title: Re: how many bitcoins will there be ?
Post by: ensurance982 on September 01, 2014, 03:06:01 PM
Yeah, 21 million like the other people already stated. It's amazing to think about how more than half of those coins are already in existence even though only about 5 years have passed since Bitcoins initial conception. The last coins will me mined decades from now... It's crazy!


Title: Re: how many bitcoins will there be ?
Post by: MinerHQ on September 01, 2014, 03:27:50 PM

21 mil whole ones, infinity decimal ones ;D


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 01, 2014, 03:48:27 PM
The total amount of bitcoin is hardcoded to be less than 21 million BTC . . .

FTFY

Exactly 20999999.9769 millions, take a look at the bitcoin wiki . . .
http://it.wikipedia.org/wiki/Bitcoin

FTFY.  Note that some have been permanently destroyed, so the total in existence when all mining is complete will be less than 20999999 BTC.

keep in mind, however, that this hard limit can always be changed by altering the source code, should devs decide to do that. in the case of such a fork, it would be up to the miners to prevent the new fork from developing, and to keep the old code intact.

Bitcoin operates on the consensus of the users, not the majority of the miners.  Every user running a full node (such as Bitcoin Core) enforces the protocol rules on the entire system.  If a forking change were made to the protocol, those users (and miners) that chose to use the new code would essentially be creating an altcoin (which they might want to try and call "bitcoin", but which wouldn't actually be "bitcoin" unless ALL users and miners switched to software running the new protocol).  If even one user and one miner continue to run the old protocol, then the original bitcoin rules would still exist on the original bitcoin network.

This number will technically be a little bit less due to the fact that some TXs have outputs that were sent to unspendible addresses.

TXs sent to unspendable addresses still exist and can be seen in the blockchain.  They may never be spent, but it doesn't change the total amount that exist. On the other hand, there were some bitcoins early on that were accidentally destroyed by a miner running faulty code.  Those bitcoins no longer exist at all, and never will.  It wasn't very many, but it could happen again in the future.

. . . how many there are still out there to be mined I am not sure a solid answer can be given on that but as stated above I do know that there are less than 21 million out there . . .

FTFY.  Also, as of the time of this post, approximately 13.216 million have been mined so far.  This leaves approximately 7.784 million more that have not yet been mined.

Fixed 21 million BTC will be mined.

Nearly, but not quite.  The total number that should have been mined was 20999999.9769 BTC. A bit less than this will actually be mined due to a bug in a miner's code early on that permanently destroyed some bitcoins from existence.

Yeah, less than 21 million like the other people already stated. It's amazing to think about how more than half of those coins are already in existence even though only about 5 years have passed since Bitcoins initial conception. The last coins will me mined decades from now... It's crazy!

FTFY. Also, It's closer to 6 years than 5 years now.  The last coins will be mined more than a century from now.

21 mil whole ones, infinity decimal ones ;D

No.  See my other responses in this post.


Title: Re: how many bitcoins will there be ?
Post by: sehnye on September 01, 2014, 04:11:11 PM
21 millions as they said, it's the first thing I learned about bitcoins :)


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 01, 2014, 04:27:43 PM
less than 21 millions as they said, it's the first thing I learned about bitcoins :)

FTFY.


Title: Re: how many bitcoins will there be ?
Post by: marcovaldo on September 01, 2014, 06:12:12 PM
13.216 btc million have been mined so far => But it is hard to know how much are "permanently lost", and how much are "being hold by anonymous people", ie how much are currently available right now. Anyway, we will all be dead when the last satoshi will eventually be mined so we do not really mind how much btc will be available in decades.


Title: Re: how many bitcoins will there be ?
Post by: Tammy Chan on September 01, 2014, 06:41:42 PM
Bitcoin operates on the consensus of the users, not the majority of the miners.  Every user running a full node (such as Bitcoin Core) enforces the protocol rules on the entire system.  If a forking change were made to the protocol, those users (and miners) that chose to use the new code would essentially be creating an altcoin (which they might want to try and call "bitcoin", but which wouldn't actually be "bitcoin" unless ALL users and miners switched to software running the new protocol).  If even one user and one miner continue to run the old protocol, then the original bitcoin rules would still exist on the original bitcoin network.

Not sure if I understand this.
Doesn't the longest chain wins?
Say if there are only a small number of users and miners remaining in the unforked version, shouldn't miners in the forked version generate a winning chain of larger total difficulty?


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 01, 2014, 06:55:15 PM
Bitcoin operates on the consensus of the users, not the majority of the miners.  Every user running a full node (such as Bitcoin Core) enforces the protocol rules on the entire system.  If a forking change were made to the protocol, those users (and miners) that chose to use the new code would essentially be creating an altcoin (which they might want to try and call "bitcoin", but which wouldn't actually be "bitcoin" unless ALL users and miners switched to software running the new protocol).  If even one user and one miner continue to run the old protocol, then the original bitcoin rules would still exist on the original bitcoin network.

Not sure if I understand this.
Doesn't the longest chain wins?
Say if there are only a small number of users and miners remaining in the unforked version, shouldn't miners in the forked version generate a winning chain of larger total difficulty?

Longest chain wins when both chains are using the same protocol.  This is why reorgs happen when two bitcoin miners find a block within a fraction of a second of each other.

When the protocols are different and incompatible (known as a forking change), then you end up with an altcoin.  This is why there isn't a "longest chain wins" situation between bitcoin and any of the other altcoins.

Those running the existing protocol won't even recognize blocks as valid if they come from miners running the new protocol.  It won't matter how long the chain is, an invalid block is ignored and tossed out.


Title: Re: how many bitcoins will there be ?
Post by: BurtW on September 01, 2014, 07:02:25 PM
Bitcoin operates on the consensus of the users, not the majority of the miners.  Every user running a full node (such as Bitcoin Core) enforces the protocol rules on the entire system.  If a forking change were made to the protocol, those users (and miners) that chose to use the new code would essentially be creating an altcoin (which they might want to try and call "bitcoin", but which wouldn't actually be "bitcoin" unless ALL users and miners switched to software running the new protocol).  If even one user and one miner continue to run the old protocol, then the original bitcoin rules would still exist on the original bitcoin network.

Not sure if I understand this.
Doesn't the longest chain wins?
Say if there are only a small number of users and miners remaining in the unforked version, shouldn't miners in the forked version generate a winning chain of larger total difficulty?
If you are really interested in the technical details of a hard fork read this thread:  

https://bitcointalk.org/index.php?topic=352734.0

Danny, thanks for answering all the misinformation in this thread, if you didn't do it I was about to.


Title: Re: how many bitcoins will there be ?
Post by: Tammy Chan on September 01, 2014, 07:24:39 PM
Thanks Danny and BurtW (and casascius, DeathAndTaxes, etc that posted in BurtW's linked thread).
I understand the fork issue more better now. :)


Title: Re: how many bitcoins will there be ?
Post by: shorena on September 02, 2014, 09:25:33 AM
The total amount of bitcoin is hardcoded to be less than 21 million BTC . . .

FTFY
-snip-

I was wondering when you would show up to correct all those wrong answers ;)

to "defend" my own post:

Quote
The total amount of bitcoin is hardcoded to be 21 million BTC at max.

The hardcoded limit is defined [1] as exactly 21 million in MAX_MONEY. While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.


[1] https://github.com/bitcoin/bitcoin/blob/2e731f24b5a5c894e013a6d752f1cd409303e916/src/core.h#L21


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 02, 2014, 10:49:35 AM
The total amount of bitcoin is hardcoded to be less than 21 million BTC . . .

FTFY
-snip-

I was wondering when you would show up to correct all those wrong answers ;)

Just having some fun.  Only a few of the answers were truly wrong, such as "it would be up to the miners to prevent the new fork from developing" and "how many there are still out there to be mined I am not sure a solid answer can be given on that".

20999999.9769 is so close to 21 million, that I don't really consider it to be "wrong", although I do find it a bit annoying when people say "exactly 21 million".  Better answers are:

  • nearly 21 million
  • almost 21 million
  • approximately 21 million
  • less than 21 million
  • no more than 21 million
  • practically 21 million
  • etc.

to "defend" my own post:

Quote
The total amount of bitcoin is hardcoded to be 21 million BTC at max.

The hardcoded limit is defined [1] as exactly 21 million in MAX_MONEY.

Touché!

MAX_MONEY is defined as:
21000000 * COIN

and COIN is defined as:
100000000

This isn't used to determine how much will be created, but rather to check to see if any errors have occurred (if a transaction or a fee is larger than MAX_MONEY, then it can't possibly be valid). Given the hardcoded validation routine, your answer is correct.

While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.

It seems odd to say something "is the limit" if it is higher than the maximum possible value.  It's a bit like saying that the limit of human lifespan is 10,000 years, just because I define MAX_LIFESPAN as 10,000 in some program.  And then saying:

"While -due the nature of actual human life- this might never be reached, it is still the limit."



Title: Re: how many bitcoins will there be ?
Post by: Jamie_Boulder on September 02, 2014, 12:29:44 PM
21m is the limit, weather we ever get there is a completely different story.


Title: Re: how many bitcoins will there be ?
Post by: shorena on September 02, 2014, 02:16:39 PM
-snip-
While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.

It seems odd to say something "is the limit" if it is higher than the maximum possible value.  It's a bit like saying that the limit of human lifespan is 10,000 years, just because I define MAX_LIFESPAN as 10,000 in some program.  And then saying:

"While -due the nature of actual human life- this might never be reached, it is still the limit."


On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years. I also think its fine to say there will be almost (see your own list for more) 21 million coins.

Also wouldnt it be possible to increase the precision which determines how much bitcoin (or rather satoshi in the future) will be generated.  E.g. use 128, 256, 512, etc. bit integer instead of 64 bit integer. So instead of setting the reward to zero [1] it would be fractions of a satoshi... while AFAIK we still wouldnt reach 21 million coins in finite time the difference would be infinitesimal small. I think it would require a fork though, as "old" clients wouldn know how to handle .1 satoshi.


[1] https://github.com/bitcoin/bitcoin/blob/93f97aab629d6d3b7e2c296b24fc37eef9502cd1/src/main.cpp#L1159


Title: Re: how many bitcoins will there be ?
Post by: Wusolini on September 02, 2014, 02:36:07 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 02, 2014, 03:08:24 PM
On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years.

Well, remember that MAX_MONEY is NOT defined as 21000000.
It is defined as 21000000 * COIN

Since COIN is defined as 100000000, that makes MAX_MONEY = 2100000000000000.

The actual number of integer units that will be created is less than 2099999997690000.

This means that MAX_MONEY is off by 2310000 (2.31 million!).

I also think its fine to say there will be almost (see your own list for more) 21 million coins.

On this we agree.

Also wouldnt it be possible to increase the precision which determines how much bitcoin (or rather satoshi in the future) will be generated.  E.g. use 128, 256, 512, etc. bit integer instead of 64 bit integer. So instead of setting the reward to zero [1] it would be fractions of a satoshi... while AFAIK we still wouldnt reach 21 million coins in finite time the difference would be infinitesimal small. I think it would require a fork though, as "old" clients wouldn know how to handle .1 satoshi.

This would be a forking change.  Not only would "old" clients not know how to handle 0.1 satoshi, but to end up with a different total, you'd have to change the defined value of COIN or in some other way alter the size of nSubsidy.  All of the block rewards would have to become a larger number of integer units and you'd have to interpret transactions in the blockchain differently depending on whether they occurred before or after the block where the new definition was first accepted.

Having a larger integer type while still storing the exact same integer in it wouldn't change the total amount of bitcoins created.


Title: Re: how many bitcoins will there be ?
Post by: shorena on September 02, 2014, 07:23:42 PM
On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years.

Well, remember that MAX_MONEY is NOT defined as 21000000.
It is defined as 21000000 * COIN

Since COIN is defined as 100000000, that makes MAX_MONEY = 2100000000000000.

The actual number of integer units that will be created is less than 2099999997690000.

This means that MAX_MONEY is off by 2310000 (2.31 million!).

Apparently I didnt think this through, ofc with Satoshi in mind the difference is huge.

-snip-
This would be a forking change.  Not only would "old" clients not know how to handle 0.1 satoshi, but to end up with a different total, you'd have to change the defined value of COIN or in some other way alter the size of nSubsidy.  All of the block rewards would have to become a larger number of integer units and you'd have to interpret transactions in the blockchain differently depending on whether they occurred before or after the block where the new definition was first accepted.

Having a larger integer type while still storing the exact same integer in it wouldn't change the total amount of bitcoins created.

Well a larger type alone would result in plenty wasted (disk/blockchain/memory) space ;) Without a complete restart (and thus the creation of an altcoin) this would certainly result in a very messy protocol. It sounds like the kind of change where you make a little mistake and someone exploits it to actually double the amount of bitcoin is his/her wallet.

Somewhat related: I just found BIP42 [1] and the pull request [2] for it. Love it.

Quote
Although it is widely believed that Satoshi was an inflation-hating goldbug he never said this, and in fact programmed Bitcoin's money supply to grow indefinitely, forever. He modeled the monetary supply as 4 gold mines being discovered per mibillenium (1024 years), with equal intervals between them, each one being depleted over the course of 140 years.

Quote
aceat64 commented on 2 Apr
This is clearly a bug and one serious enough that I believe if we do not fix it in a timely manner it could destroy confidence in the Bitcoin network.

gmaxwell commented on 2 Apr
Timely manner? ... Well I'm absolutely confident that it will be fixed sometime in the hundreds of years required before it matters.

aceat64 commented on 2 Apr
The longer we delay, the more likely it is that a miner alive today could live until this bug occurs. This gives them a greater incentive to not implement the fix. This is particularly true for any toddlers or infants in charge of sizeable farms.

[1] https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki
[2] https://github.com/bitcoin/bitcoin/pull/3842


Title: Re: how many bitcoins will there be ?
Post by: PublicKey on September 02, 2014, 08:00:22 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo


Title: Re: how many bitcoins will there be ?
Post by: BurtW on September 02, 2014, 09:14:18 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?


Title: Re: how many bitcoins will there be ?
Post by: minerpumpkin on September 02, 2014, 09:19:33 PM
Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?


Title: Re: how many bitcoins will there be ?
Post by: BurtW on September 02, 2014, 09:41:22 PM
Too bad no one here will be around to see it happen.


Title: Re: how many bitcoins will there be ?
Post by: DannyHamilton on September 02, 2014, 09:47:14 PM
Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?

I think it was expected that it *could* reset after 256 years. 

If I understand the problem correctly, the actual behavior is undefined and left up to the hardware to handle.  The idea was that 250 years from now, a hardware manufacturer could take advantage of the problem to fork the network or cause other problems.

Regardless, the issue was resolved.  If you are still here 250 years from now, you won't have to worry about it.


Title: Re: how many bitcoins will there be ?
Post by: bitsmichel on September 02, 2014, 09:48:40 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.


Title: Re: how many bitcoins will there be ?
Post by: BurtW on September 02, 2014, 09:56:53 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.
True, but where did the 1% number come from?  Out of PublicKey's ass?


Title: Re: how many bitcoins will there be ?
Post by: shorena on September 02, 2014, 09:58:55 PM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?

Well, technically the bitcoins are not gone, its just that noone can spend them.

Anyway there was a post about it[1] by DeathAndTaxes not so long ago. Those estimates are nowhere near 1%

Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?

Yep, fixed though.

-snip-
Somewhat related: I just found BIP42 [1] and the pull request [2] for it. Love it.

-snip-

[1] https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki
[2] https://github.com/bitcoin/bitcoin/pull/3842

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.
True, but where did the 1% number come from?  Out of PublicKey's ass?

IMHO (see above why), yes! People tend to pull percentages out of their behinds all the time.


[1] https://bitcointalk.org/index.php?topic=675321.0


Title: Re: how many bitcoins will there be ?
Post by: Nagato4 on September 03, 2014, 12:31:18 AM
there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?

Well, technically the bitcoins are not gone, its just that noone can spend them.

Anyway there was a post about it[1] by DeathAndTaxes not so long ago. Those estimates are nowhere near 1%

True.
The estimate made by D&T (~2745 btc) is the number of bitcoin that can never be redeemed.

On the other hand, when we use the word "gone", we usually include the coin burnt for altcoin, coin lost due to losing the wallet file or long passphrase, etc. Some even consider satoshi's bitcoin "gone", believing that he will never come back to spend it.