Skip to content
Snippets Groups Projects
Commit d7e09ea8 authored by matograine's avatar matograine
Browse files

* small reformulations

* remove useless italic and/or bold letters.
* remove mention of amounts tresholds in the block
parent 9fd59261
No related branches found
No related tags found
No related merge requests found
...@@ -30,4 +30,4 @@ Thus, Duniter project will associate a human to a digital identity. It will use ...@@ -30,4 +30,4 @@ Thus, Duniter project will associate a human to a digital identity. It will use
Duniter is based on a decentralized Blockchain. This technical choice allows irreversibility of transaction and uncensorability of trades and identities. While inspired by Bitcoin, Duniter uses a Web of Trust and the Proof of Work to secure the computation network, thus making obsolete the power race model used in Bitcoin. Duniter is based on a decentralized Blockchain. This technical choice allows irreversibility of transaction and uncensorability of trades and identities. While inspired by Bitcoin, Duniter uses a Web of Trust and the Proof of Work to secure the computation network, thus making obsolete the power race model used in Bitcoin.
The first currency created through Duniter is Ğ1 (say "June"). It was created on the 8th. March 2017. This whitepaper uses Ğ1 parameters as examples ; however, one can create another libre currency with custom parameters while still using Duniter software. The first currency created through Duniter is Ğ1, pronounced "June". It was created on the 8th. March 2017. This whitepaper uses Ğ1 parameters as examples ; however, one can create another libre currency with custom parameters while still using Duniter software.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- source : https://duniter.org/en/theoretical/ --> <!-- source : https://duniter.org/en/theoretical/ -->
Duniter uses the crypto-currency concept introduced by Bitcoin[^BTC_whitepaper], which is Duniter uses the crypto-currency concept introduced by Bitcoin[^BTC_whitepaper], which is
to use cryptographic tools such as *signatures* to create digital to use cryptographic tools such as signatures to create digital
currencies. Duniter fits this definition, but it has completely currencies. Duniter fits this definition, but it has completely
different principles than Bitcoin : the Web of Trust and the Universal different principles than Bitcoin : the Web of Trust and the Universal
Dividend . These differences are on both monetary and technical aspects. Dividend . These differences are on both monetary and technical aspects.
...@@ -23,20 +23,20 @@ Bitcoin as an example to understand why. ...@@ -23,20 +23,20 @@ Bitcoin as an example to understand why.
#### 1.1.1. Spatial asymmetry {#spatial-asymmetry} #### 1.1.1. Spatial asymmetry {#spatial-asymmetry}
When new Bitcoins are created, *only some Bitcoin users* (the miners) When new Bitcoins are created, only some Bitcoin users (the miners)
are given new Bitcoins, while everyone else get nothing. **We believe are given new Bitcoins, while everyone else get nothing. We believe
this is the *first* injustice.** However, some might say: this is the first injustice. However, some might say:
> \"Miners used their *electricity and time* to get it!\" > \"Miners used their electricity and time to get it!\"
\... we would answer that this work *shouldn\'t have been rewarded by \... we would answer that this work should not have been rewarded by
newly created Bitcoins*. New Bitcoins should be distributed to the whole newly created Bitcoins. New units should be distributed to the whole
Bitcoin community. Miners should be rewared another way, but not by community. Miners should be rewared another way, but not by
money issuance. Of course, Bitcoin can\'t create money through Basic money issuance. Of course, Bitcoin cannot create money through Basic
Income since *Bitcoin users are not strongly identified*, and one might Income since Bitcoin users are not strongly identified, and one might
benefit from money creation multiple times if he owned several wallets. benefit from money creation multiple times if they owned several wallets.
Duniter gets rid of this problem completely by identifying its users and Duniter gets rid of this problem by identifying its users and
giving *the same amount of Basic Income to everyone*. creating the same amount of Basic Income to everyone.
#### 1.1.2. Temporal-asymmetry {#temporal-asymmetry} #### 1.1.2. Temporal-asymmetry {#temporal-asymmetry}
...@@ -45,36 +45,41 @@ which means ever fewer bitcoins will be created over time until no new BTC are ...@@ -45,36 +45,41 @@ which means ever fewer bitcoins will be created over time until no new BTC are
being generated. So, once the first adopters have mined every bitcoin, being generated. So, once the first adopters have mined every bitcoin,
how will future joiners get Bitcoins? Just like Euros or how will future joiners get Bitcoins? Just like Euros or
Dollars: to get money, they will have to work for the ones who already own it. Dollars: to get money, they will have to work for the ones who already own it.
**We believe this is the *second* injustice.** Every member of a
We believe this is the second injustice. Every member of a
monetary community should be equal concerning monetary creation, and get monetary community should be equal concerning monetary creation, and get
the same relative amount of money over time, *even if they are a late the same relative amount of money over time, even if they are a late
adopter*. Duniter aims to fix this by making the Universal Dividend adopter. Duniter aims to fix this by making the Universal Dividend
(a.k.a. *UD*) *grow by the time* (S.Laborde, 2010) according to precise rules, thus making (a.k.a. UD) grow by the time[^RTM] according to precise rules, thus making
members equal toward money issuance on a half-lifespan. members equal toward money issuance on a half-lifespan.
Most currencies present one of these two asymmetries, including metal currencies
and mutual credit, as exposed in the RTM.
#### 1.1.3. A solution {#a-solution} #### 1.1.3. A solution {#a-solution}
Bitcoin has taught us that *it is possible* to create a currency system Bitcoin has taught us that it is possible to create a currency system
allowing one to both create digital money and to exchange it without a allowing one to both create digital money and to exchange it without a
central authority. What we need to change is *the way money is issued* central authority. What we need to change is the way money is issued
so we finally have a symmetrical system. We need Bitcoin *+ Universal so we finally have a symmetrical system. We need **Bitcoin + Universal
Dividend*. But Universal Dividend *implies* that the community consists Dividend**. But Universal Dividend implies that the community consists
of only identified people. This is where the Web of Trust (WoT) comes of only identified people. This is where the Web of Trust (WoT) comes
into place. This concept, introduced by cryptography with the into place.
OpenPGP format[^OpenPGP],
allows us to identify people in a *decentralized* manner. It works as This concept, introduced by cryptography with the OpenPGP format[^OpenPGP],
follows: each person creates *a personal identity* that is linked to its allows us to identify people in a decentralized manner. It works as
follows: each person creates a personal identity that is linked to its
cyptographic certificate. The identity must be confirmed by others cyptographic certificate. The identity must be confirmed by others
members who use their own cryptographic key. It is that simple: **people members who use their own cryptographic key. It is that simple: people
choose who is part of the community and who is not, not a central choose who is part of the community and who is not, not a central
authority.** authority.
[^OpenPGP]: OpenPGP protocol defines standard formats for encrypted messages, signatures, private keys, and certificates for exchanging public keys. The GNU Privacy Handbook, M.Ashley, 1999 : [www.gnupg.org/gph/en/manual.html#AEN335](https://www.gnupg.org/gph/en/manual.html#AEN335) [^OpenPGP]: OpenPGP protocol defines standard formats for encrypted messages, signatures, private keys, and certificates for exchanging public keys. The GNU Privacy Handbook, M.Ashley, 1999 : [www.gnupg.org/gph/en/manual.html#AEN335](https://www.gnupg.org/gph/en/manual.html#AEN335)
> Duniter however won\'t use OpenPGP for its cryptographic features: However, Duniter will not use OpenPGP for its cryptographic features:
> Elliptic Curves[^Elliptic] will be used instead for the conciseness of its Elliptic Curves[^Elliptic] will be used instead for the conciseness of its
> generated keys and its pratical advantages. Duniter has its own Web generated keys and its pratical advantages. Duniter has its own Web
> of Trust principles, that shall be exposed later. of Trust principles, that will be exposed later.
[^Elliptic]: High-speed high-security signatures, D.J.Bernstein, N.Duif, T.Lange, P.Schwabe, B-Y.Yang. Journal of Cryptographic Engineering 2 (2012), 77–89. [cr.yp.to/papers.html#ed25519](https://cr.yp.to/papers.html#ed25519). [^Elliptic]: High-speed high-security signatures, D.J.Bernstein, N.Duif, T.Lange, P.Schwabe, B-Y.Yang. Journal of Cryptographic Engineering 2 (2012), 77–89. [cr.yp.to/papers.html#ed25519](https://cr.yp.to/papers.html#ed25519).
...@@ -84,7 +89,8 @@ In Bitcoin Model, the calculation and incentive principles cause a power race : ...@@ -84,7 +89,8 @@ In Bitcoin Model, the calculation and incentive principles cause a power race :
new Bitcoins are created for the owners of the most numerous, powerful (and energy-consuming) computers. new Bitcoins are created for the owners of the most numerous, powerful (and energy-consuming) computers.
This leads to a power race an places the control over the currency in the hands of the richest hardware owners. This leads to a power race an places the control over the currency in the hands of the richest hardware owners.
We want to make Duniter blockchain validation much less energy and hardware consuming while We want to make Duniter blockchain validation much less energy and hardware consuming while
keeping a strong level of security. This will be further explained later. A consequence of this choice is the participation of low-end hardware in the Duniter network, keeping a strong level of security. This will be further explained later. A consequence of
this choice is the participation of low-end hardware in the Duniter network,
leading to a better decentralization of forging operations. leading to a better decentralization of forging operations.
#### 1.2.1 What about Proof of Stake ? {#what-about-proof-of-stake} #### 1.2.1 What about Proof of Stake ? {#what-about-proof-of-stake}
...@@ -93,6 +99,6 @@ Proof of stake consensus algorythm was first introduced in 2012[^PPCoin]. The ba ...@@ -93,6 +99,6 @@ Proof of stake consensus algorythm was first introduced in 2012[^PPCoin]. The ba
[^PPCoin]: PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake, S.King & S.Nadal, 2012 : [archive.org/details/PPCoinPaper](https://archive.org/details/PPCoinPaper) [^PPCoin]: PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake, S.King & S.Nadal, 2012 : [archive.org/details/PPCoinPaper](https://archive.org/details/PPCoinPaper)
When conceiving Duniter, the PoS algorythms had not been tested enough to be used as a fundamental base. At the time of conceiving Duniter, the PoS algorythms had not been tested enough to be used as a fundamental base.
Moreover, the principle of allowing owners of large amounts of money to validate transaction can only lead Moreover, the principle of allowing owners of large amounts of money to validate transaction can only lead
to placing power over the currency in the richests hands : this is contrary to the symmetical principles of a libre currency. to placing power over the currency in the richests hands : this is contrary to the symmetical principles of a libre currency.
...@@ -8,19 +8,30 @@ Duniters Blockchain follows the basic principles of Bitcoins. ...@@ -8,19 +8,30 @@ Duniters Blockchain follows the basic principles of Bitcoins.
This is essential for synchronization between peers, as to prevent double-spend attacks. This is essential for synchronization between peers, as to prevent double-spend attacks.
However, Duniters Blockchain will store different informations than Bitcoins. However, Duniters Blockchain will store different informations than Bitcoins.
The basic use of Blockchain will be registering transactions. For this part, we use the same principles as Bitcoin : transactions have inputs (spending accounts) and outputs (receiving accounts). But contrary to Bitcoin, no *generation transaction* exists : monetary creation happens only through UD. So, in Duniters Blockchain, Inputs can be either: The basic use of Blockchain will be registering transactions. For this part, we use the same principles as Bitcoin : transactions have inputs (spending accounts) and outputs (receiving accounts). But contrary to Bitcoin, no generation transaction exists : monetary creation happens only through UD. So, in Duniters Blockchain, Inputs can be either:
* a former transaction (as in Bitcoin) * a former transaction (as in Bitcoin)
* a Universal Dividend (specific to Duniter). * a Universal Dividend (specific to Duniter).
Duniters Web of Trust is also written in the Blockchain. The identity of each member gets registered much like transactions are, with a strong link to the time reference. Thus, the Blockchain is a representation of a space-time frame of reference, where "space" are members of the WoT and "time" the basic blockchain units : the blocks. On each point of time, one can determine which account is legitimate to create the UD, only with a blockchain analysis. Duniters Web of Trust is also written in the Blockchain. The identity of each
member gets registered much like transactions are, with a strong link to the
time reference. Thus, the Blockchain is a representation of a space-time frame
of reference, where "space" are members of the WoT and "time" the basic blockchain
units : the blocks. On each point of time, one can determine which account is
legitimate to create the UD, only with a blockchain analysis.
### 2.1. Spam countermeasures {#spam-countermeasures} ### 2.1. Spam countermeasures {#spam-countermeasures}
XXX These measures do not seem sufficient to me. Are there any others (in the protocol, not in the nodes) ? IP block is not an answer since one could use TOR. Peer block ? The attacker could switch its peering document regularly. XXX XXX These measures do not seem sufficient to me. Are there any others (in the protocol, not in the nodes) ? IP block is not an answer since one could use TOR. Peer block ? The attacker could switch its peering document regularly. XXX
An issue of most cryptocurrency projects is to prevent the common ledger from growing too much. This would require nodes to have a lot of storage and computing power to be usable. In particular, we don't want an attacker to be able to make the Blockchain grow too fast. Most projects implement transaction fees as a way to prevent this, making the attacker lose money. We don't want to introduce this mean since a currency with automatic fees on transactions is no more neutral. Several countermeasuers against such spam attacks are implemented. An issue of most cryptocurrency projects is to prevent the common ledger from
growing too much. This would require nodes to have a lot of storage and computing
power to be usable. In particular, we don't want an attacker to be able to make the
Blockchain grow too fast. Most projects implement transaction fees as a way to prevent
this, making the attacker lose money. We don't want to introduce this mean since a
currency with automatic fees on transactions is no more neutral. Several
countermeasuers against such spam attacks are implemented.
<!-- see : https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25 (implemented ?)--> <!-- see : https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25 (implemented ?)-->
...@@ -34,11 +45,7 @@ Fixing a minimal output amount reduces the power of an attack. Duniter deals wit ...@@ -34,11 +45,7 @@ Fixing a minimal output amount reduces the power of an attack. Duniter deals wit
The block size is always limited. While the protocol allows this limit to evolve to address scaling issues, an attacker cannot register as many transaction as they wish. The block size is always limited. While the protocol allows this limit to evolve to address scaling issues, an attacker cannot register as many transaction as they wish.
With the same goal to prevent too many transactions to get registered, while transactions can be "chained" (refer to another transaction in the same block), the chainability of transactions is limited to 5. This leaves enough space for clients to process change transactions while preventing With the same goal to prevent too many transactions to get registered, while transactions can be "chained" (refer to another transaction in the same block), the chainability of transactions is limited to 5.
#### 2.1.3. Output amounts tresholds {#output-amounts-tresholds}
XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25), but does not seem tobe implemented. Is it still on the roadmap ? XXX
### 2.2. Scaling {#scaling} ### 2.2. Scaling {#scaling}
...@@ -46,15 +53,16 @@ XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-f ...@@ -46,15 +53,16 @@ XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-f
Most of the time, the scaling issue rises for distributed systems that should work on a very large scale. This is not the case of Duniter, for multiple reasons : Most of the time, the scaling issue rises for distributed systems that should work on a very large scale. This is not the case of Duniter, for multiple reasons :
* Ğ1 is the first libre currency, and is still experimental on the monetary creation principle. We don't want it to reach the whole world, we only want it to work, to validate or invalidate the RTM. Moreover, the rules chosen for the Ğ1 WoT limits its size to around 16 million members. * Ğ1 is the first libre currency, and is still experimental on the monetary creation principle. We don't want it to reach the whole world, we only want it to work, to validate or invalidate the RTM. Moreover, the rules chosen for the Ğ1 WoT limits its size to around 16 million members.
* Duniter's aim is to be used to create *multiple* libre currencies, that would fit local or regional economies. As a consequence, it would deal with less transactions than if it was a world-scale system. The RTM proposes a formula to calculate the exchange rate between two currencies, that could be used to create automatic exchanges for a member travelling away from their community. * Duniter's aim is to be used to create multiple libre currencies, that would fit local or regional economies. As a consequence, it would deal with less transactions than if it was a world-scale system. The RTM proposes a formula to calculate the exchange rate between two currencies, that could be used to create automatic exchanges for a member travelling away from their community.
However, Duniter has two assets that might be used if the number of users grow. However, Duniter has assets that will help if the number of users and transactions grow.
#### 2.2.1 Dynamic block size {#dynamic-block-size} #### 2.2.1 Dynamic block size {#dynamic-block-size}
While Bitcoin has a fixed block size, Duniters blocks size can evolve. While Bitcoin has a fixed block size, Duniters blocks size can evolve.
On low use of the blockchain, the maximal block size is 500 bytes. On low use of the blockchain, the maximal block size is 500 bytes.
On high use of the blockchain, the maximal block size would be 110% of the average size of the current window blocks( *current window* will be described in the PoW part). On high use of the blockchain, the maximal block size would be 110% of the
average size of the current window blocks(see "personalised difficulty" part for more information).
This way, the blocks are bounded in size, but can slowly grow if a massive and legitimate use of the blockchain needs it. The block size (in bytes) is limited as so : This way, the blocks are bounded in size, but can slowly grow if a massive and legitimate use of the blockchain needs it. The block size (in bytes) is limited as so :
:::{highlight} :::{highlight}
...@@ -74,7 +82,7 @@ While not available yet, this payment channel might get implemented when needed. ...@@ -74,7 +82,7 @@ While not available yet, this payment channel might get implemented when needed.
#### 2.2.3. Unit base {#unit-base} #### 2.2.3. Unit base {#unit-base}
As the Universal Dividend grows exponentially, with time Duniter nodes would have had to deal with always largest amounts, eventually reaching the BIGINT limit. To avoid this, the amounts are expressed with a unit base in base 10. We want the UD amount te always fit in 4 digits. To manage it, the `unitbase` is updated each time the UD value reaches 100.00 : it goes from `99.99*10^(unitbase)` to `10.00*10^(unitbase+1)`. All the unit amounts are thus divided by 10. While this might seem strange, this process has already hapened in state currencies. Moreover, the amounts expressed in UD will not change. As the Universal Dividend grows exponentially, with time Duniter nodes would have had to deal with always largest amounts, eventually reaching the BIGINT limit. To avoid this, the amounts are expressed with a unit base in base 10. We want the UD amount to always fit in 4 digits. To manage it, the `unitbase` is updated each time the UD value reaches 100.00 : it goes from `99.99*10^(unitbase)` to `10.00*10^(unitbase+1)`. All the unit amounts are thus divided by 10. While this might seem strange, this process has already hapened in state currencies. Moreover, the amounts expressed in UD will not change.
With a monetary growth of 10% each year and a stable population, such a change of unit base would happen each 25 years. With a monetary growth of 10% each year and a stable population, such a change of unit base would happen each 25 years.
...@@ -39,7 +39,7 @@ ensuring the unicity of a block's creator. ...@@ -39,7 +39,7 @@ ensuring the unicity of a block's creator.
takes a certain amount of time, which depends on the calculating power takes a certain amount of time, which depends on the calculating power
of the whole network. This provides a common ground for defining of the whole network. This provides a common ground for defining
the needed time reference. A block time is set (ie: 1 block = 5 min) and the needed time reference. A block time is set (ie: 1 block = 5 min) and
Duniter adapts the challenge difficulty to get an *average* duration Duniter adapts the challenge difficulty to get an average duration
corresponding to this block time. corresponding to this block time.
### 4.2. Only members can "mine" {#only-members-can-mine} ### 4.2. Only members can "mine" {#only-members-can-mine}
...@@ -47,7 +47,7 @@ corresponding to this block time. ...@@ -47,7 +47,7 @@ corresponding to this block time.
One of Duniter's major differences with other PoW-based cryptocurrencies One of Duniter's major differences with other PoW-based cryptocurrencies
is that only members are allowed to author blocks. Each block is signed is that only members are allowed to author blocks. Each block is signed
with the member's private key, allowing the algorithm to determine a with the member's private key, allowing the algorithm to determine a
*personalised difficulty*. personalised difficulty.
This personalised difficulty eliminates the rat-race for the most This personalised difficulty eliminates the rat-race for the most
sophisticated and powerful mining equipment. Another benefit is the fact sophisticated and powerful mining equipment. Another benefit is the fact
...@@ -69,7 +69,7 @@ Example of a valid hash: ...@@ -69,7 +69,7 @@ Example of a valid hash:
::: :::
As you can see this hash starts with five zeros which was very hard to As you can see this hash starts with five zeros which was very hard to
achieve and took a lot of *work* for someone's computer. Hence the term achieve and took a lot of work for someone's computer. Hence the term
"proof of work". "proof of work".
#### 4.3.2. The common difficulty {#common-difficulty} #### 4.3.2. The common difficulty {#common-difficulty}
...@@ -93,24 +93,24 @@ of a block is its sha256 hexadecimal hash. ...@@ -93,24 +93,24 @@ of a block is its sha256 hexadecimal hash.
To understand the difficulty, we make a euclidiean division of the To understand the difficulty, we make a euclidiean division of the
difficulty by 16. difficulty by 16.
Here's an example with a difficulty value of `70` : 70 // 16 = **4** with a Here's an example with a difficulty value of 70 :
remainder of **6**. The valid hashes are the ones starting with four
::: {.highlight}
`70 // 16 = 4` with a remainder of 6.
:::
The valid hashes are the ones starting with four
zeros and with the fifth character less than or equal to 9 (6 in hexadecimal notation). zeros and with the fifth character less than or equal to 9 (6 in hexadecimal notation).
The valid hashes are then written as starting with : `0000[0-9]`. The valid hashes are then written as starting with : `0000[0-9]`.
This is a bit different from Bitcoin, This is a bit different from Bitcoin,
where the difficulty is only ruled by the number of zeroes. where the difficulty is only ruled by the number of zeroes.
> Fine, but the hash of a mined block will never change and there's no ##### 4.3.2.2. The Nonce {#the-nonce}
> reason it should start with a given sequence of numbers. So how then
> can we make sure a block hash starts with exactly the sequence
> needed?
Enter the nonce, short for "number once". When a member is forging a new When a member is forging a new
block, his computer freezes the block's content and changes the Nonce block, his computer freezes the block's content and changes the Nonce
until the hash reaches the required number of zeroes. until the hash reaches the required number of zeroes.
##### 4.3.2.2. The Nonce {#the-nonce}
The nonce allows us to mine a new block by finding a hash. The The nonce allows us to mine a new block by finding a hash. The
hash value allows us to determine the difficulty level of the hash value allows us to determine the difficulty level of the
proof-of-work performed. Examples of possible Nonce values: proof-of-work performed. Examples of possible Nonce values:
...@@ -147,7 +147,7 @@ number of cores for the resulting PoW. ...@@ -147,7 +147,7 @@ number of cores for the resulting PoW.
Earlier in this article, we explained that the personalised difficulty Earlier in this article, we explained that the personalised difficulty
is the new and key concept that sets Duniter apart from other is the new and key concept that sets Duniter apart from other
*PoW-based* cryptocurrencies. PoW-based cryptocurrencies.
Here is how this personalised difficulty is calculated and assigned: Here is how this personalised difficulty is calculated and assigned:
......
This diff is collapsed.
...@@ -30,7 +30,7 @@ Thus, Duniter project will associate a human to a digital identity. It will use ...@@ -30,7 +30,7 @@ Thus, Duniter project will associate a human to a digital identity. It will use
Duniter is based on a decentralized Blockchain. This technical choice allows irreversibility of transaction and uncensorability of trades and identities. While inspired by Bitcoin, Duniter uses a Web of Trust and the Proof of Work to secure the computation network, thus making obsolete the power race model used in Bitcoin. Duniter is based on a decentralized Blockchain. This technical choice allows irreversibility of transaction and uncensorability of trades and identities. While inspired by Bitcoin, Duniter uses a Web of Trust and the Proof of Work to secure the computation network, thus making obsolete the power race model used in Bitcoin.
The first currency created through Duniter is Ğ1 (say "June"). It was created on the 8th. March 2017. This whitepaper uses Ğ1 parameters as examples ; however, one can create another libre currency with custom parameters while still using Duniter software. The first currency created through Duniter is Ğ1, pronounced "June". It was created on the 8th. March 2017. This whitepaper uses Ğ1 parameters as examples ; however, one can create another libre currency with custom parameters while still using Duniter software.
## 1. State of the art : Bitcoin case {#state-of-the-art-bitcoin-case} ## 1. State of the art : Bitcoin case {#state-of-the-art-bitcoin-case}
...@@ -38,7 +38,7 @@ The first currency created through Duniter is Ğ1 (say "June"). It was created o ...@@ -38,7 +38,7 @@ The first currency created through Duniter is Ğ1 (say "June"). It was created o
<!-- source : https://duniter.org/en/theoretical/ --> <!-- source : https://duniter.org/en/theoretical/ -->
Duniter uses the crypto-currency concept introduced by Bitcoin[^BTC_whitepaper], which is Duniter uses the crypto-currency concept introduced by Bitcoin[^BTC_whitepaper], which is
to use cryptographic tools such as *signatures* to create digital to use cryptographic tools such as signatures to create digital
currencies. Duniter fits this definition, but it has completely currencies. Duniter fits this definition, but it has completely
different principles than Bitcoin : the Web of Trust and the Universal different principles than Bitcoin : the Web of Trust and the Universal
Dividend . These differences are on both monetary and technical aspects. Dividend . These differences are on both monetary and technical aspects.
...@@ -56,20 +56,20 @@ Bitcoin as an example to understand why. ...@@ -56,20 +56,20 @@ Bitcoin as an example to understand why.
#### 1.1.1. Spatial asymmetry {#spatial-asymmetry} #### 1.1.1. Spatial asymmetry {#spatial-asymmetry}
When new Bitcoins are created, *only some Bitcoin users* (the miners) When new Bitcoins are created, only some Bitcoin users (the miners)
are given new Bitcoins, while everyone else get nothing. **We believe are given new Bitcoins, while everyone else get nothing. We believe
this is the *first* injustice.** However, some might say: this is the first injustice. However, some might say:
> \"Miners used their *electricity and time* to get it!\" > \"Miners used their electricity and time to get it!\"
\... we would answer that this work *shouldn\'t have been rewarded by \... we would answer that this work should not have been rewarded by
newly created Bitcoins*. New Bitcoins should be distributed to the whole newly created Bitcoins. New units should be distributed to the whole
Bitcoin community. Miners should be rewared another way, but not by community. Miners should be rewared another way, but not by
money issuance. Of course, Bitcoin can\'t create money through Basic money issuance. Of course, Bitcoin cannot create money through Basic
Income since *Bitcoin users are not strongly identified*, and one might Income since Bitcoin users are not strongly identified, and one might
benefit from money creation multiple times if he owned several wallets. benefit from money creation multiple times if they owned several wallets.
Duniter gets rid of this problem completely by identifying its users and Duniter gets rid of this problem by identifying its users and
giving *the same amount of Basic Income to everyone*. creating the same amount of Basic Income to everyone.
#### 1.1.2. Temporal-asymmetry {#temporal-asymmetry} #### 1.1.2. Temporal-asymmetry {#temporal-asymmetry}
...@@ -78,36 +78,41 @@ which means ever fewer bitcoins will be created over time until no new BTC are ...@@ -78,36 +78,41 @@ which means ever fewer bitcoins will be created over time until no new BTC are
being generated. So, once the first adopters have mined every bitcoin, being generated. So, once the first adopters have mined every bitcoin,
how will future joiners get Bitcoins? Just like Euros or how will future joiners get Bitcoins? Just like Euros or
Dollars: to get money, they will have to work for the ones who already own it. Dollars: to get money, they will have to work for the ones who already own it.
**We believe this is the *second* injustice.** Every member of a
We believe this is the second injustice. Every member of a
monetary community should be equal concerning monetary creation, and get monetary community should be equal concerning monetary creation, and get
the same relative amount of money over time, *even if they are a late the same relative amount of money over time, even if they are a late
adopter*. Duniter aims to fix this by making the Universal Dividend adopter. Duniter aims to fix this by making the Universal Dividend
(a.k.a. *UD*) *grow by the time* (S.Laborde, 2010) according to precise rules, thus making (a.k.a. UD) grow by the time[^RTM] according to precise rules, thus making
members equal toward money issuance on a half-lifespan. members equal toward money issuance on a half-lifespan.
Most currencies present one of these two asymmetries, including metal currencies
and mutual credit, as exposed in the RTM.
#### 1.1.3. A solution {#a-solution} #### 1.1.3. A solution {#a-solution}
Bitcoin has taught us that *it is possible* to create a currency system Bitcoin has taught us that it is possible to create a currency system
allowing one to both create digital money and to exchange it without a allowing one to both create digital money and to exchange it without a
central authority. What we need to change is *the way money is issued* central authority. What we need to change is the way money is issued
so we finally have a symmetrical system. We need Bitcoin *+ Universal so we finally have a symmetrical system. We need **Bitcoin + Universal
Dividend*. But Universal Dividend *implies* that the community consists Dividend**. But Universal Dividend implies that the community consists
of only identified people. This is where the Web of Trust (WoT) comes of only identified people. This is where the Web of Trust (WoT) comes
into place. This concept, introduced by cryptography with the into place.
OpenPGP format[^OpenPGP],
allows us to identify people in a *decentralized* manner. It works as This concept, introduced by cryptography with the OpenPGP format[^OpenPGP],
follows: each person creates *a personal identity* that is linked to its allows us to identify people in a decentralized manner. It works as
follows: each person creates a personal identity that is linked to its
cyptographic certificate. The identity must be confirmed by others cyptographic certificate. The identity must be confirmed by others
members who use their own cryptographic key. It is that simple: **people members who use their own cryptographic key. It is that simple: people
choose who is part of the community and who is not, not a central choose who is part of the community and who is not, not a central
authority.** authority.
[^OpenPGP]: OpenPGP protocol defines standard formats for encrypted messages, signatures, private keys, and certificates for exchanging public keys. The GNU Privacy Handbook, M.Ashley, 1999 : [www.gnupg.org/gph/en/manual.html#AEN335](https://www.gnupg.org/gph/en/manual.html#AEN335) [^OpenPGP]: OpenPGP protocol defines standard formats for encrypted messages, signatures, private keys, and certificates for exchanging public keys. The GNU Privacy Handbook, M.Ashley, 1999 : [www.gnupg.org/gph/en/manual.html#AEN335](https://www.gnupg.org/gph/en/manual.html#AEN335)
> Duniter however won\'t use OpenPGP for its cryptographic features: However, Duniter will not use OpenPGP for its cryptographic features:
> Elliptic Curves[^Elliptic] will be used instead for the conciseness of its Elliptic Curves[^Elliptic] will be used instead for the conciseness of its
> generated keys and its pratical advantages. Duniter has its own Web generated keys and its pratical advantages. Duniter has its own Web
> of Trust principles, that shall be exposed later. of Trust principles, that will be exposed later.
[^Elliptic]: High-speed high-security signatures, D.J.Bernstein, N.Duif, T.Lange, P.Schwabe, B-Y.Yang. Journal of Cryptographic Engineering 2 (2012), 77–89. [cr.yp.to/papers.html#ed25519](https://cr.yp.to/papers.html#ed25519). [^Elliptic]: High-speed high-security signatures, D.J.Bernstein, N.Duif, T.Lange, P.Schwabe, B-Y.Yang. Journal of Cryptographic Engineering 2 (2012), 77–89. [cr.yp.to/papers.html#ed25519](https://cr.yp.to/papers.html#ed25519).
...@@ -117,7 +122,8 @@ In Bitcoin Model, the calculation and incentive principles cause a power race : ...@@ -117,7 +122,8 @@ In Bitcoin Model, the calculation and incentive principles cause a power race :
new Bitcoins are created for the owners of the most numerous, powerful (and energy-consuming) computers. new Bitcoins are created for the owners of the most numerous, powerful (and energy-consuming) computers.
This leads to a power race an places the control over the currency in the hands of the richest hardware owners. This leads to a power race an places the control over the currency in the hands of the richest hardware owners.
We want to make Duniter blockchain validation much less energy and hardware consuming while We want to make Duniter blockchain validation much less energy and hardware consuming while
keeping a strong level of security. This will be further explained later. A consequence of this choice is the participation of low-end hardware in the Duniter network, keeping a strong level of security. This will be further explained later. A consequence of
this choice is the participation of low-end hardware in the Duniter network,
leading to a better decentralization of forging operations. leading to a better decentralization of forging operations.
#### 1.2.1 What about Proof of Stake ? {#what-about-proof-of-stake} #### 1.2.1 What about Proof of Stake ? {#what-about-proof-of-stake}
...@@ -126,7 +132,7 @@ Proof of stake consensus algorythm was first introduced in 2012[^PPCoin]. The ba ...@@ -126,7 +132,7 @@ Proof of stake consensus algorythm was first introduced in 2012[^PPCoin]. The ba
[^PPCoin]: PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake, S.King & S.Nadal, 2012 : [archive.org/details/PPCoinPaper](https://archive.org/details/PPCoinPaper) [^PPCoin]: PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake, S.King & S.Nadal, 2012 : [archive.org/details/PPCoinPaper](https://archive.org/details/PPCoinPaper)
When conceiving Duniter, the PoS algorythms had not been tested enough to be used as a fundamental base. At the time of conceiving Duniter, the PoS algorythms had not been tested enough to be used as a fundamental base.
Moreover, the principle of allowing owners of large amounts of money to validate transaction can only lead Moreover, the principle of allowing owners of large amounts of money to validate transaction can only lead
to placing power over the currency in the richests hands : this is contrary to the symmetical principles of a libre currency. to placing power over the currency in the richests hands : this is contrary to the symmetical principles of a libre currency.
...@@ -139,19 +145,30 @@ Duniters Blockchain follows the basic principles of Bitcoins. ...@@ -139,19 +145,30 @@ Duniters Blockchain follows the basic principles of Bitcoins.
This is essential for synchronization between peers, as to prevent double-spend attacks. This is essential for synchronization between peers, as to prevent double-spend attacks.
However, Duniters Blockchain will store different informations than Bitcoins. However, Duniters Blockchain will store different informations than Bitcoins.
The basic use of Blockchain will be registering transactions. For this part, we use the same principles as Bitcoin : transactions have inputs (spending accounts) and outputs (receiving accounts). But contrary to Bitcoin, no *generation transaction* exists : monetary creation happens only through UD. So, in Duniters Blockchain, Inputs can be either: The basic use of Blockchain will be registering transactions. For this part, we use the same principles as Bitcoin : transactions have inputs (spending accounts) and outputs (receiving accounts). But contrary to Bitcoin, no generation transaction exists : monetary creation happens only through UD. So, in Duniters Blockchain, Inputs can be either:
* a former transaction (as in Bitcoin) * a former transaction (as in Bitcoin)
* a Universal Dividend (specific to Duniter). * a Universal Dividend (specific to Duniter).
Duniters Web of Trust is also written in the Blockchain. The identity of each member gets registered much like transactions are, with a strong link to the time reference. Thus, the Blockchain is a representation of a space-time frame of reference, where "space" are members of the WoT and "time" the basic blockchain units : the blocks. On each point of time, one can determine which account is legitimate to create the UD, only with a blockchain analysis. Duniters Web of Trust is also written in the Blockchain. The identity of each
member gets registered much like transactions are, with a strong link to the
time reference. Thus, the Blockchain is a representation of a space-time frame
of reference, where "space" are members of the WoT and "time" the basic blockchain
units : the blocks. On each point of time, one can determine which account is
legitimate to create the UD, only with a blockchain analysis.
### 2.1. Spam countermeasures {#spam-countermeasures} ### 2.1. Spam countermeasures {#spam-countermeasures}
XXX These measures do not seem sufficient to me. Are there any others (in the protocol, not in the nodes) ? IP block is not an answer since one could use TOR. Peer block ? The attacker could switch its peering document regularly. XXX XXX These measures do not seem sufficient to me. Are there any others (in the protocol, not in the nodes) ? IP block is not an answer since one could use TOR. Peer block ? The attacker could switch its peering document regularly. XXX
An issue of most cryptocurrency projects is to prevent the common ledger from growing too much. This would require nodes to have a lot of storage and computing power to be usable. In particular, we don't want an attacker to be able to make the Blockchain grow too fast. Most projects implement transaction fees as a way to prevent this, making the attacker lose money. We don't want to introduce this mean since a currency with automatic fees on transactions is no more neutral. Several countermeasuers against such spam attacks are implemented. An issue of most cryptocurrency projects is to prevent the common ledger from
growing too much. This would require nodes to have a lot of storage and computing
power to be usable. In particular, we don't want an attacker to be able to make the
Blockchain grow too fast. Most projects implement transaction fees as a way to prevent
this, making the attacker lose money. We don't want to introduce this mean since a
currency with automatic fees on transactions is no more neutral. Several
countermeasuers against such spam attacks are implemented.
<!-- see : https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25 (implemented ?)--> <!-- see : https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25 (implemented ?)-->
...@@ -165,11 +182,7 @@ Fixing a minimal output amount reduces the power of an attack. Duniter deals wit ...@@ -165,11 +182,7 @@ Fixing a minimal output amount reduces the power of an attack. Duniter deals wit
The block size is always limited. While the protocol allows this limit to evolve to address scaling issues, an attacker cannot register as many transaction as they wish. The block size is always limited. While the protocol allows this limit to evolve to address scaling issues, an attacker cannot register as many transaction as they wish.
With the same goal to prevent too many transactions to get registered, while transactions can be "chained" (refer to another transaction in the same block), the chainability of transactions is limited to 5. This leaves enough space for clients to process change transactions while preventing With the same goal to prevent too many transactions to get registered, while transactions can be "chained" (refer to another transaction in the same block), the chainability of transactions is limited to 5.
#### 2.1.3. Output amounts tresholds {#output-amounts-tresholds}
XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-frais-de-transaction-comment-resister-aux-attaques/3846/25), but does not seem tobe implemented. Is it still on the roadmap ? XXX
### 2.2. Scaling {#scaling} ### 2.2. Scaling {#scaling}
...@@ -177,15 +190,16 @@ XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-f ...@@ -177,15 +190,16 @@ XXX This has been discussed in a [forum post](https://forum.duniter.org/t/sans-f
Most of the time, the scaling issue rises for distributed systems that should work on a very large scale. This is not the case of Duniter, for multiple reasons : Most of the time, the scaling issue rises for distributed systems that should work on a very large scale. This is not the case of Duniter, for multiple reasons :
* Ğ1 is the first libre currency, and is still experimental on the monetary creation principle. We don't want it to reach the whole world, we only want it to work, to validate or invalidate the RTM. Moreover, the rules chosen for the Ğ1 WoT limits its size to around 16 million members. * Ğ1 is the first libre currency, and is still experimental on the monetary creation principle. We don't want it to reach the whole world, we only want it to work, to validate or invalidate the RTM. Moreover, the rules chosen for the Ğ1 WoT limits its size to around 16 million members.
* Duniter's aim is to be used to create *multiple* libre currencies, that would fit local or regional economies. As a consequence, it would deal with less transactions than if it was a world-scale system. The RTM proposes a formula to calculate the exchange rate between two currencies, that could be used to create automatic exchanges for a member travelling away from their community. * Duniter's aim is to be used to create multiple libre currencies, that would fit local or regional economies. As a consequence, it would deal with less transactions than if it was a world-scale system. The RTM proposes a formula to calculate the exchange rate between two currencies, that could be used to create automatic exchanges for a member travelling away from their community.
However, Duniter has two assets that might be used if the number of users grow. However, Duniter has assets that will help if the number of users and transactions grow.
#### 2.2.1 Dynamic block size {#dynamic-block-size} #### 2.2.1 Dynamic block size {#dynamic-block-size}
While Bitcoin has a fixed block size, Duniters blocks size can evolve. While Bitcoin has a fixed block size, Duniters blocks size can evolve.
On low use of the blockchain, the maximal block size is 500 bytes. On low use of the blockchain, the maximal block size is 500 bytes.
On high use of the blockchain, the maximal block size would be 110% of the average size of the current window blocks( *current window* will be described in the PoW part). On high use of the blockchain, the maximal block size would be 110% of the
average size of the current window blocks(see "personalised difficulty" part for more information).
This way, the blocks are bounded in size, but can slowly grow if a massive and legitimate use of the blockchain needs it. The block size (in bytes) is limited as so : This way, the blocks are bounded in size, but can slowly grow if a massive and legitimate use of the blockchain needs it. The block size (in bytes) is limited as so :
:::{highlight} :::{highlight}
...@@ -205,7 +219,7 @@ While not available yet, this payment channel might get implemented when needed. ...@@ -205,7 +219,7 @@ While not available yet, this payment channel might get implemented when needed.
#### 2.2.3. Unit base {#unit-base} #### 2.2.3. Unit base {#unit-base}
As the Universal Dividend grows exponentially, with time Duniter nodes would have had to deal with always largest amounts, eventually reaching the BIGINT limit. To avoid this, the amounts are expressed with a unit base in base 10. We want the UD amount te always fit in 4 digits. To manage it, the `unitbase` is updated each time the UD value reaches 100.00 : it goes from `99.99*10^(unitbase)` to `10.00*10^(unitbase+1)`. All the unit amounts are thus divided by 10. While this might seem strange, this process has already hapened in state currencies. Moreover, the amounts expressed in UD will not change. As the Universal Dividend grows exponentially, with time Duniter nodes would have had to deal with always largest amounts, eventually reaching the BIGINT limit. To avoid this, the amounts are expressed with a unit base in base 10. We want the UD amount to always fit in 4 digits. To manage it, the `unitbase` is updated each time the UD value reaches 100.00 : it goes from `99.99*10^(unitbase)` to `10.00*10^(unitbase+1)`. All the unit amounts are thus divided by 10. While this might seem strange, this process has already hapened in state currencies. Moreover, the amounts expressed in UD will not change.
With a monetary growth of 10% each year and a stable population, such a change of unit base would happen each 25 years. With a monetary growth of 10% each year and a stable population, such a change of unit base would happen each 25 years.
...@@ -816,7 +830,7 @@ ensuring the unicity of a block's creator. ...@@ -816,7 +830,7 @@ ensuring the unicity of a block's creator.
takes a certain amount of time, which depends on the calculating power takes a certain amount of time, which depends on the calculating power
of the whole network. This provides a common ground for defining of the whole network. This provides a common ground for defining
the needed time reference. A block time is set (ie: 1 block = 5 min) and the needed time reference. A block time is set (ie: 1 block = 5 min) and
Duniter adapts the challenge difficulty to get an *average* duration Duniter adapts the challenge difficulty to get an average duration
corresponding to this block time. corresponding to this block time.
### 4.2. Only members can "mine" {#only-members-can-mine} ### 4.2. Only members can "mine" {#only-members-can-mine}
...@@ -824,7 +838,7 @@ corresponding to this block time. ...@@ -824,7 +838,7 @@ corresponding to this block time.
One of Duniter's major differences with other PoW-based cryptocurrencies One of Duniter's major differences with other PoW-based cryptocurrencies
is that only members are allowed to author blocks. Each block is signed is that only members are allowed to author blocks. Each block is signed
with the member's private key, allowing the algorithm to determine a with the member's private key, allowing the algorithm to determine a
*personalised difficulty*. personalised difficulty.
This personalised difficulty eliminates the rat-race for the most This personalised difficulty eliminates the rat-race for the most
sophisticated and powerful mining equipment. Another benefit is the fact sophisticated and powerful mining equipment. Another benefit is the fact
...@@ -846,7 +860,7 @@ Example of a valid hash: ...@@ -846,7 +860,7 @@ Example of a valid hash:
::: :::
As you can see this hash starts with five zeros which was very hard to As you can see this hash starts with five zeros which was very hard to
achieve and took a lot of *work* for someone's computer. Hence the term achieve and took a lot of work for someone's computer. Hence the term
"proof of work". "proof of work".
#### 4.3.2. The common difficulty {#common-difficulty} #### 4.3.2. The common difficulty {#common-difficulty}
...@@ -870,24 +884,24 @@ of a block is its sha256 hexadecimal hash. ...@@ -870,24 +884,24 @@ of a block is its sha256 hexadecimal hash.
To understand the difficulty, we make a euclidiean division of the To understand the difficulty, we make a euclidiean division of the
difficulty by 16. difficulty by 16.
Here's an example with a difficulty value of `70` : 70 // 16 = **4** with a Here's an example with a difficulty value of 70 :
remainder of **6**. The valid hashes are the ones starting with four
::: {.highlight}
`70 // 16 = 4` with a remainder of 6.
:::
The valid hashes are the ones starting with four
zeros and with the fifth character less than or equal to 9 (6 in hexadecimal notation). zeros and with the fifth character less than or equal to 9 (6 in hexadecimal notation).
The valid hashes are then written as starting with : `0000[0-9]`. The valid hashes are then written as starting with : `0000[0-9]`.
This is a bit different from Bitcoin, This is a bit different from Bitcoin,
where the difficulty is only ruled by the number of zeroes. where the difficulty is only ruled by the number of zeroes.
> Fine, but the hash of a mined block will never change and there's no ##### 4.3.2.2. The Nonce {#the-nonce}
> reason it should start with a given sequence of numbers. So how then
> can we make sure a block hash starts with exactly the sequence
> needed?
Enter the nonce, short for "number once". When a member is forging a new When a member is forging a new
block, his computer freezes the block's content and changes the Nonce block, his computer freezes the block's content and changes the Nonce
until the hash reaches the required number of zeroes. until the hash reaches the required number of zeroes.
##### 4.3.2.2. The Nonce {#the-nonce}
The nonce allows us to mine a new block by finding a hash. The The nonce allows us to mine a new block by finding a hash. The
hash value allows us to determine the difficulty level of the hash value allows us to determine the difficulty level of the
proof-of-work performed. Examples of possible Nonce values: proof-of-work performed. Examples of possible Nonce values:
...@@ -924,7 +938,7 @@ number of cores for the resulting PoW. ...@@ -924,7 +938,7 @@ number of cores for the resulting PoW.
Earlier in this article, we explained that the personalised difficulty Earlier in this article, we explained that the personalised difficulty
is the new and key concept that sets Duniter apart from other is the new and key concept that sets Duniter apart from other
*PoW-based* cryptocurrencies. PoW-based cryptocurrencies.
Here is how this personalised difficulty is calculated and assigned: Here is how this personalised difficulty is calculated and assigned:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment