Post
Topic
Board Development & Technical Discussion
Merits 10 from 5 users
Topic OP
Significant Decimal Precision
by
spartacusrex
on 16/07/2019, 11:24:16 UTC
⭐ Merited by suchmoon (4) ,bones261 (2) ,philipma1957 (2) ,ETFbitcoin (1) ,vapourminer (1)
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 ?