At TigerBeetle, we have made the decision to use 128-bit integers instead of 64-bit integers to store financial amounts and balances. While some may argue that a 64-bit integer is sufficient for counting the grains of sand on Earth, we have realized that we need to go beyond this limit to adequately store all types of transactions. We use binary encoding to represent numbers in computers, and different ranges of numbers require different amounts of bits. For fractional numbers, binary floating point numbers are not accurate, which is a problem for financial calculations. Therefore, TigerBeetle uses whole numbers and represents money as multiples of a minimal integer factor defined by the user. We also avoid using negative numbers and instead keep two separate strictly positive integer amounts for debits and credits. This not only eliminates the need to deal with negative numbers but also preserves information by showing the volume of transactions for both sides. We decided to use 128-bit integers because the upper limit of a 64-bit integer becomes restrictive when representing values smaller than a cent. Additionally, 128-bit balances are useful for digital currencies, high-frequency micropayments, and scenarios where values need to be precise and scaled. TigerBeetle is designed to count not just money
https://tigerbeetle.com/blog/2023-09-19-64-bit-bank-balances-ought-to-be-enough-for-anybody/