Great question @elmurci!
The Interledger packet includes amounts as 64-bit unsigned integers that represent the minimum divisible units of an asset (cents for USD and EUR, drops for XRP, Wei for ETH, etc).
If we used the normal minimum divisible units, your example would have the amount in the ILP packet change from 50000 (EUR cents) to 105000000000 (XRP drops) to 34650 (USD cents). In practice, however, we’ve found it useful to use a different asset scale for Interledger packets than the normal settlement asset scale so we’ve sort of taken to using a scale of 9 for most assets.
We avoided using floating points from the beginning because they are notoriously problematic to use for representing amounts of money. We did have a decimal floating point format for a bit but gave that up because we realized that, since we send the amount without the currency code already, the currency scale can also be part of the context agreed upon between two peers. In Interledger.rs, the
asset_scale are both set as parameters on the Account.