# An Architecture for Biometric Electronic Identification Document System Based on Blockchain +
## 5 Consensus Algorithms
### Proof of Stake (PoS) Algorithm  
In this system, each node of the network has to prove that it has a certain part of the circulating token if it wishes to take part in the process of block validation. The consensus algorithm will then choose to delegate the validation of a new block to one of the nodes that own the largest share. In a simplistic way, in the context of a proof of stake (PoS), the probability for a node to be chosen to validate a new block corresponds to its holding percentage, its stake of the circulating token (currency or share). If a node owns x quantity and if there is a total of y coins, its chance to append the next block is x/y. This selection is done in a pseudorandom way to prevent a node from knowing in advance when it will be its turn to validate the next block. Nevertheless, taking into account certain additional parameters, such as the possession time of the token, allowing the \"richest\" nodes to be almost always selected. Finally, the validation of a block does not strictly give rise to remuneration, it is rather the holding of a certain amount of cryptocurrency that pays a remuneration, similar to interests.  
Compared to the PoW method, PoS has two main advantages:  
* Saving power: the PoS is a mechanism that consumes much less energy than PoW (which, in turn, requires a large number of cryptographic calculations to find the proof of work required for the validation of each block).
* The 51% attack is more difficult: in a PoS-type system, the 51% attack requires controlling more than half of the circulating token, which is usually much more expensive than controlling 51% of computing power in the PoW system.  
PoS algorithms have some disadvantages and security problems too. One famous problem is called nothing-at-stake. In pure PoS algorithms, nodes are not encouraged to vote for the chain that would be the most likely to be legitimate (i.e., the longest for the Bitcoin platform). In the presence of several potential chains (in case of forks), and in order to maximize their probability of obtaining the reward, the nodes will, therefore, allocate their \"stake\" uniformly and thus vote in parallel for the last blocks composing the potential chains. Unlike PoW where mining on multiple chains simultaneously costs energy and so money to the miner, mining on multiple chains costs nothing in a PoS system. Consequently, by satisfying their personal interests, miners could facilitate the realization of double-spending types of attack. An attacker may be able to send a transaction in exchange for some digital good (usually another cryptocurrency), and start a fork from one block behind the transaction and send the money to themselves instead, and even with 1% of the total stake the attacker's fork would win because everyone else is mining on both.  
In pure PoS, the miner is selected on the pure stake he owns: more stake a miner has, the more chance he will get to become the block appender. Unfortunately, pure PoS would lead to an (undesirable) consequence of centralization: the richest member would always have an advantage. To avoid this, several alternative methods have been proposed [54; 55].