One thing that this didn't try to address, but will need to be handled soon, is that the AMM amounts are floats. I think ideally all money should be integer (or perhaps, fixed point decimal).
Likely we want to be using a special decimal datatype instead of number, or multiply everything by 100 and use straight intergers. I did a little digging and decimal.js and bignumber.js seem to be well maintained and pretty popular. Heres a wiki about the differences of them: https://github.com/MikeMcl/big.js/wiki.
It turns out Prisma has built-in support for Decimal.js so I think that may be the best way to go for now. I will do a spike to see what it would look like
As mentioned in https://github.com/casesandberg/play-money/pull/20:
Likely we want to be using a special decimal datatype instead of number, or multiply everything by 100 and use straight intergers. I did a little digging and decimal.js and bignumber.js seem to be well maintained and pretty popular. Heres a wiki about the differences of them: https://github.com/MikeMcl/big.js/wiki.