Pages:
Author

Topic: Significant Decimal Precision (Read 559 times)

legendary
Activity: 2268
Merit: 18509
July 20, 2019, 10:30:23 AM
#26
So, if the base protocol may, given consensus, be upgraded at some point take on the additional decimal places to accommodate settling LN millisats to the blockchain, we'd have the option at that point of extending the halvings as well.
True. It also depends on when the additional decimal places are added. After the 10th halving, the block reward will reduce from 0.09765625 BTC to 0.04882812 BTC, with a rounding error of 0.5 satoshi being lost. This error is compounded in all future halvings, and added to with further rounding errors in subsequent halvings.

If we added an additional 3 decimal places before then, then we would end up going to 43 halvings instead of 33, and the total mined BTC would be 20,999,999.99997060000, for an increase in 0.0230706 BTC.

If we waited until just before the final currently planned halving, when the block reward was 1 satoshi, to add another 3 decimal places, then we would add 9 instead of 10 additional halvings, and the final mined bitcoin would be 20,999,999.97898740000, for a difference of 0.0020874 BTC more than planned, but 0.0209832 BTC less than the former scenario detailed above.

If we added 3 more decimal places somewhere between these two extremes, then obviously the final amount of added bitcoin would lie somewhere in between ~0.002 and ~0.02 BTC.
legendary
Activity: 3724
Merit: 3063
Leave no FUD unchallenged
July 20, 2019, 08:20:16 AM
#25
So, if the base protocol may, given consensus, be upgraded at some point take on the additional decimal places to accommodate settling LN millisats to the blockchain, we'd have the option at that point of extending the halvings as well.  Worth considering, I guess.  I'm sure miners won't have any complaints, heh.
legendary
Activity: 2268
Merit: 18509
July 19, 2019, 08:32:24 PM
#24
You can read more about it here: https://en.bitcoin.it/wiki/Controlled_supply#Projected_Bitcoins_Long_Term

The total number of bitcoins in existence asymptotically approaches 21 million. After the penultimate halving, the block reward will only be 1 satoshi per block, and so after the final halving, there will be no block reward, and we will have mined 20,999,999.9769 BTC. It does not matter how many additional decimal positions you added, or how much you further subdivide a satoshi, you would never cross the 21 million asymptote. As ETF says, it is essentially an infinite series, becoming infinitely close to 21 million with infinite more decimal places, but never crossing.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
July 19, 2019, 01:44:56 PM
#23
--snip--

So yeah, that's another ~20 years without crossing 21 million BTC and I'm sure if I kept going, it's okay for some time, or possibly forever.

Actually, it will never cross 21 million BTC as long as the only thing changed is halving every 210.000 blocks happen forever rather than until the mining reward is 1 satoshi.

It's just like math problem/logic where if you sum 1/2, 1/4, 1/8, 1/16, ..., 1/2n is less than 1
legendary
Activity: 3724
Merit: 3063
Leave no FUD unchallenged
July 19, 2019, 10:33:41 AM
#22
I hear this mythical date in 2140 when we find the last scrap.. but does it have to be.. if only we could keep halving.. for-EVER!
You'll be adding an ever smaller number of Bitcoins per block. There's no point increasing the total Bitcoin supply by - say - 0.00000000000001% per block. The limited supply is by design, and it's one of the things that makes Bitcoin better than fiat.

It would still take some time to exceed the 21 million cap, though.  My understanding was that currently there will never be more than 20999999.9769 BTC in circulation (or technically 20999949.9769 BTC due to the unspendable genesis block).  Adding more decimal places and dealing with sub-satoshi units would not create enough extra BTC to make up for the 2310000 satoshi shortfall for many years, if ever.

//EDIT:  Unless my math is wrong, which I'm starting to think it is.

//DOUBLE_EDIT:  Nope, seems okay:

20999999.97690000
+
(210000 blocks x .5 satoshi) 0.00105000
=
20999999.97795000
+
(210000 blocks x .25 satoshi) 0.00052500   
=
20999999.97847500
+
(210000 blocks x .125 satoshi) 0.00026250
=
20999999.97873750
+
(210000 blocks x .0625 satoshi) .00013125
=
20999999.97886875
+
(210000 blocks x .03125 satoshi) .000065625  (nine decimal places)
=
20999999.978934375  (nine decimal places)

