What is the consensus mechanism/consensus algorithm used in Shardeum? #
Proof of Quorum (PoQ) + Proof of Stake (PoS)
What is a Proof of Quorum (PoQ)? How does consensus work technically on the network? #
Proof of Quorum means to generate a receipt showing that a majority of the consensus group has voted for the transaction. Each node in the consensus group signs the transaction hash and gossips it to other nodes in the consensus group. Nodes collect these votes, and when the number of votes is more than 50%, these votes form a receipt that can prove consensus on the transaction. Note Shardeum will use both PoQ and PoS (Proof of Stake) consensus algorithms to keep the network safe, where validating nodes can be expected to stake a minimum amount of network coin to ensure they operate as per network protocols while getting slashed for misbehavior.
Further, the consensus algorithm also plays a key role in assigning a ‘node ID’ randomly to validator nodes before they join the network. On Shardeum, there will be a third set of nodes apart from validator and archive nodes, called ‘standby nodes’. These are nodes waiting for their turn to be validator nodes. Standby nodes use-case on Shardeum is not limited to just accommodating more capacity when the demand surges. With the help of node IDs, the network will constantly auto-rotate the validator and standby nodes to make it even more difficult for bad actors to take over at any given point in time.
Are we safe from someone taking over 51% of nodes? #
Because of cycle rotation and a random but deterministic lottery to accept nodes into the network, an attacker would have to take over 51% of all nodes in the list waiting to join a network and the usual 51% of nodes that would be in a network. Nodes waiting to join a network are not part of the consensus. To ever have a majority of nodes in the network, an attacker would also need to have > 51% of nodes waiting to join for a sustained period. Suppose you had less than 51% of joining nodes. In that case, statistics will be against the attacker. It would be a majority of honest nodes accepted into the network over time. If there are 10k nodes in the network but 100k waiting to join, the attacker would need to maintain >50k nodes for an extended time until eventually >5k of them are rotated into the network as the network slowly cycles in and out its entire set of nodes.
Since there won’t be a high entry barrier to run nodes on Shardeum, does it affect security? #
While Shardeum does not want to reinvent the wheel with regard to its smart contract platform, we recognize short-sighted fixes and improvements when it comes to security are bad ideas. In fact, Shardeum strongly believes in solving the trilemma issue at the layer 1 level instead of solving such sensitive issues at a layer 2 level or via side chains. That way, the ecosystem, which will host a ton of resources, will be extremely secure at the root level. This would, in turn, reinforce the security of projects deployed on top of the native security mechanisms such projects will employ to prevent hacks and other types of security attacks.
Shardeum will use a combination of two consensus algorithms, namely proof of stake (PoS) and proof of quorum (PoQ). Proof of Quorum means to generate a receipt showing that a majority of the consensus group has voted for the transaction. Each node in the consensus group signs the transaction hash and gossips it to other nodes in the consensus group. Nodes collect these votes, and when the number of votes is more than 50%, these votes form a receipt that can prove consensus on the transaction
Staking native coins will be mandatory for validators to participate in the transaction validation process in return for rewards. Nodes that act maliciously will be slashed or penalized. Note, the staking amount will be determined when we get closer to the mainnet however you can expect it to be reasonable enough to limit bot attacks. Proof of Quorum, in a nutshell, allows the network validators of a transaction to approve it only if it receives more than 50% of votes which is then followed by batching such transactions to blocks. And a key element with respect to security and scalability is, Shardeum introduces ‘standby nodes’ to randomly rotate ‘validator/consensus nodes’ in and out of the system, which will make it extremely difficult for bad actors to attack the network by compromising nodes.