In this blog I will explain that the blockchain is an unstoppable innovation that goes far beyond what we know as the consensus mechanism maintaining a distributed ledger empowering decentralized cryptocurrencies.
Most of us know the blockchain as a technology that is slow in speed because the entire state of the blockchain has to be replicated among thousands of users. The number of transactions and the speed at which such transactions are processed and settled (because they need to be validated by every party) is limiting the overall throughput compared to centralized systems.
For example Bitcoin can only process 7 transactions per second and delays between submission of a transaction and verification, that is intrinsic to the system’s security, is one hour. Ethereum smart contract execution is suffering from latency of more than 15 s, and the total contracts that can be executed per second is very limited.
In case of high volume or micro transaction systems (think of DeFi and IoT solutions) not only the limited throughput is problem but also the transaction fees that are incurred with these transactions. In such systems transactions have to be executed instantly and confirmation times of minutes are unacceptable. Transaction fees cannot exceed the value of the transaction itself.
To overcome these problems 2nd-layer protocols or 3rd generation blockchains like Cardano came into play. These solutions are addressing scalability problems and long confirmation delays that are very common in 1st and 2nd generation blockchains like Bitcoin and Ethereum.
Techniques were introduced to overcome the problems we mentioned before and are constantly evolving. The main idea is that the majority of the work doesn’t need to be done always on-chain but also can be moved off-chain. Below we will mention some of these techniques and their advantages and disadvantages.
Payment channels
Execute payments directly over the ledger off-chain. Protocols for 3rd generation blockchains introduced off-chain transactions where users can exchange money with each other without interacting with the ledger, also known as a payment channel. A payment channel in essence is a medium between two or more parties that are interested to transact in a trust-less way with each other by committing funds on-chain. Once the funding transaction is complete, many transactions can happen between the two parties involved in the payment channel without sending these transactions to the “settlement-layer”. Think of a payment channel as a pipe being opened and closed from both ends where only the opening and closing involves interaction with the ledger and transactions can only happen when both parties sign thus updating the state of the channel which is done completely offline allowing for quick transactions at no costs. Payment channels are also able to handle disputes in case a party closes the payment channel for a previous transaction, disputes are handling is done on-chain. Multi-signatures are required to unlock funds.
Purpose: 2 party payments
Actions: Creation channel On-chain, Update/Execute Off-chain balance changes, Close channel On-chain
How does this work, lets assume we have two channel participants Alice & Bob.
- Alice & Bob are opening a payment channel and a both funding the payment channel with 10 ADA. These transactions are executed on-chain (online) and the blockchain sees a ledger entry of 20 ADA.
- Alice is transferring every day 1.5 ADA for a service to Bob for 5 days. These transactions are executed off-chain (offline) and are just edger entries with signatures of both parties.
- After 5 days the balance look like this, Alice balance is 2.5 ADA, Bob balance is 17.5 ADA and the channel gets closed and the latest state of channel (offline ledger) is broadcasted to the blockchain
- The blockchain “settlement layer” receives the latest ledger entry of the channel and it transfers 2.5 ADA to Alice and 17.5 ADA to Bob.
The settlement layer acts as a fair jury by looking up the latest ledger entry received from the channel that was already agreed on by both parties since they were signed by both of them.
Advantages:
- Improved throughput and decrease computational load for nodes in the network.
- Reduce of costs since most of the transactions between two parties are done offline. Only opening and closing a channel incurs transaction fees.
- Preservation of privacy since offline transactions are only known by the participants in the channel.
- Transactions within a channel get instant finality (no wait time for transaction confirmations)
Disadvantages:
- Only allow to transact between two parties
- Running logic (smart contracts) within a channel is not possible
There are many different types of payment channels which we won’t describe here since this is not the purpose of this article.
Payment networks
Payment networks are overlay networks or 2nd-layer networks in an attempt to make 1st and 2nd generation blockchains scale. The concept of payment channels have been extended in payment networks where pairs of participants create channels that can be concatenated into networks allowing for payments across the network without interaction with the blockchain. Examples of such a payment networks are the Ethereum Raiden network or the Bitcoin Lightning network. The disadvantages of these payment networks are the introduction of intermediary hubs. Transactions send over these hubs across the network passing these intermediary hubs incur transaction fees for this intermediary service, next to this it increases the latency of such transactions and all intermediary nodes in the path of the transaction need to be online. Payment networks are far from ideal for high volume transaction and micropayment systems.
Virtual payment channels
Virtual payments were invented to overcome the problems of a payment network by making use of intermediary payment hubs (nodes) and establishing a direct virtual link between payer and payee without the need of the intermediary hub to be involved in the payment process. Virtual channels minimize the need for interaction with the intermediaries in channel chains, and in particular do not require that intermediaries confirm individual payments routed via them. A virtual payment channel is being build “on top of” the ledger. Virtual payment channels remove the dependency on intermediary services which avoids the need of that service to be online, further they reduce the payment path and as such latency. The disadvantage of virtual payment channels is that they only work over blockchains that allow for Turing complete smart contracts which limits it usability. Due to this limitation virtual payment channels cannot be applied to for example the Bitcoin network.
State channels
State channels refer to the process in which users transact with each other off-chain and minimize on-chain operations. State channels work by “locking up” some portion of blockchain state into a multi-sig contract, controlled by a defined set of participants. The state that is “locked up” is called a state deposit. After the state deposit is locked, channel participants use off-chain messaging to exchange and sign transactions without deploying them to the blockchain. State channels are very similar to the concept of payment channels, but instead of only supporting payments they support general state updates.
A state channel depends on Turing complete smart contracts previously committed to the blockchain which contains application specific code and state channel management code.
Parties can send a state-transition messages to a contract updating its state. State-transition messages can be kept off-chain and only committed to the blockchain in case of a dispute.
Purpose: 2 party contracts
Actions: Create channel On-chain, Add smart contract Off-chain, Update/Execute Off-chain, Close On-chain
- Users lock up a portion of the state by sending money to a multi-signature contract that has the ability to accept for example Ether and payout all parties who have sent it Ether.
- Users sign transactions and send them to one another, each one making a copy of the signature for later reference.
- Each transaction contains a nonce so the smart contract can know the chronological order of transactions.
- Once both parties are done, they close the state by submitting a transaction to the Ethereum blockchain.
- After the state is updated and unlocked, the smart contract sends each party their remaining Ether balance.
Advantages:
- Improved throughput and decrease computational load for nodes in the network.
- Reduce of costs since most of the transactions between two parties are done offline. Only opening and closing a channel incurs transaction fees.
- Preservation of privacy since offline transactions are only known by the participants in the channel.
- Transactions within a channel get instant finality (no wait time for transaction confirmations).
- They allow for smart-contracts to be executed offline, for example votes could be updated in a state channel and broadcasted to the blockchain once all votes are collected.
Disadvantages:
- Need to be 100% available for all participants
- Best used for a set defined participants
- The solution is not applicable to all blockchains since they require smart-contract capabilities, this excludes blockchains like Bitcoin
Virtual state channel
A virtual state channel can be build on top of two previous build state channels, virtual channels have a fixed lifetime upon construction. Virtual state channels create channels that allow execution of state machines instead of being limited to payments only, and use an off-chain protocol to expand the network with new channels. This reduces the network’s diameter yielding shorter payment paths, and allowing multiple parties to perform payments without interacting with intermediary nodes. This construction requires smart-contract capability and as such is not applicable to Bitcoin.
Purpose: multiple party contracts
Actions: Create channel Off-chain, Add smart contract Off-chain Update/Execute Off-chain, Close Off-chain
It is obvious that blockchain technology is rapidly evolving like any other technology. Coming from just a consensus protocol maintaining the ledger state on different computers it is moving into the direction of solving the problem that were related to doing everything on-chain. As such DeFi is very strong movement show-casing new financial products for real-life use cases, solving problems of centralized systems and this is just the start.
This is my personal reason why I am involved in the Blockchain and choose to be a stake pool operator for the Cardano blockchain, it is very exciting to work with cutting edge technology and how this technology can be used to make our world a better place in solving issues related to the old economy.
Question: Why Cardano?
I personally believe in the approach of Cardano project where the development company behind Cardano IOHK is taking a different route and building an new blockchain from the ground up after having carefully studied the 1st and 2nd generation blockchains the overcome their flaws. Their research first approach and peer review methods by domain experts to scientifically deliver proof that their solution is sound before starting to develop is in my opinion revolutionary for this space. Most projects originated from hard forking either Bitcoin or Ethereum and as such inheriting all the shortcomings of these projects. This is the main reason why blockchain technology still has not found mainstream adoption. Personally I am convinced that this will change the coming years since high quality solutions like the Cardano blockchain are constructing the financial protocols for the future.
Another reason why I support the Cardano project is that the project is constantly trying to iinnovate and improve the blockchain community as a whole. Research is done and purposes are being made to the community to solve certain problems. A good example of this is the recently purposed document about Lightweight Virtual Payment Channels on basis of time-locking and multi-signatures. This research is based on the earlier mentioned techniques in this blog and uses the UTxO model known from Bitcoin. It allows for the first virtual channel construction to be implemented on blockchains such as Bitcoin without the need of smart contracts. Further it can be extended with smart contracts via the the more recently eUTxO model. For more details, download the document Lightweight Virtual Payment Channels here.
From the above it is clear that I am a big believer in the blockchain technology as such and support an outstanding project in this space. Past problems will be solved, blockchains will become scalable, interoperable, allowing for thousands of transactions per second with instant confirmation. The best of on- and off-chain transactions will be combined in one solution that can be automated via smart contracts.
Blockchains like Cardano will cater for millions of daily users which can transact in a secure and transparent peer to peer way without the need of intermediaries at acceptable fees and make financial inclusion possible for everyone.
The future of finance is here and Cardano will be one of the projects that is on forefront of this exciting development that is reshaping the financial world of the future and the backbone of the internet.