top of page

Crypto Protocols Part I: Bitcoin, Ethereum, Proof of Work and Scaling Layers

  • igonzalezdelmazo
  • Mar 2, 2021
  • 8 min read

Blockchain technology has been created in a similar way than the Internet: in layers. Therefore, crypto protocols, which are set of rules or instructions to act, can be used in different layers. Layer 1 protocols are normally the underlying main blockchain architecture while layer 2 protocols (or also called layer 2 solutions) are built on top to add a functionality to the layer 1 protocol, such as scalability and speed. Additionally, over the years, other layer 1 protocols have emerged to improve on the challenges faced by earlier ones and to solve a particular use case. Through changes in algorithms and consensus mechanisms, these new layer 1 protocols have managed to increase throughput and speed of transactions, reduced the cost and provided privacy options. This post covers Bitcoin, Ethereum and other Proof of Work protocols given that they were developed first, but Part II will cover the subsequent protocols and consensus mechanisms that have been created.



Source: Pexels.com


Current blockchain technology is based on layers, similarly to the Internet. A layered system is useful because different pieces of functionality are built on one another and they become easier to upgrade, patch, or change without affecting the other layers. There are various opinions on what is the exact number layers of a blockchain but overall, these layers constitute the infrastructure, consensus, network and applications of the blockchain.


Current blockchain technology is based on layers, similarly to the Internet. Overall, these layers constitute the infrastructure, consensus, network and applications of the blockchain

Blockchains use protocols to operate. A protocol is a set of rules or instructions that regulate how to act or interact in a given situation. Protocols can be used in different layers if they have different functionalities. Layer 1 protocols are normally the underlying main blockchain architecture while layer 2 protocols (or also called layer 2 solutions) are built on top of an existing blockchain to add a functionality, such as scalability and speed. Layer 2 solutions have also been called “off-chain” solutions because they normally avoid recording all data or transactions in the native layer 1 blockchain; they may only send to the layer 1 blockchain the result of a transaction while keeping the specifics in layer 2.


Layer 1 protocols are normally the underlying main blockchain architecture while layer 2 protocols (or also called layer 2 solutions) are built on top of an existing blockchain to add a functionality, such as scalability and speed

Over the years, many protocols have emerged. Each protocol normally was created to improve on the challenges faced by earlier protocols and to solve a particular use case. Two of the main points of improvement have been the changes in algorithms and consensus mechanisms that have allowed the increase in scaling capabilities in terms of throughput and speed, and reduced the cost of transactions. Furthermore, other enhancements have come in the field of privacy since Bitcoin transactions are publicly accessible and are connected to the users’ wallet, even if those wallets are not linked to personal information.


Bitcoin was the first blockchain protocol created and, as of today, its cryptocurrency, Bitcoin or BTC, has the largest market capitalization (USD ~ 890 billion). While Satoshi Nakamoto, its creator, may have originally envisioned Bitcoin as a medium of exchange, the reality is that due to its volatility and scalability problems, Bitcoin’s main use today is store of value. Bitcoin uses Proof of Work (PoW) as a consensus mechanism, which makes nodes compete among each other to solve a math problem and the first one who solves the problem writes the next block. This process of solving the math problem is called ‘mining’ and the difficulty of the problem is programmed to be adjusted so that the average time between each block remains 10 minutes. In addition, there is a limited number of transactions that can be recorded on a block. These two restrictions, plus the time to confirm a block, which is approximately an hour, make Bitcoin impracticable for many payment use cases (unless the alternative is worse).


Bitcoin was the first blockchain protocol created and it uses a Proof of Work (PoW) mechanism for consensus. As of today, its cryptocurrency, Bitcoin or BTC, has the largest market capitalization (USD ~ 890 billion)

To solve Bitcoin’s scalability problem, layer 2 solutions have been created. The most important solution is the Lightning Network, which uses micropayment channels that allow Bitcoin transactions to occur off-chain. Only the opening and closing of channels is recorded on-chain. A channel does not only allow the participants who created it to transact (e.g. participants A and B), but also any participant can transact with another as long as they are connected somehow (e.g. If A has an open channel with B, A can transact with C, as long as C has an open channel with B). The network was heavily criticized for serious vulnerabilities in 2020, but as the technology gets improved, Kraken and OKEx have announced that they will join Bitfinex, Bitstamp, and a few other exchanges in supporting Lighting. The solution can help exchanges lower transaction fees for users when depositing and withdrawing Bitcoin from the exchange.


Bitcoin's most famous layer 2 solution is the Lightning Network which uses micropayment channels that allow Bitcoin transactions to occur off-chain

Other protocols that use PoW are Litecoin, Dash, Bitcoin Cash, Dogecoin, ZCash and Monero, among others. Litecoin uses a different algorithm (scrypt) than Bitcoin (which uses SHA-256) and reduces the time of generating blocks to 2.5 minutes. Dash also uses a different algorithm (X11) reducing the confirmation times from one hour in Bitcoin to four seconds, and it includes a privacy feature, which is a coin-mixing service (so transactions cannot be directly traced to the parties involved)[1]. Bitcoin Cash is the result of a hard fork (a disagreement among developers) from the Bitcoin blockchain, by which the new blockchain created increased the number of transactions that can be recorded on a block to process more transactions per second. Dogecoin was created as a joke by using Bitcoin’s code and replacing the name Bitcoin for Dogecoin. Zcash was created to give optional privacy to users. It uses ‘Ak-SNARKS’, which is a proof that allows one party to prove to another that a statement is true without revealing any details beyond the validity of the statement itself[2]. Transactions with Zcash are public by default but users can opt-in to make them private. Monero obfuscates sending and receiving addresses as well as transacting amounts, providing privacy as an always-on feature to users[3]. Also, Monero uses a different algorithm (Cryptonight) which makes mining with a simple CPU easier and has an adaptive block size limit to accommodate transaction volume.


