How to manage rounding

Last updated: May 10, 2024

It is recommended to pick a precision from the start and to keep using it consistently throughout the system afterwards. If you think you’re gonna need more precision, don’t hesitate to lean towards something more precise – just make sure you’re properly mapping the scale when interacting with external systems.

Unambiguous Monetary Notation

💡 [ASSET/SCALE AMOUNT]

As an example [USD/2 30] is equivalent to USD 30*1E-2, i.e USD 0.30, i.e 30 USD cents.

The UMN specification does not enforce a specific precision of the amount, beyond the fact that it must be represented as an unsigned integer. Decisions on the precision of the amount are left to the implementation when implemented by a third party. Internally, Formance Stack components all use arbitrary precision unsigned integers to represent amounts.

Rounding | Formance Developer Docs

Unambiguous Monetary Notation | Formance Developer Docs