So yeah, that's another ~20 years without crossing 21 million BTC and I'm sure if I kept going, it's okay for some time, or possibly forever.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
July 19, 2019, 06:18:16 AM
#21
What about coloured coins ?

You need to colour some BTC, and you need lots of decimal places, to have lots of decimal places on your token.
I don't think the Bitcoin protocol should be changed for external needs that can be used on a side chain.
hero member
Activity: 718
Merit: 545
July 19, 2019, 05:30:08 AM
#20
my last attempt..

What about coloured coins ?

You need to colour some BTC, and you need lots of decimal places, to have lots of decimal places on your token.

1 coloured BTC  can represent 10,000 tokens to 4 decimal places. great... ($62 billion spent on just SMS messages last year (all this 2FA), over a trillion sent and they want a token to represent each one.. )
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
July 19, 2019, 03:27:57 AM
#19
I hear this mythical date in 2140 when we find the last scrap.. but does it have to be.. if only we could keep halving.. for-EVER!
You'll be adding an ever smaller number of Bitcoins per block. There's no point increasing the total Bitcoin supply by - say - 0.00000000000001% per block. The limited supply is by design, and it's one of the things that makes Bitcoin better than fiat.

Quote
The M2M economy, as I mentioned earlier, works orders of magnitude lower down the real-time trough. They'll be chatting away hundreds of times a second, querying each other for data etc.. the 'yearly' spend per device will be less than $5.. chopped up millions of times. There are 5 billion Sim/WiFi enabled IoT devices launched a year as of today. Trillions to come. These numbers get really big. 
Can you give an example of a device that would need to send and receive very small payments hundreds of times per second? There's probably a better way than adding money to that protocol. The only thing I can think of, is something like a webserver, and even then a small advertisement makes much more sense than nanopayments.

Quote
Can you fork every time, maybe every 20 years.. add 8 decimal places ?
I think you're underestimating the magnitude of 8 decimal places. There's no need for 100 million times more of the smallest units.
hero member
Activity: 718
Merit: 545
July 18, 2019, 05:50:21 PM
#18
Ok.

I can see most of you think that we will never need more than the 8 we have 'because' .. it's enough. (At least for the next 100 years even at 2% expansion)

I think things are moving much faster than that ?

“Measured in current US dollars, total global wealth rose from USD 117 trillion in 2000 to 317 trillion in mid-2018, a rise of USD 200 trillion, equivalent to roughly 2.5 times global GDP.”

We'll soon have individual trillionaires..

There is zero chance we don't hit quintillions as a 'number' in the next 50 years.

Now - is Bitcoin going to live that long ?

I hear this mythical date in 2140 when we find the last scrap.. but does it have to be.. if only we could keep halving.. for-EVER!

Also - We'll be into mega-sexta-zetillions by then.. OF COURSE WE'LL NEED MORE RESOLUTION!!  (then)

The M2M economy, as I mentioned earlier, works orders of magnitude lower down the real-time trough. They'll be chatting away hundreds of times a second, querying each other for data etc.. the 'yearly' spend per device will be less than $5.. chopped up millions of times. There are 5 billion Sim/WiFi enabled IoT devices launched a year as of today. Trillions to come. These numbers get really big. 

May as well sort this out now.. no ?

Can you fork every time, maybe every 20 years.. add 8 decimal places ? I don't see it. Forks are hard and this is currently a hard fork. Although you could hard-fork a perpetual soft-fork mechanic to do this Smiley ..hehe

Is there another scheme that works from day one ?  - You could just add a decimal place automatically every million blocks or so. As hardware improves, it'll be able to handle it.

But I like the notion that the above scheme never needs better hardware.. for when these things are hardwired, on chip.

Anybody see any problems with it though ?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
July 18, 2019, 04:41:05 AM
#17
We could reach a point where the vast majority of bitcoin transactions take place on Lightning, with people keeping their channels open pretty much permanently.
I don't even think that would be such a bad thing. I now trust my "local" bank with much more money than I'll ever put in a LN-channel for small expenses. If my bank would offer a custodial LN-wallet with the same level of trust*, I would use my bank for LN-payments just like I now use that bank to pay bills.
Of course, that gives the risk of fractional banking on LN, but that's no different than what crypto exchanges can do already.

What would happen to fees if the minimum amount on-chain was 1 milli-satoshi/byte ?
Fees would probably get lower than 1 sat/byte once in a while, when blocks aren't full.

Quote
My use cases for higher decimal precision are required today Smiley

My team are working to get IoT devices performing instant Lighting payments in an M2M network of fire sensors, alarm sensors, humidity etc etc.. These devices pay each other as and when they want a reading from any of the other senses. Thousands of sensors thousands of times a day, thousands of locations.

We already need lower than satoshi precision, and the idea of rounding up.. lol.. this is Bitcoin.
LN allows payments as low as 1 milli-satoshi already, so you can do this already. I assume you won't settle channels for thousands of transactions on-chain too often, right? And when you do, the fee will probably be far more than 1000 satoshi, so why would you care about a fraction of a satoshi rounding difference at that point?


* I don't trust banks at all but I have no choice.
hero member
Activity: 718
Merit: 545
July 18, 2019, 04:19:53 AM
#16
What happens when BTC is worth $10 million ?    Smiley
Then you won't get any change when spending $100 on a cheeseburger, since cents will be a forgotten memory at that point, and nobody will care that Bitcoin can't represent such trifling values.

That's not necessarily true. When the economy grows, then the value of a fixed/deflationary money supply will grow with it.

For example, 1 BTC is worth about $1 million if Bitcoin replaces all the money in the world, and 1 satoshi is worth about $0.01. But then if the economy grows at about 2% per year for 100 years, then 1 BTC will worth about $10 million in today's dollars, and 1 satoshi is worth $0.10. The price of a Big Mac Extra Value Meal will drop from 399 satoshis to 40 satoshis.

This!


Thank you!

[I'd say the Bitcoin transaction fees are much more worrying: As long as the minimum on-chain fee is 1 sat/byte, and users often pay much more than that, I don't worry about fractions of a satoshi. I expect high fees to become a problem long before 1 satoshi becomes too large to be the smallest unit.

What would happen to fees if the minimum amount on-chain was 1 milli-satoshi/byte ?

--------------

My use cases for higher decimal precision are required today Smiley

My team are working to get IoT devices performing instant Lighting payments in an M2M network of fire sensors, alarm sensors, humidity etc etc.. These devices pay each other as and when they want a reading from any of the other senses. Thousands of sensors thousands of times a day, thousands of locations.

We already need lower than satoshi precision, and the idea of rounding up.. lol.. this is Bitcoin.
legendary
Activity: 4116
Merit: 7849
'The right to privacy matters'
July 17, 2019, 06:06:44 PM
#15
Decimal Places.

How many is enough ? Is it ever enough ? (have mentioned this before - can't find the post)

Currently BTC has 8. Clearly not enough. Soon-ish 1 sat will be 1 cent.  Need to be able to chop it up less than that for micro-transactions.   

One solution, add 8 more at the next fork - but I think this is Hard-Fork territory (unless you limit the processing of these higher precision amounts to ONLY segwit) ?

But that may not last forever.. then what - another fork ?


Is there a solution we can fork that works today and always ? A scalable solution to decimal precision ?

------------

Current transaction validity  :
 
1) Make sure the sum of the inputs is greater than or equal to the sum of the outputs.

2) Check Input Script validity.

3) etc..


Make 2 changes.

1) Represent all numbers in their significant digit format to 16 significant digits. NOT as single satoshis, as a floating point number.

2) Make sure all inputs and outputs in any single transaction are in the same overlapping 16 significant digit range.

What does this mean ?

This means you can have a transaction that has milli-satoshis as long as the largest number in the transaction is less than 999 BTC.
You can have billi-satoshis as long as the largest number in the transaction is less than 99 BTC.

