3 ms·
> For the same reason, digital currencies are another use case for 128-bit balances, where again, the smallest quantity of money can be represented on the order
by hot_gril 3y ago
> For the same reason, digital currencies are another use case for 128-bit balances, where again, the smallest quantity of money can be represented on the order of micro-cents (10-6)… or even smaller.
To give a concrete example, Ethereum has a lot of precision (1 ether = 10^18 wei), and there are like 120M ether, so that's more than 64 bits just to represent the supply.
Idk though, is this a real concern with traditional finance? Zimbabwe had their huge bills, but I assume the small ones were unused. Just like you round US cents, you could probably round their currency at some cutoff. If you were processing Ether outside the blockchain like just some other currency, you'd probably round somewhere too. If you look at Stripe's API for example, they do everything with fixed-size (JSON's 53-bit) integers defined as cents or whatever.
- JeremyNT 3y ago> Idk though, is this a real concern with traditional finance? Zimbabwe had their huge bills, but I assume the small ones were unused. Just like you round US cents, you could probably round their currency at some cutoff. If you were processing Ether outside the blockchain, you'd probably round somewhere too. Yeah... I started reading this article and was waiting for the crypto angle, because in normal finance I don't see how it could plausibly matter (disclaimer: not my domain). The only reason I could imagine needing to track this level of precision on fractional units of currency was the sort of financial trickery that is enabled by cryptocurrencies.
- hot_gril 3y agoEven in cryptocurrency, I feel like the level of precision is mainly aspirational + cuz they can. Who cares about 1 wei in the context of a transaction that costs around 100 trillion wei on its own? The smallest unit of ether I've ever seen in any kind of UI is 1 gwei (1 billion wei).
- hot_gril 3y agoForgot to also add, cause various parts of a cryptocurrency ecosystem are much harder to change than traditional finance. So I can see why they throw in a ton of 0s and use 256-bit ints just in case.
- jorangreef 3y agoYes, we actually held out on the digital currency angle. What tipped the scales, was realizing that this applied also in normal finance, especially exchanges (not crypto) that operate with high precision: https://news.ycombinator.com/item?id=37573939 https://news.ycombinator.com/item?id=37573939
- blibble 3y ago> Idk though, is this a real concern with traditional finance CME have contracts with 1/128ths of a dollar they also have a tenancy to add another power of 1/2th every 10 years or so this causes problem for fixed point, but amusingly this works perfectly well with floating point
- hot_gril 3y agoOne annoyance with floating point binary is when it happens to not line up so well with floating point decimal, for example >>> 0.1 + 0.2 0.30000000000000004 which is still gonna round to 0.3, but ugh. Also, during aggregations, it's not nice how you get different answers depending on the order of operations when they shouldn't matter.