currency
field. You can use any name for your asset class, but it is advisable to use conventional short codes where necessary.
Applying precision based on asset classes
Your chosen asset class determines what amounts can be transacted and their corresponding precision value. USD is 100, while BTC is up to 100 million. Precision converts your transaction amounts to the lowest unit possible based on the asset class used in the transaction. To apply the right precision value for an asset class, determine the lowest feasible value for the asset class. For most fiat currencies like the Dollar, the lowest value is 0.01 USD, which is 1 cent. Next, determine the factor needed to convert it to an integer. For fiat currencies like the Dollar, its precision value is 100. This means, with a precision value of 100:- Fractional amount,
USD 0.01
is represented as the integer1
. - Fractional amount,
USD 1000.00
is represented as the integer100000
. - Fractional amount,
USD 542.10
is represented as the integer54210
. - Fractional amount,
USD 129.12
is represented as the integer12912
.