Amounts

Ivy uses two formats for token amounts. The raw format is the native format for all on-chain transactions and internal calculations, and represents the smallest indivisible unit. The decimal format is a human-readable representation that you can display to users. In the decimal format, 1 unit = 10^9 raw. In the REST API and the JS SDK, amounts in the raw format are passed and returned as strings, as these values can exceed JavaScript's safe integer limit (2^53 - 1).

To convert from raw to decimal format, divide by 10^9. To convert from decimal to raw format, multiply by 10^9.