Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update currency units to reflect recent discussions of changes #466

Merged
merged 4 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/commands/rpc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,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