There are a lot of confusing terms being thrown around the cryptocurrency industry. Consensus algorithms like Proof-of-Stake are often confused with Bitcoin’s Lighting Network, and there is a lack of information adequately explaining their differences. Fortunately, ordinary language can be used to define these complex concepts.
What Are Consensus Algorithms
Bitcoin and other decentralized cryptocurrencies use consensus algorithms.
The Bitcoin network is designed to function without third-party intermediaries like banks or other financial institutions. Consensus algorithms function to make these institutions unnecessary by allowing users of the network to validate the transaction themselves.
This occurs in two parts:
- A complex math problem called an “algorithm” is solved by someone on the network
- A certain percentage of users must reach a consensus that the algorithm was solved correctly.
In other words, transactions are made on the network, gathered together in a block, and then validated through the solving of an algorithm and consensus that the right answer was reached.
There are a variety of consensus algorithms including proof-of-work (POW) and proof-of-stake (POS).
Proof-of-Work (POW) vs. Proof-of-Stake (POS)
POW was first introduced by Bitcoin on Jan 3, 2009, and is the first consensus algorithm developed for cryptocurrencies. It is also used by Litecoin, Ethereum, and a large number of other cryptos. While it is a complex process, it can be explained simply.
First, a number of transactions enter the network and are randomly gathered into blocks by miners. Once the transactions are hashed together as one block, the miners must solve algorithms that attach the block to the blockchain. Whoever can solve the equation first gets a reward. In other words, whoever does the work the fastest gets the reward for doing the work.
To accomplish this, ASIC cards were developed to solve the equations much more quickly than GPUs used by the average computers. The usage of these cards, however, are environmentally destructive and have led to centralized control of various cryptocurrency networks by ASIC manufacturers and the miners.
Proof-of-Stake (POS) is an alternative.
Where POW requires a miner or mining pool to prove they have done the work necessary to solve an algorithm, POS operates differently. It elects one person on the network to validate, rather than mine, transactions into blocks. These validators are not miners. Instead of mining new coins or tokens, they mint or forge them through the validation process.
To become a validator, a network user must “stake” some or all of the coins or tokens they own. Some POS networks require a minimum amount of coins to be staked; others do not. The larger the stake, the higher the probability that a person will be chosen as a validator.
For example, Peercoin (PPC) uses POS on its network and does not require a minimum number of peercoins to be staked. An individual can stake as many or as few peercoins they want. If Jack staked 100 peercoins, however, and Jill staked 1,000 peercoins, Jill will be 10 times more likely to be selected as a validator than Jack. Furthermore, if Jane stakes 10,000 peercoins, she will be 10 times more likely to be selected as a validator than Jill and 100 times more likely than Jack.
The Lightning Network
Lightning 👏 is 👏 not 👏 proof 👏 of 👏 stake 👏
— elizabeth stark (@starkness) January 9, 2019
The Lighting Network is not a consensus algorithm. It is an innovation in blockchain technology used by Bitcoin that allows transactions take place more quickly, less frequently, and with lower fees.
Currently, the Bitcoin network is capable of processing seven transactions per second while credit card companies can process tens of thousands. Furthermore, the fees for each BTC transaction are subject to extreme fluctuations. Sometimes, the cost of a BTC transaction is under a dollar but other times can increase to over $50.
With slow transaction rates and (possibly) high fees, BTC faces major hurdles in achieving mass adoption.
Jack and the Beanhouse
With the lightning network, these problems are theoretically solved. By building a second layer on top of the main blockchain, the lightning network makes off-chain transactions possible.
For example, suppose that Jack regularly shops at the Bitcoin Beanhouse. To use the Lightning Network, both Jack and the Beanhouse must send bitcoins to a multi-signature address. A total of zero bitcoins might be sent by the Beanhouse while Jack, being the buyer, might send 0.01 bitcoins.
This transaction is written to the main Bitcoin blockchain and creates an off-chain payment channel between Jack and the Beanhouse. When Jack buys a cup of coffee, he will not have to make the transaction on the main Bitcoin chain. It will take place through this payment channel.
Every time Jack buys coffee with bitcoins, both he and the Beanhouse will use their private keys to confirm the transaction. The first transaction will create an off-chain ledger. When the address is written back onto the main blockchain, a second transaction will occur. It will include all of the transactions that took place between the Jack and the Beanhouse after the address was first placed on the blockchain.
Jack and Jill
This is a simple example of a direct peer-to-peer relationship between Jack and the Beanhouse. However, the lightning network is a bit more complex than this.
The more people that are added to the network, the more complicated it becomes. Multiple pathways between one person and another may exist. The Lighting Channel is designed to move funds from one source to another through the least number of intermediaries.
None of these intermediaries are centralized. They are chosen based on their connection to others in a decentralized network programmed to select the shortest distance between two points.
POW and POS are only two of many types of consensus algorithms.
The lightning network is only one of many innovations to blockchain technologies. It is implemented within Bitcoin’s POW protocol, but similar technologies could also be included within POS protocols.
Do you think the Lightning Network is a feasible way to increase transaction speed on the Bitcoin network? What other innovations to blockchain technology might be used instead of or in addition to the lightning network? Let us know your thoughts in the comments below!
Images courtesy of Shutterstock, Twitter.