## 2 Key Technologies
### Consensus  
A blockchain is completely decentralized over multiple nodes without a central coordinator. Therefore, to keep the consistency of the distributed ledger, a blockchain needs to come to a consensus on the block transaction history. Consensus is a dynamic way of reaching an agreement in a group. As blockchains can be exposed to a malicious environment, consensus algorithms are well known for suffering from the Byzantine Generals problem. Several consensus algorithms have been proposed and adopted in blockchain systems which can solve the Byzantine Generals problem. We describe the major consensus algorithms and list the comparison in Table 1.  
Bitcoin bypasses the problem by inventing the proof of work protocol (PoW). In PoW protocol, a cryptographic puzzle has to be solved in order to add a block to the blockchain, which requires immense amount of energy and computational usage and hence ensures avoiding the Byzantine attack. However, there are some well-known issues with PoW. First, PoW is an extremely inefficient process because of the paramount amount of power consumed. Second, PoW is not as decentralized as it hopes to be since nodes with a more powerful computing facility usually have better chances of solving puzzles. Ethereum is considering changing its distributed consensus system to a more efficient protocol, the proof of stake (PoS). In PoS protocol, if a node wants to add a block to the chain, it will validate the block by placing a bet on it. After the block gets appended, the node will get a reward proportionate to its bet. Apparently, the PoS protocol is more resource-friendly than PoW. However, the PoS protocol suffers from the \"Nothing at Stake\" problem. Suppose there is a short chain branches from the main chain. In the PoW protocol, all nodes will continue to work on the longer chain because it is only a \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Features** & **PoW** & **PoS** & **DPoS** & **Raft** & **pBFT** \\ \hline BFT & 50\% & 50\% & 50\% & N/A & 33\% \\ CFT & 50\% & 50\% & 50\% & 50\% & 33\% \\ verification speed & \textgreater{}100 s & \textless{}100 s & \textless{}100 s & \textless{}10 s & \textless{}10 s \\ tps & \textless{}100 & \textless{}1000 & \textless{}1000 & \textgreater{}10 k & \textless{}2000 \\ scalability & strong & strong & strong & weak & weak \\ typical platforms & Bitcoin & Ethereum [15] & BitShares [16] & Quorum [17] & Hyperledger Fabric [18] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the major consensus algorithms [3]. waste of computing energy working on the shorter chain. In the PoS protocol, a malicious miner can mine on the shorter chain because there is no risk of losing any stake. Therefore, the PoS protocol cannot avoid chain splits. BitShares shifts to an improved version of PoS, the delegated proof-of-stake (DPoS) consensus. DPoS consensus relies on the power of stakeholder approval voting, where the stakeholders can elect any number of witnesses and blocks are generated by elected witnesses in a sequential order without a global agreement. Thus, DPoS consensus is faster, more efficient and more flexible compared with PoS. The transaction confirmation only costs an average of 1 s. However, as DPoS trades the property of decentralization for efficiency, there are concerns that a small number of witnesses will lead to a very high degree of centralization and also that it faces real attacks such as shut down by governments or ISPs. Paxos is a family of consensus protocols that make various trade-offs between assumptions about the processors, participants, and messages in a given system. The protocol guarantees safety, only considers the crash fault tolerance (CFT), and is often employed where the durability of large datasets is required. Raft is an understandable alternative of Paxos, and is equivalent to Paxos in fault-tolerance and performance. Neither Paxos nor Raft considers the malicious environment and only fit the private or federated blockchains such as Quorum.