Bitcoin Forum
May 12, 2024, 12:27:56 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What determines Bitcoins decimal system?  (Read 214 times)
8CommaClub (OP)
Jr. Member
*
Offline Offline

Activity: 118
Merit: 3


View Profile
November 23, 2018, 03:28:08 PM
 #1

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?

1F8kqQx3eSwxbyoFvMYLtK4KBMMVJx3sjA
1715473676
Hero Member
*
Offline Offline

Posts: 1715473676

View Profile Personal Message (Offline)

Ignore
1715473676
Reply with quote  #2

1715473676
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
November 23, 2018, 03:30:08 PM
 #2

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?


It has simply been "determined" that way. There is not really any technical reason other than 10^8 being a somewhat "convenient" number.

See https://bitcoin.stackexchange.com/questions/31933/why-is-bitcoin-defined-as-having-8-decimal-places

Which points to this answer:
I remember this discussion, actually.  

Finney, Satoshi, and I discussed how divisible a Bitcoin ought to be.  Satoshi had already more or less decided on a 50-coin per block payout with halving every so often to add up to a 21M coin supply.  Finney made the point that people should never need any currency division smaller than a US penny, and then somebody (I forget who) consulted some oracle somewhere like maybe Wikipedia and figured out what the entire world's M1 money supply at that time was.  

We debated for a while about which measure of money Bitcoin most closely approximated; but M2, M3, and so on are all for debt-based currencies, so I agreed with Finney that M1 was probably the best measure.  

21Million, times 10^8 subdivisions, meant that even if the whole word's money supply were replaced by the 21 million bitcoins the smallest unit (we weren't calling them Satoshis yet)  would still be worth a bit less than a penny, so no matter what happened -- even if the entire economy of planet earth were measured in Bitcoin -- it would never inconvenience people by being too large a unit for convenience.



To quote Arturo's second part of his answer.
Quote from: Arturo Torres Sánchez
It's also worth noting that this decision means the total Bitcoin supply is approximately 250.89, which means it's smaller than the maximum value for a 64-bit integer (263-1), and smaller than the first integer that can't be exactly represented in a double-precision floating-point number (253 + 1), so that standard programming languages can deal with Bitcoin amounts without requiring custom implementations or dealing with overflowing
2 = https://bitcoinmagazine.com/articles/satoshis-genius-unexpected-ways-in-which-bitcoin-dodged-some-cryptographic-bullet-1382996984/
I'm not entirely sure if this was known at the time of implementation though.

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?

Yes?

8CommaClub (OP)
Jr. Member
*
Offline Offline

Activity: 118
Merit: 3


View Profile
November 23, 2018, 03:51:24 PM
 #3

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?


It has simply been "determined" that way. There is not really any technical reason other than 10^8 being a somewhat "convenient" number.

See https://bitcoin.stackexchange.com/questions/31933/why-is-bitcoin-defined-as-having-8-decimal-places

Which points to this answer:
I remember this discussion, actually. 

Finney, Satoshi, and I discussed how divisible a Bitcoin ought to be.  Satoshi had already more or less decided on a 50-coin per block payout with halving every so often to add up to a 21M coin supply.  Finney made the point that people should never need any currency division smaller than a US penny, and then somebody (I forget who) consulted some oracle somewhere like maybe Wikipedia and figured out what the entire world's M1 money supply at that time was. 

We debated for a while about which measure of money Bitcoin most closely approximated; but M2, M3, and so on are all for debt-based currencies, so I agreed with Finney that M1 was probably the best measure. 

21Million, times 10^8 subdivisions, meant that even if the whole word's money supply were replaced by the 21 million bitcoins the smallest unit (we weren't calling them Satoshis yet)  would still be worth a bit less than a penny, so no matter what happened -- even if the entire economy of planet earth were measured in Bitcoin -- it would never inconvenience people by being too large a unit for convenience.



