Understanding decimal precision bridging between Cosmos and EVM
a(n)
in smallest units (18 decimals):
a(n)
= Total balance in 18-decimal units (atest)b(n)
= Integer balance in 6-decimal units (test)f(n)
= Fractional balance (remainder)C
= Conversion factor (10^12)0 ≤ f(n) < C
b(R)
= Reserve balance in testΣf(n)
= Sum of all account fractional balancesr
= Remainder (fractional amount not in circulation)0 ≤ r < C
a
:
r' = r
Unit | Precision | Decimals | Usage |
---|---|---|---|
ATOM | 10^0 | 0 | Human display |
test | 10^-6 | 6 | Cosmos native |
atest | 10^-18 | 18 | EVM native |