MATRIX’s technical whitepaper tells us that fundamental reason leading to the excessive transaction latency in today’s blockchains is that transmission overhead in a P2P (peer-to-peer) network cannot scale with rising number of nodes. The problem is inherent to the P2P based PoW (proof-of-work) consensus since every transaction needs to be broadcasted to the whole network. The latency keeps getting worse while number of nodes is increasing. Recently proposed lightning network is expected to solve this problem. What it does, however, is no more than creating a private channel for payer, receiver and transferring nodes so that transaction can be completed once a consensus is reached. Such a process lacks a guarantee for the safety, especially when the channel is under malicious attacks, because it takes place off the blockchain.

An effective solution is to introduce a hierarchy into the P2P network. The key idea is to contract a network into smaller ones (i.e., create a hierarchy) and perform PoW computation in the contracted network with fewer nodes. The basic idea of MATRIX’s proprietary algorithm is illustrated in the image above. The hierarchy is created with a distributed random clustering process without centralized control. When the clustering is completed, each node will have a delegate for itself. The selected representatives constitute a new network, coined as delegation network, which has an adjustable number of nodes. Then the transaction is only broadcasted inside the delegation network. The PoW is allocated to the delegate nodes and one such node can further partition its work into smaller jobs and assign these jobs to the nodes voting for it. Note that the clustering is repetitively performed. The probability of a node to be selected as delegate is proportional to its PoS (proof-of-stake) and other factors.

According to MATRIX’s whitepaper, the distributed random clustering based consensus algorithm of MATRIX is designed as follows.

1. A node determines whether it wants to be attached with another node based on PoS or other factors.

2. The node sends a request to neighboring nodes asking them to join it as a cluster, together with a link list of proof certificates to sign on and a request for deposit. If other nodes agree to join the cluster, the certificate will be used for verification and they will be marked as “affiliation committed”. If they do not agree, they will be marked as “competitors” and will not receive information from this cluster.

3. After becoming affiliated to a cluster, a node calculates the connectivity of neighboring nodes and elects a group of candidates. With a random method the best candidate will be elected and the respective message is distributed to other nodes.

4. When one node has an enough number of affiliated nodes, it will be marked as “fully-loaded”. Such nodes will compete to incorporate other clusters.

5. Nodes will send invitation to neighboring nodes, asking the latter to join them. Through a multi-signature mechanism, they together generate a random seed, which can be used to initialize a Markov Chain procedure. An independent third party will judge who wins the competition by looking at the seed, public and private keys published by both parties, and the result of Markov computing. Both parties have to confirm the result and put a signature on the result, which is then published for book-keeping.

6. Nodes will keep incorporate others until they become “fully-loaded” or until all other nodes in its neighboring area are fully-loaded. It will then be marked “isolated”.

7. When there are only “fully-loaded” and “isolated” nodes in the network, the next round of absorption starts. “Fully-loaded” will only absorb “isolated” nodes and vice versa.

“Fully-loaded nodes will become “Super” nodes or “Isolated Super Absorbing Nodes”.

When there will be more than 255 “Super” nodes or “Isolated Super Absorbing” nodes, a next round of absorption begins and nodes will become core nodes. When the number of core nodes exceeds the total number of nodes N/128 in the previous round, the absorption process ends. The above procedure continues until there are less than 255 clusters. The super nodes of these clusters then become “delegate nodes”.

MATRIX’s idea of contracting a network by implementing a hierarchy will significantly reduce latency and provide with safety of malicious attacks.