Thought about big numbers

Yes, we talked about this during FMM5, and added an issue for this: https://github.com/ucoin-io/ucoin/issues/61

The solution is made up of 2 things:

  • first, we agree to simply forget money issued 160 years ago, because such money (the whole monetary mass of all members at this epoch) represents only $0,01$% of today’s money.
  • secondly, we will represent UD with a rolling value: it will always have 6 digits representation (for example $250.000$), and as soon as UD reaches more than $999.999$, we shift one number and add a power representation somewhere.

Example

Say we have current block:

[...]
Number: 45302
UniversalDividend: 950000
UnitBase: 0
[...]

Then on next UD block (let’s say this block is number 47888), we would have with $c = 10$%:

[...]
Number: 47888
UniversalDividend: 104500
UnitBase: 1
[...]

So we know the absolute value of UD $ = 104500 \times 10^{UnitBase}$, we can make transactions using the same notation of amounts + unit base.

And if we don’t have a power of 10 value for UD, we round at the upper value for UD(t+1). For example if we had

  • UD(t) = 950004 (base 0)

then we have:

  • UD(t+1) = 1045008 (base 0)
  • UD(t+1) = 104501 (base 1)

So what would be written is

[...]
Number: 47888
UniversalDividend: 104501
UnitBase: 1
[...]
2 Likes