This is the suggested template to be used for ADRs on the cheqd-node project.
Category | Status |
---|---|
The aim of this ADR is to define the smallest fraction for CHEQ tokens.
Cosmos SDK doesn't provide native support for token fractions. The lowest denomination out-of-the-box that can be used in transactions is 1token
.
To address this issue, similar Cosmos networks assume that they use N digits after the decimal point and multiply all values by 10^(-N) in UI.
Popular Cosmos networks were compared to check how many digits after the decimal point are used by them:
Cosmos: 6
IRIS: 6
Fetch.ai: 18
Binance: 8
Fractions of CHEQ tokens will be referred by their SI/metric prefix, based on the power of 10 of CHEQ tokens being referred to in context. This notation system is common across other Cosmos networks as well.
It was decided to go with 10^-9 as the smallest fraction, with the whole number token being 1 CHEQ. Based on the SI prefix system, the lowest denomination would therefore be called "nanocheq".
There is no backward compatibility. To adjust the number of digits after the decimal point (lowest token denomination), the network should be restarted.
The power of 10 chosen for the lowest denomination of CHEQ tokens is more precise than for Cosmos ATOMs, which allows transactions to be defined in smaller units.
This decision is hard to change in the future, as changes to denominations require significant disruption when a network is already up and running.
N/A
Authors
Alexandr Kolesov
ADR Stage
ACCEPTED
Implementation Status
Implemented
Start Date
2021-09-08