Ethereum was created with the objective of building decentralized applications through smart contracts. Its cryptocurrency, Ether or ETH, is nowadays the second largest by market capitalization (USD ~170 billion). Ethereum's smart contract functionality allowed the development of DeFi, or decentralized finance, which currently observes USD ~38 billion in total value locked and is considered the future of finance. Ethereum was created to operate with a PoW mechanism that allows 15 transactions per second, which constrains its scalability. This problem was made obvious during 2020 and begining of 2021, when the prices to process transactions in Ethereum have skyrocketed.


Ethereum is the second largest by market capitalization (USD ~170 billion) and its smart contract functionality allowed the development of DeFi, or decentralized finance, which is considered the future of finance

To fix this scalability problem, Ethereum is now migrating to a Proof of Stake (PoS) mechanism, to become Ethereum 2.0. PoS requires validators to stake, which means to lock or hold their Ether in a cryptocurrency wallet. In the case of Ethereum, validators are chosen at random to create blocks and are responsible for checking and confirming blocks they do not create[4]. Validators that do their job well are rewarded and those that confirm bad blocks lose the Ether they staked. This is just one way to implement a PoS mechanism, other protocols use a different system to select the validators that create the next block (length of staking, wealth, etc.) or impose another reward/punishment scheme.


Ethereum is now migrating to Ethereum 2.0 to combat its scalabitiy problems. The new chain will use a Proof of Stake (PoS) mechanism, and will include 'shards' that allow a simultaneous and independent processing of transactions

Ethereum’s migration towards Ethereum 2.0 does not only include a change in its consensus mechanism from PoW to PoS but also splits its blockchain into 64 sub-groups of linked nodes called 'shards' that allow a simultaneous and independent processing of transactions. The 64 shards will handle the accounts and smart contracts, and will connect to the beacon chain, which is the main chain that will coordinate the entire network storing snapshots of the shards and managing the registry of validators[5]. The migration has several phases to minimize disruption in the Ethereum ecosystem and it may take several years to complete.


In the meantime, several layer 2 solutions have been developed to solve the scalability problems of Ethereum in the short-term because it is uncertain how and when the Ethereum community will move to Ethereum 2.0

In the meantime, several layer 2 solutions have been developed to solve the scalability problems of Ethereum [6] in the short-term, because it is uncertain how and when the Ethereum community will move to Ethereum 2.0. These include Rollups (Zero-knowledge and Optimistic), State Channels, Plasma, Validium, Side chains and Hybrid solutions.

  • Zero-knowledge (ZK) Roll-ups bundle or ‘roll up’ sidechain transactions into a single transaction and generate only one cryptographic proof, known as a SNARK. Only the SNARK is recorded on the main layer 1 Ethereum blockchain, while the signature verification, contract execution, etc. occur in these sidechains. ZK-roll ups can only be used for simple computation but do not support the Ethereum Virtual Machine (EVM), which is the software platform where developers create decentralized apps. One important solution of this type of layer 2 solution is zkSync, created by Matter Labs which just closed a Series A funding round led by Fred Wilson’s Union Square Ventures (USV).

  • Optimistic rollups use a side chain that is parallel to the main layer 1 Ethereum blockchain. This parallel chain can do anything that Ethereum layer 1 can do (including support EVM), but it does not compute transactions by default. However, if someone notices a fraudulent transaction, the rollup will execute a fraud-proof and run the transaction's computation, using the available state data. The fraud-proof system may generate longer wait times for transaction confirmation than a ZK-rollup. One important solution of this type of layer 2 solution is Optimism, which raised $25 million Series A led by a16z a week ago.

  • State Channels allow participants to transact off-chain while only submitting two transactions to the layer 1 (the initial and the final status of the transaction). To be able to open the channel, the users must lock Ether into a multisig contract. The disadvantages of this system is that any change of state requires the consent from all participants (or their delegates) and it may not be ideal for one-off transactions because of the time and cost associated with setting up a channel.

  • Plasma chain is a separate blockchain that is anchored to the layer 1 Ethereum chain and uses fraud proofs. The plasma chain communicates periodically any changes to the layer 1 chain so it requires constant liveness. Also, the plasma shain only supports basic token transfers, swaps, and a few other transactions.

  • Validium uses zkRollups, but data is stored off-chain to achieve a higher throughput. This can lead to 10k transactions per second per validium chain and multiple chains can be run in parallel.

  • Side chains is a separate blockchain which runs in parallel to layer 1 and operates independently. It has its own consensus algorithm. One important solution of this type is SKALE.

  • Hybrid solutions combine parts of the above layer 2 solutions.



Comments


  • Grey Twitter Icon
  • LinkedIn

© 2023 by The New Frontier. Proudly created with Wix.com

bottom of page