But you can go much lower.. you could be using 10-50 units as long as all the inputs and outputs were in the same sliding scale of magnitude. All the maths is ALWAYS computed to 16 significant digits, it's just the exponent that changes.

Now there is no limit to how many decimal places you can use, BUT you can't mix a million BTC and 1x10-50 BTC.. You would need to use multiple transactions to group together similar size outputs, until they were large enough to be mixed with larger values, or vice versa when trying to spend smaller amounts.

Issues :

1) Fees  : may have to be handled separately, like CT. The very small BTC units may represent a coloured coin or token, so although individual values may be small the overall value of the transaction may be large.

2) Fungibility : You now cannot mix outputs with values more than 1016 apart. You can't add a quadrillionth of a satoshi and 1 million BTC  in the same transaction. Can in 2 transactions. Does this matter ?
 

dude you think 16 digits is too small?  wow you think really freaking big.


16 digits will cover for hundreds if not thousands of years.

if a BTC is 1,111,111,111,111  usd  then   0.0000000000000001 btc is 0.000111 usd

a btc needs to be worth 111,111,111,111,111 which is 111 trillion

and 111,111,111,111,111 x 0.0000000000000001 = 0.01111111

or 1.1 cents.  I won't worry about btc being worth 111 trillion in the next 1000 years.
legendary
Activity: 2268
Merit: 18509
July 17, 2019, 05:36:24 PM
#14
I expect high fees to become a problem long before 1 satoshi becomes too large to be the smallest unit.
Agreed. I suppose it depends on where you see Lightning Network or any other potential second layer or off chain solutions ending up. We could reach a point where the vast majority of bitcoin transactions take place on Lightning, with people keeping their channels open pretty much permanently. The only time you would be paying fees on the main chain would be if you needed to close your channel for whatever reason, or if you wanted to transact a large amount and have the added security of it being immediately broadcast to the chain, in which case paying fees of tens of dollars on movements of millions or dollars is probably acceptable.