To quote Arturo's second part of his answer.
Quote from: Arturo Torres Sánchez
It's also worth noting that this decision means the total Bitcoin supply is approximately 250.89, which means it's smaller than the maximum value for a 64-bit integer (263-1), and smaller than the first integer that can't be exactly represented in a double-precision floating-point number (253 + 1), so that standard programming languages can deal with Bitcoin amounts without requiring custom implementations or dealing with overflowing
2 = https://bitcoinmagazine.com/articles/satoshis-genius-unexpected-ways-in-which-bitcoin-dodged-some-cryptographic-bullet-1382996984/
I'm not entirely sure if this was known at the time of implementation though.

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?

Yes?

Thanks for the information. How about this one?

https://www.researchgate.net/publication/322416133_A_New_Method_of_Golden_Ratio_Computation_for_Faster_Cryptosystems

How would you go about trying to create your own crypto using this?

1F8kqQx3eSwxbyoFvMYLtK4KBMMVJx3sjA
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
November 23, 2018, 04:05:19 PM
 #4

So Bitcoin has 21,000,000.00000000 in existence.

Bitcoin does not 21.000.000 in existence and never will have.
The actual maximum supply is below 21 million. And the amount of coins in circulation currently is at about 17.3 million (ignoring 'lost' coins).

The maximum supply is NOT hardcoded. It can be derived from the function which regulates the amount of freshly generated bitcoins by mining.



How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?

The actual denomination is handled in the source code.

You can choose 'as many' decimal places as you want when creating/forking a coin.

HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
November 23, 2018, 06:51:39 PM
Last edit: November 24, 2018, 09:49:09 AM by HeRetiK
Merited by suchmoon (4), dbshck (4), bones261 (2), ABCbits (1)
 #5

So Bitcoin has 21,000,000.00000000 in existence. How does someone determine how many zeros are placed behind it? Could someone make an asset that has 1 coin but 1.910980182309824791827981240912094109249129837 in total token supply ?
Yes?

Not using 64 bit Integers such as Bitcoin uses.

Even using unsigned 64 bit Integers the largest number that can be stored precisely is 2^64 or roughly 10^19. OP's example of 1.910980182309824791827981240912094109249129837 being in the range of 10^45, would require 256 bit Integers (ie. 2^256 or roughly 10^77) as even 128 bit integers (~ 10^38) would lack precision. Note that in common programming languages 64 bit integers is all you get (if even that), 128 bit if you have long doubles at your disposal. Everything beyond that requires a custom implementation.

Side note on precision, for those unfamiliar with software development: Storing a number beyond the precision level of a numeric data-type leads to one of the following outcomes: For (a) integers, the number wraps around, like it would with the odomoter of a car (ie. starting from zero, if the integer is unsigned or starting from the lowest negative number, if the integer is signed), for (b) floating point numbers (ie. if the the position of the decimal point is stored as well), it essentially starts truncating the last few digits. Neither which is desirable for monetary transactions.


Thanks for the information. How about this one?

https://www.researchgate.net/publication/322416133_A_New_Method_of_Golden_Ratio_Computation_for_Faster_Cryptosystems

How would you go about trying to create your own crypto using this?

Not as part of token supply calculations. This paper is suggesting an alternative to RSA's asymmetric encryption scheme and is unlikely to make any sense as far as storing transaction amounts is concerned.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
November 25, 2018, 09:26:16 PM
 #6

@HeRetik,

You’d have to either turn to using a programming language he like python and then a compiler with enough precision to make your integers. Alternatively, you’d have to write your own method for a bigger integer or store them as a string.



I’m not sure if it’s been touched on yet, but bitcoin stores it’s amounts in satoshi everywhere. Blocks use the unit of satoshi. I can imagine us having to try to break down satoshis in a few years if bitcoin really takes off (and I’m not looking forward to that block, if it happens in the next 70-80 years, I’ll likely see it).
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!