How to Solve the Trilemma: Scalability, Security, Decentralization
The well-known problem of the Trilemma, Scalability, Security, Decentralization, affects all cryptocurrency blockchains. Today we see how this problem is addressed. The three problems to be solved are:
- Scalability, a protocol with inexpensive transactions that leverages low hardware performance is defined as scalable;
- Decentralization refers to the fact that there is not an entity or a company to govern the network but the participants themselves to make it go forward. The fewer nodes there are, the more a network must be based on trust. The "weaker" node of the network must be able to satisfy/verify all the rules of the network (validity of the transactions, supply of the token, etc);
- Security.
Basically, the Trilemma problem means that improving one (or two) of these three factors decreases the other. For example, Bitcoin and Ethereum are quite decentralized and secure but not very scalable (i.e. transactions are not very fast and are expensive, compared to other blockchains; Ethereum 2.0 with the transition from Proof Of Work to Proof Of Stake, with the use of a double chain and sharding or the fragmentation of the blockchain into small fragments called "shards", tries to improve its scalability without affecting decentralization).
A network node requires three resources:
- Bandwidth: cost to download and transmit Blockchain data.
- Compute: cost to perform calculations and smart contracts
- Storage: function necessary to store data, it has obviously a cost
The performance of a network (Scalability) depends on two factors:
- Throughput: transmission of transactions per second
- Latency: processing time of a transaction
- it is fundamental that to increase these two factors, the costs remain low)
For example, BNB, Tron, EOS has very good scalability (they are cheap and fast) but exploit a consensus mechanism through delegation and are not very decentralized (there are few nodes). As mentioned at the beginning of the article, Ethereum is decentralized and secure but not very scalable (due to latency i.e. low speed and other network costs paid in the form of gas.
INCREASING SCALABILITY (LAYER1 AND LAYER2)
To increase scalability, i.e. transactions per second while decreasing network cost, one could rely on:
- to a third party but obviously, this increases the "trust" confidence and therefore decreases decentralization and security (transferred assets could be stolen);
- use larger and more frequent blocks (Bitcoin Cash and Bitcoin SV). But the cost to maintain the node is higher and this causes a decrease in their number and consequently decentralization and security (EOS, Ripple, Solana also suffer from this problem);
- the execution of all operations on a parallel chain (e.g. Matic works as a Layer2) which decreases the trust and increases the unit cost for each block (making transactions cheaper). Transactions are performed off-chain (optimistic rollup), on the main chain instead only results are written. This does not invalidate decentralization, it partially increases scalability but the criticality could be security. In practice, data is processed locally and then "officially" rewritten on the blockchain. Clearly, this data must be verified by another sequencer in the network called a "verifier" made legit by a "fidelity bond" i.e. locked collateral that acts as insurance. The status of transactions before being validated goes under a "dispute period" where possibly a "fraud-proof" indicates that the transaction is not safe. This is one of the reasons why passing from Layer2 to Layer1 now it is necessary to wait a week for the data to be verified.
A paradox for Layer2 is that if the system gives an incentive to work well, no one will try to deflect (cheat), otherwise they would lose the fidelity bond. But if no one deflects, there is no incentive to become a verifier because the costs would be greater than the revenues. But if no one is a verifier then the need might arise to cheat and validate invalid transactions so the sequencer cheats and the system no longer works.
Layer2 tries to solve this paradox through the "dispute period", that is, the 7 days wait for the withdrawal. To force this wait, the user can pay a fee that ends up in the hands of the verifier who has an incentive to do this work (transaction verification). There is a sort of exchange between user and verifier: if I'm bringing back 1 ETH to Layer1, I will receive 0.95 and the difference goes to the verifier who acts as a "market maker". However, the problem of security remains unresolved because if Layer2 is connected to Layer1, the connection is direct with the mainnet, exposing it to more vulnerabilities or bugs.
OTHER BLOCKCHAINS
Bnb, Tron and EOS are very fast and cheap but almost centralized due to few nodes. EOS, Ripple and Solana have very high costs to implement a node, in the same way as Bitcoin Cash, Bitcoin SV, Dogecoin, Litecoin which have adopted the big block solution. These are blockchains that are more prone to attacks by being able to saturate a block with microtransactions and leaving it unavailable for legit ones.
Polkadot, Zilliqa, Cardano and Egld use sharding guaranteeing great performance but at the expense of network security since the "shards", if intercepted, could become an attack vector.
SOLANA
The solution of Solana to partially solve the trilemma is the "Proof Of History" that exploits a principle of telecommunications: multiplexing through the division of time. Solana translated this principle by using:
A. validator nodes with a clock that allows them to be synchronized. Transactions arrive at random nodes and are then placed in chronological order, creating a blockchain;
B. this system guarantees very high speeds (50,000 / 80,000 transactions per second) while maintaining decentralization
C. Proof of Stake with delegation: anyone can create a validator node, there are no minimum stakes but you need really high performance and expensive hardware, reducing decentralization;
D. not using the "sharding" (fragmentation of the blockchain), SOLANA has theoretically higher security than Polkadot, Cardano, Zilliqa, Egld (all cheap and fast but it is a compromise with the security because a "fragment" intercepted could become an attack vector having also an impact on the price of the token)
E. Turbine Block Propagation, the block is decomposed into many fragments and distributed to various nodes.
The problem is the higher demand for computing power compared to other blockchains and the consequent lower decentralization, but those who have the necessary resources can make the network scalable even in periods of massive use.
ALGORAND
Algorand has tried to solve this problem by leveraging a particular technique. Certainly, it is a cheap and fast blockchain. The implemented solution shifts the focus to the validators, which are in charge of adding new blocks. Algorand does this by selecting validators randomly among all token holders, through an algorithm that automatically selects the next set of validators. This approach maintains decentralization since everyone can be selected by the system, and the fact that no one knows who will be the next validators, ensures security.
The only way to damage the Algorand network is to reach a majority of tokens, which is impossible in practice because they would lose value (so the attack would not be cost-effective). The system is scalable because the random selection of validators happens in a microsecond.
Thanks for reading.
Image by theshubhamdhage is released free to use under the Unsplash License