Thanks for the feedback! It’s not for storing balances, but rates. token1/token2. All the CEX APIs are returning floats. (ICRC-45 Live DEX Data - #12 by infu) They are not even using 1/8 of the capacity and round numbers. I just wanted to present all the questions to the WG.
The output was:
Amounts - Nat
Rates - Float
Volume - (Nat, Nat) or USD
Market depth - (Nat, Float) - (Amount, Rate)
Do you think it’s a bad idea to use floats for rates?
It is a question nonetheless. Half of the DEXes use floats for some values and the other half uses Nat.
Sorry for the ‘lack of context’ Linking all the forum posts related to this so far:
https://forum.dfinity.org/t/icrc-45-live-dex-data/26417
https://forum.dfinity.org/t/icrc-47-dex-history/26477
https://forum.dfinity.org/t/icrc-55-defi-vectors/27209
https://forum.dfinity.org/t/devefi-ledger-icrc-ledger-client-library/27274