Or, as ETF says, it could be that nodes and miners start accepting transactions with fees of less than 1 sat/byte, you just round the fee you are going to pay to the nearest whole satoshi.
newbie
Activity: 9
Merit: 0
July 17, 2019, 01:26:32 PM
#13
When bitcoin gets to 10mil dollars these would be a problem. But it's nothing a fork can't fix
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
July 17, 2019, 10:12:48 AM
#12
(have mentioned this before - can't find the post)
Here it is: Is it time to think about decimal precision ?

At present, that means losing out on fractions of a cent, but in the hypothetical situation above, you could lose up to $10 on closing a channel.
I'd say the Bitcoin transaction fees are much more worrying: As long as the minimum on-chain fee is 1 sat/byte, and users often pay much more than that, I don't worry about fractions of a satoshi. I expect high fees to become a problem long before 1 satoshi becomes too large to be the smallest unit.
legendary
Activity: 4298
Merit: 3209
July 17, 2019, 03:35:38 AM
#11
What happens when BTC is worth $10 million ?    Smiley
Then you won't get any change when spending $100 on a cheeseburger, since cents will be a forgotten memory at that point, and nobody will care that Bitcoin can't represent such trifling values.

That's not necessarily true. When the economy grows, then the value of a fixed/deflationary money supply will grow with it.

For example, 1 BTC is worth about $1 million if Bitcoin replaces all the money in the world, and 1 satoshi is worth about $0.01. But then if the economy grows at about 2% per year for 100 years, then 1 BTC will worth about $10 million in today's dollars, and 1 satoshi is worth $0.10. The price of a Big Mac Extra Value Meal will drop from 399 satoshis to 40 satoshis.
legendary
Activity: 1039
Merit: 2783
Bitcoin and C♯ Enthusiast
July 17, 2019, 01:30:41 AM
#10
There are no decimal places in bitcoin and it is best we don't introduce them ever either. Floating point numeric types are a headache and can introduce bugs in a lot of implementations in different programming languages, not to mention they are slower.
With that said a simple solution can be this, which has the benefit of decreasing the transaction size too!
This is based on a naive research I did 2 years ago that showed changing every UInt32 in a block to CompactInt could empty the block size by up to 50 kilo bytes.

  • This assumes we do need this increase
  • For easy calculation price of bitcoin is assumed to be $1 million
  • Also the supply has to change from 21000000_00000000 to a fixed value of 21000000_00000000_00000000 (which is similar to 8 more decimal places)
The amount field in transactions can be changed from a UInt64 integral type to a new custom type that is similar to CompactInt but is mostly similar to what DER uses to encode lengths.
First bit, if set, indicates that first byte is the length of the bytes to read. The follow up bytes are the value itself.

To send $100 worth of bitcoin that is 0.00010000_00000000BTC in 16 decimal place representation and 0x0010a5d4e8 in little-endian hexadecimal representation we need 6 bytes. A first byte = 0x85(=0b10000101) followed by the amount. 0x850010a5d4e8. This saves up on 10 bytes.

This can be implemented using transaction version field. Every transaction that has version below 3 has amount field that is the current design of being a UInt64 and has to be multiplied by 108, every transaction with version 3+ has amount field set to the new format.

What this does is avoiding unnecessary complications while giving the implementations the advantage of speed and accuracy of regular integral numeric types. For 99% of the cases amounts sent are going to be smaller than a UInt64 so all the computations are fast and easy, anything bigger (worth >$1.84 billion) is going to be rare and computation requires 2 UInt64 which is still pretty easy, fast and 100% accurate.
Fee calculation and other conditions are still the same and easily calculated in this design.
hero member
Activity: 1232
Merit: 738
Mixing reinvented for your privacy | chipmixer.com
July 16, 2019, 07:58:54 PM
#9
So there isn't enough USD for bitcoin to reach this value. Usd would need to devaluate through inflation for that to happen (I guess)
there is no need to have enough USD because bitcoin is not pegged to USD
bitcoin is not like USDT,  each USDT is tied to a $1 US so it needs to be backed up by US$ (slightly changed now)
bitcoin has never been pegged to $ but has value in $ or any other fiat money
and imo to become a good solid currency, bitcoin doesn't need to be pegged to other currencies at all
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
July 16, 2019, 03:32:39 PM
#8
Why so pessimistic? There's possibility Bitcoin price going to the moon either because mass adaption or legalization on big country.
By then, people would feel Bitcoin transaction fee is expensive, even though it fees on Bitcoin is unchanged.

I don't think saying that Bitcoin price will not reach 1 billion is pessimistic lol

21 quadrillion dollars market cap is a lot.

According to this, CIA says there is only 80 trillion dollars in the world.
Quote
https://www.businessinsider.com/heres-how-much-money-there-is-in-the-world-2017-10
Here's how much money there is in the world — and why you've never heard the exact number
According to the CIA, the total amount is $80 trillion if you include "broad money."

So there isn't enough USD for bitcoin to reach this value. Usd would need to devaluate through inflation for that to happen (I guess)
hero member
Activity: 718
Merit: 545
July 16, 2019, 01:55:52 PM
#7
Creating coloured coins and tokens will be a 'thing' at some point. L-BTC does it.

If you want to represent 21 million token units with 8 decimal places as a token you can either use 21 million BTC (not going to happen) or use MUCH smaller units.

You would need 16 decimal places to be able to colour 2.1 BTC that represented 21 mill to 8 decimal places.

The coloured tokens can be worth MUCH more than their BTC value.

I can see that most of you think we won't ever need to change the decimal precision.. but there are many use cases!  Grin

1)The token thing.

2)IoT M2M payments (something we are working on) will need machines to be able to pay each other micro amounts. A lot.

3) Better Lightning resolution

4) The invention of the stock markets increased global wealth 1000 fold. Crypto will do the same. These numbers will seem small in the coming years. Global wealth will be measured in Mega-Bucks (Million $$).   
 
5) A catastrophe wipes out almost all coins. You find 0.005 BTC. You need to start an entirely new economy with those funds. 

We're going to need a bigger boat decimal precision.
Pages:
Jump to: