ZILLIQA — Not just an Ethereum Killer, but a Visa Killer.
Disclaimer: This is not an attempt to hard-sell, but an opportunity for me to share my understanding. This shall not be taken as any form of advise.
Zilliqa, like many other Layer 1 protocol who dubbed themselves as the ‘Ethereum Killer’, is putting their focus on building the next smart contract platform that can best-manage the famous Blockchain Trilemma — Scalability, Security & Decentralisation.
As CertiK accurately mentioned, blockchains are often forced to make trade-offs that prevent them from achieving all 3 aspects:
Scalable: the ability for a blockchain system to handle an increasingly growing amount of transactions.
Secure: the ability of the blockchain system to operate as expected, defend itself from attacks, bugs, and other unforeseen issues.
Decentralized: creating a blockchain system that does not rely on a central point of control.
In this article, i’ll be sharing a few highlights that I find unique about Zilliqa, how they optimised their network design to put decentralisation at its core while achieving scalability and security, without going into the nitty gritty of the technology behind it. For a detailed explanation of Zilliqa’s smart contract platform, you may check out their 3-part series — The Zilliqa Design Story Piece by Piece [Part 1, Part 2, Part 3] or you may geek out at their whitepaper.
Blockchain Trilemma One — Scalability
One of Zilliqa’s unique selling proposition is scalability, they claimed to be a platform that can scale in transaction rates together with the growth of their network.
In order for Zilliqa to be a force to be reckon with, they will have to proof that they are able to match or surpass the capabilities of the incumbents. In 2019, Visa, the largest player in traditional payment methods, did a total of 185.5 billion transactions globally. That is equivalent to an average of about 5,900 transactions per second (TPS). According to their statement in 2019, Visa is able to handle a peak load of 65,000 TPS.
As for Ethereum, on 9th May 2021, the network experienced their peak daily transaction volume of 1.717 million transaction. That is equivalent to an average of about 20 TPS for that day. Due to the increase in demand for the network, it resulted in a significant increase in transaction fees to an average of USD 69.43 per transaction in the following days after. Imagine if Ethereum will have to handle the volume that Visa is doing, that will probably push the average transaction fee on the Ethereum network way beyond USD 1000! That will just be impractical.
Following are a few reasons why I believe Zilliqa has the potential to out-perform Ethereum and to rival Visa. By design, Zilliqa was built to scale, giving them the potential to support thousands of TPS while keeping the transaction cost marginal.
Scalability Booster 1 — Sharded Architecture
Zilliqa is the world’s first public blockchain built entirely on a sharded architecture. The mining network is comprised of shards. In each shard, it is a group of nodes. These nodes are there to process new transactions relying on Zilliqa’s consensus protocol and to maintain the truthfulness of the network status.
Simply put, the concept behind sharding is to divide and conquer. At Zilliqa, the work of processing transactions is divided and distributed across all the shards and each shard will be responsible for processing unique sets of transactions. With the sharded architecture, the shards will be able to process the transactions in parallel.
As an example, imagine there are 1,000 transactions to be processed at a given time and there are a total of 10 shards in the network and each shard is capable of handling up to 100 TPS. By combining the effort of all the available shards, the network will be able to handle the 1,000 transactions in under a second. And, in order for the network to handle more TPS, the network can deploy more shards to meet the required demand. It is expected that Zilliqa’s transaction throughput increases (roughly) linearly with its network size.
Scalability Booster 2— Elliptic Curve Based Schnorr Signature Algorithm (EC-Schnorr)
In a decentralised network, the active nodes are not controlled entirely by a single entity, and they have the ability to decide independently of others in the network. This could possibly result in conflict as to what is true, especially when there are malicious entities present in the network trying to distort the truth. Therefore, it is necessary to have a protocol, called the consensus protocol, for the network to come to an agreement of a single outcome that is honest, true and, preferably, absolutely final. A consensus protocol is a set of rules with a defined communication protocol for the community to come to an agreement.
With pBFT, every node in the shard is required to cast their signature for every transaction that is being processed. For the transaction to be confirmed, there needs to be at least 3f+1 nodes that approves the confirmation. This is to mitigate the probability of malicious entities making a successful attempt at compromising security of the network.
pBFT consensus rounds are broken into 4 phases(refer with the image below):
- The client sends a request to the primary(leader) node.
- The primary(leader) node broadcasts the request to the all the secondary(backup) nodes.
- The nodes(primary and secondaries) perform the service requested and then send back a reply to the client.
- The request is served successfully when the client receives ‘3f+1’ replies from different nodes in the network with the same result, where f is the maximum number of faulty nodes allowed.
In a classical approach, the nodes relies on Message Authentication Code (MAC) to communicate with other nodes across the network, to ensure that their message remains unaltered. The downside of MAC is that it is extensively taxing on the network to have every node have a unique communication channel with each and every other node on the network, which is a significant inhibition to the scalability of the network when more nodes are added to the network. You can imagine that the amount of communication required increases exponentially with the number of nodes.
Typically, pBFT works best when the consensus group size, or number of nodes in a shard, is small, ie. less than 50. But having such a small consensus group poses a security risk, which I will elaborate further in the next section: Blockchain Trilemma Two — Security.
Hence, the mitigation strategy that Zilliqa chose is to increase the shard size to at least 600 nodes, such that it becomes harder for malicious entities to have control of majority of the network, and to rely on EC-Schnorr for the nodes to communicate with each other. The key advantage of EC-Schnorr is that all the nodes communication with each other by sharing the same channel. This helps to reduce the amount of communication required, such that it becomes a linear relationship with the number of nodes.
Blockchain Trilemma Two — Security
As mentioned earlier briefly, relying on pBFT as their consensus protocol poses a potential security risk due to its size, particularly Sybil attacks.
Sybil attack is when a malicious entity creates multiple identity on the network that controls a significant number of nodes of a shard or shards of the network, possibly allowing them to perform a coordinated attack to compromise the network integrity.
Hence, Zilliqa employs a two-pronged approach to mitigate the security shortfall.
Security Booster 1 — Increase Shard Size
First, is to increase the number of nodes in each shard, thereby reducing the probability of having more than 1/3 of nodes in a shard being malicious. According to research, they are confident that having a shard size of 600 is a good balance between scalability and security.
Security Booster 2 — Proof-of-Work
Second, to enhance the security further, Zilliqa chose a hybrid consensus protocol where it relies on Proof-of-Work too, apart from just pBFT.
With Proof-of-Work, it makes it computationally costly for every node to join the network. That way there is a cost involved in trying to perform a sybil attack on the network, serving as a strong deterrence. As long as the expected returns of compromising the network is less than the cost incurred, malicious entities have no monetary incentive to compromise the network.
Security Booster 3 — Scilla
Scilla is a peer-reviewed smart contract language created by academics from the ground up. It has been designed as a principled language with smart contract safety in mind. It is non-Turing complete, reducing its susceptibility to vulnerabilities in the code.
Scilla was designed and built to avoid situations such as the DAO hack that happened on Ethereum in 2016.
It does seem like the Zilliqa team have done a great job at formulating a scalable & secure decentralised smart contract platform by design. It remains to be seen if there is a market for Zilliqa and if they are able to overcome their competitors to gain a foothold in the smart contract platfrom arena.