cashubtc / nuts

Cashu protocol specifications https://cashubtc.github.io/nuts/
MIT License
152 stars 52 forks source link

Standardize token denominations #111

Open gudnuf opened 7 months ago

gudnuf commented 7 months ago

NUT 00 references NUT 01:

"unit is the currency unit of the token keysets (see Keysets for supported units)"

But, there is nothing in NUT 01 that I see that mentions supported units.

We need to have standard units along with standard token denominations so that wallets can transmit the correct amount of value.

I propose adding the following to NUT 01:

Standard Token Denominations and Units

The following shows supported units and their corresponding token values.

Unit Token Value
'sat' 1 sat
'usd' 0.001 cents
AngusP commented 7 months ago

We need to have standard units along with standard token denominations

Makes sense for known units, but IMO wallets/mints should gracefully handle a unit they don't recognise as it feels pretty inevitable that someone will run a mint for random different currencies or coupons - i.e. the unit is open-ended