Skip to content

Commit

Permalink
Update currency units to reflect recent discussions of changes (#466)
Browse files Browse the repository at this point in the history
* Update currency units to reflect recent discussions of changes

* Update distribution-and-units.md

* Switch back to raw, remove cents and add disclaimer about SI prefixes

* Fix reference to Mnano
  • Loading branch information
zhyatt authored Sep 17, 2021
1 parent 3e5140a commit 7d7e07f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/commands/rpc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ Using the optional `json_block` is recommended since v19.0.
}
```

Note: The `Balance` in contents is a uint128. However, it will be a hex-encoded (like `0000000C9F2C9CD04674EDEA40000000` for [1 Mnano](/protocol-design/distribution-and-units/)) when the block is a legacy *Send Block*. If the block is a *State-Block*, the same `Balance` will be a numeric-string (like `1000000000000000000000000000000`).
Note: The `Balance` in contents is a uint128. However, it will be a hex-encoded (like `0000000C9F2C9CD04674EDEA40000000` for [1 nano](../protocol-design/distribution-and-units.md#unit-dividers)) when the block is a legacy *Send Block*. If the block is a *State-Block*, the same `Balance` will be a numeric-string (like `1000000000000000000000000000000`).

**Optional "json_block"**

Expand Down
26 changes: 12 additions & 14 deletions docs/protocol-design/distribution-and-units.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,20 @@ The distribution of Nano (formerly RaiBlocks) was performed through solving manu
During distribution the Genesis seed was kept in cold storage and funds were moved to the Landing account once per week to minimize the number of live, undistributed blocks. These were subsequently moved into the Faucet account for distribution until the faucet was closed and remaining funds sent to the Burn account.

!!! info "Total Supply"
With $2^{128} - 1$ raw (i.e. `FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` HEX raw) in the original Genesis account, upon closing of the faucet and burning of the remaining funds, the total supply which is 100% in circulation ended at **~133,248,297 Nano** (or more precisely 133248297920938463463374607431768211455 raw). Since then, additional funds have been sent to the known burn address slightly lowering the amount in circulation as a result. This amount can be found using the [available_supply](/commands/rpc-protocol/#available_supply) RPC.
With $2^{128} - 1$ raw (i.e. `FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` HEX raw) in the original Genesis account, upon closing of the faucet and burning of the remaining funds, the total supply which is 100% in circulation ended at **~133,248,297 nano** (or more precisely 133248297920938463463374607431768211455 raw). Since then, additional funds have been sent to the known burn address slightly lowering the amount in circulation as a result. This amount can be found using the [available_supply](/commands/rpc-protocol/#available_supply) RPC.

## Unit Dividers
A 128 bit integer is used to represent account balances. A set of SI prefixes[^2] was used to make the numbers more accessible and avoid confusion. The reference wallet uses Mnano (or NANO/Nano) as a divider.

| Name | SI Prefix | Integer | Power
|---------------|-------------|------------------------------------|-------
| | Gnano | 1000000000000000000000000000000000 | $10^{33}$
| NANO/Nano | Mnano | 1000000000000000000000000000000 | $10^{30}$
| | knano | 1000000000000000000000000000 | $10^{27}$
| | nano | 1000000000000000000000000 | $10^{24}$
| | mnano | 1000000000000000000000 | $10^{21}$
| | μnano/unano | 1000000000000000000 | $10^{18}$
| raw | | 1 | $10^{0}$

1 raw is the smallest possible division and NANO/Nano (Mnano) is the current standard division used in most wallets, on exchanges, etc.
A 128 bit integer is used to represent account balances. The reference wallet uses nano as a divider.

| Name | Integer | Power | Previous |
|-------------------|------------------------------------|----------|-----------------------|
| nano (NANO/Nano) | 1000000000000000000000000000000 | $10^{30}$| Mnano |
| raw | 1 | $10^{0}$ | raw |


**NOTE:** 1 raw is the smallest possible division and is used in QR codes as `amount`, while nano is the current standard division used for human readable elements in most wallets, on exchanges, etc.

A set of SI prefixes[^2] from the base nano has been previously used to make the numbers more accessible and avoid confusion in certain scenarios, but this approach is not common (e.g., micronano or μnano for $10^{24}$).

[^1]:https://medium.com/nanocurrency/the-nano-faucet-c99e18ae1202
[^2]:The SI prefixes are metric prefixes that were standardized for use in the International System of Units (SI) by the International Bureau of Weights and Measures (BIPM). https://www.bipm.org/en/measurement-units/prefixes.html

0 comments on commit 7d7e07f

Please sign in to comment.