1

Many substrate cryptocurrencies contain code referencing DOLLARS, CENTS and MILLICENTS, eg:

    pub const UNITS: Balance = 10_000_000_000;
    pub const DOLLARS: Balance = UNITS;       // 10_000_000_000
    pub const CENTS: Balance = DOLLARS / 100;      // 100_000_000
    pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000

(see: kusama, polkadot, rococo, westend)

I am struggling to grasp what these terms are meant to reference.

  • Because DOLLARS is originally set to the constant value of UNITS (eg: 10 billion for polkadot), my inference is that the term is meant to describe total supply at genesis. Is that correct? If so, it begs the question why the DOLLARS constant wasn't named TOTAL_SUPPLY_AT_GENESIS to avoid the ambiguity of the chosen term. Perhaps I've misunderstood what the term is referencing.

  • I have completely failed to develop an inference for what CENTS and MILLICENTS are supposed to represent. Because of their conventional meaning in fiat currency, I initially assumed they refer to a fractional monetary unit however, most substrate currencies assign a value to CENTS and MILLICENTS that doesn't provide logical support for that inference. eg for polkadot:

    pub const CENTS: Balance = DOLLARS / 100; // 100_000_000
    

    or kusama:

    pub const CENTS: Balance = UNITS / 30_000;
    

    I find it unfortunate that cent is used in this manner in substrate codebases since

    Etymologically, the word 'cent' derives from the Latin word centum meaning hundred

    (wikipedia:Cent) and don't get me started on MILLICENTS.

I would really appreciate some clarification on what these terms mean in the substrate context.

grenade
  • 31,451
  • 23
  • 97
  • 126

1 Answers1

0

my inference is that the term is meant to describe total supply at genesis. Is that correct?

I think DOLLARS never was the total amount of token at genesis.

As far as I know DOLLARS is just a unit for an amount of token, not related to any other specific currency named dollar.

a CENTS in polkadot is DOLLARS/100 so it is logic.

in kusama, CENTS is UNITS/30_000, IMHO in this case CENTS refers to the cent of an unnamed token unit which worth: UNITS/300, but I agree is a bit weird that this unit is not named.

thiolliere
  • 516
  • 2
  • 3