Overview

An asset class refers to the currency of your transactions. This could mean national currencies like the Naira, Dollar, Pound, etc, cryptocurrencies like Bitcoin, Ethereum, etc, or custom asset classes like loyalty points. In the database, the asset class is represented with the currency field.

You can use any name for your asset class, but it is advisable to use conventional short codes where necessary.

Understanding precision

Precision is a parameter in Blnk that converts your amount to the lowest unit possible for your asset class.

You can represent the amounts as you wish in your application, however it is crucial to use precision to accurately store fractional amounts in your ledger, avoiding inaccuracy due to floating-point approximations.

The precision value applied in a transaction depends on the asset class of 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, you find how much you need to convert it to an integer. For fiat currencies like the Dollar, it’s precision value is 100.

This means, with a precision value of 100:

  • Fractional amount, USD 0.01 is represented as the integer 1.
  • Fractional amount, USD 1000.00 is represented as the integer 100000.
  • Fractional amount, USD 542.10 is represented as the integer 54210.
  • Fractional amount, USD 129.12 is represented as the integer 12912.

See also

Need help?

Need help with developing your organization’s money movement map? Do you have a question that isn’t answered in this doc? Have you run into a problem you can’t solve? Want to file a bug report?

Join our Discord server and share your questions/thoughts with other developers building financial applications like you.

Was this page helpful?