You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to store the balances as integers (as we already do) however when displaying values to the users we will display them as decimals. This allows us to avoid floating point errors while keeping the values easy to work with from the users perspective.
When migrating current account balances over to the new system, we will multiple all coin balances by 100,000,000. We will initially be displaying up to 4 decimals in our apps however we would like to reserve the last 4 decimals if needed later on (when we scale).
the indivisible units are referred to as “bits”
the common/integer part are referred to as “coins”
Note to self - reserving decimals will lead to early inaccurate calculations, different results for the same calculations for earlier adopters and possibly migration/forking issues later. Instead of reserving decimals, we most likely want to just multiple all balances by 100,000,000 to convert values to bits and then just round on the UI (configurable, they can see full values if needed).
We would like to store the balances as integers (as we already do) however when displaying values to the users we will display them as decimals. This allows us to avoid floating point errors while keeping the values easy to work with from the users perspective.
When migrating current account balances over to the new system, we will multiple all coin balances by 100,000,000. We will initially be displaying up to 4 decimals in our apps however we would like to reserve the last 4 decimals if needed later on (when we scale).
This ensures that the reserved decimals remain untouched.
The text was updated successfully, but these errors were encountered: