Fixed Point Arithmetic and NewType pattern
This major release touches every aspect of the codebase.
- The NewType pattern is used to enforce correct types at function boundaries.
This introducesBaseCurrency,QuoteCurrency,FeeandLeverageso it is impossible to accidentally pass a value denoted inUSDinto a function that expectBTCfor example. - Use of fixed point arithmetic instead of
f64for fast and precise money calculations, thanks to the fpdec crate. - Lots of smaller changes to harmonize the codebase