List of contents

  • Introduction

  • Blockchain scalability issues

  • What are some off-chain scalability solutions?

  • Getting to know sidechains

    • What are sidechains?

    • How does sidechain work?

    • Why are sidechains used?

  • Get to know payment channels

    • What is a payment channel?

    • How does the payment channel work?

    • Payment line

  • Closing


Introduction

In general, scalability is the system's ability to develop to meet increasing demand. In computing, you might increase the capabilities of your machine by upgrading the appearance of the hardware so that it becomes faster at performing certain tasks. When we talk about scalability in blockchain, what we mean is expanding the capacity to handle more transactions.

Protocols like Bitcoin have many advantages, but unfortunately scalability is not one of them. If Bitcoin were run in a centrally owned database, it would be relatively easy for administrators to increase the speed of results. But Bitcoin's value proposition (example: censorship resistance) requires that many participants synchronize copies of the blockchain.


Blockchain scalability issues

Running a Bitcoin node is relatively cheap, and even simple devices can do the job. But because thousands of nodes have to stay up-to-date with each other, this causes certain limitations in their capacity.

Limits are placed on the number of transactions that can be processed on-chain, to avoid the database expanding to undesirable sizes. If it's too big or too fast, the nodes won't be able to keep up. Moreover, if a block is too large, it cannot be forwarded over the network.

As a result, we are in a condition known as a bottle neck. Blockchain can be compared to a train service that will depart at predetermined intervals. There are limited seats in each carriage, and to get tickets, travelers must haggle to secure a spot. If everyone tries to get on the train at the same time, the price will be high. Likewise, a network that is clogged due to delayed transactions will require users to pay higher fees to get their transactions done on time.

One solution is to build larger carriages. This means there will be more seats, and cheaper ticket prices. But there is no guarantee that the seats will be quieter. Carriages cannot continually expand, just as blocks or  gas blocks cannot continually expand. This would make it more expensive for nodes to remain in the network, as it would require more expensive hardware to stay in sync.

Ethereum creator Vitalik Buterin created the Scalability Trilemma to explain the challenges faced by blockchain. He theorizes that protocols must choose between scalability, security, and decentralization. This is a tricky situation – if you focus too much on two properties, the third will be very weak.

For this reason, many argue that scalability should be achieved in an off-chain manner, while security and decentralization should be maximized on the blockchain itself.


What are some off-chain scalability solutions?

Off-chain expansion is an approach that allows transactions to be executed without bloating the blockchain. Chain-linked protocols allow users to send and receive funds, but transactions do not appear on the main chain. We will discuss two important developments in this sector: sidechains and payment channels.


Getting to know sidechains

What are sidechains?

Sidechain is a separate blockchain. However, it is not a stand-alone platform, because it is linked in a certain way to the main chain. Main chains and sidechains can be operated in the same way, meaning assets can flow freely to and from both types of chains.

There are several ways to ensure that funds can be sent. In certain cases, assets are moved from the main chain by depositing them to a special address. These funds are not actually sent – ​​they are locked within the address, and the same amount is issued on the sidechain. An easier way (but it is a centralized option) is to send funds to a custodian, who exchanges the deposit for funds on the sidechain.


How does sidechain work?

Imagine our friend Alice has five bitcoins. He wants to exchange it for five equivalent units on a Bitcoin sidechain – let's say it's called a sidecoin. The sidechain in question uses bidirectional links, meaning users can transfer their assets from the main chain to the sidechain and vice versa.

Please remember that sidechains are separate blockchains. So these chains have different blocks, nodes and validation mechanisms. To get her sidecoins, Alice sends five bitcoins to another address. This address could belong to someone who would credit five sidecoins to Alice's sidechain address if they had received the bitcoins. Or alternatively, the system has some kind of setup where sidecoins are automatically credited once the software detects a payment.


Skalabilitas sidechain


Now Alice has exchanged her coins to the sidechain, but she can at any time do the reverse process to get the bitcoins back. Since it has entered the sidechain, it is now free to transact on this separate blockchain. It can send or receive sidecoins as easily as on the main chain.

Now he can, say, pay Bob a sidecoin for the purchase of a Binance hoodie. When he wants to return to Bitcoin, he can send four sidecoins to a special address. Once the transaction is confirmed, four bitcoins will be released and sent to his own controlled address on the main chain.


Why are sidechains used?

Maybe you're wondering what the real point is. Why doesn't Alice just use the Bitcoin blockchain?

The answer is that sidechains are capable of things that Bitcoin cannot. Blockchain is a carefully assembled system of trade-offs. Even though Bitcoin is the most secure and centralized cryptocurrency, in terms of throughput, Bitcoin is not the best. Although Bitcoin transactions are faster than conventional methods, they are still relatively slow when compared to other blockchain systems. Blocks are mined every ten minutes, and fees can increase significantly when the network is congested.

Indeed, perhaps small, everyday payments do not need this level of security. If Alice is paying for the coffee she bought, she will not want to stand around waiting for the transaction to be confirmed. If that happens, he will hold up the line, and the drink will get cold before drinking.

Sidechains are not bound by the same rules. In fact, there is no need to use Proof of Work for it to work. You can use any consensus mechanism, trust a single validator, or change any number of parameters. You can add improvements that don't exist on the main chain, generate larger blocks, and complete transactions quickly.

Interestingly, sidechains can even have critical defects/bugs without affecting the underlying chain. This makes it possible for sidechains to be used as platforms for experimentation and to roll out features that may require consensus from the majority of the network.

If users don't mind the trade-offs, sidechains can be an integral step towards effective scalability. There is no requirement for the main chain node to store any transactions from the sidechain. Alice can enter the sidechain with one Bitcoin transaction, make hundreds of sidecoin transactions, and then exit the sidechain. As far as the Bitcoin blockchain is concerned, it only does two things – namely logging in and logging out.

It is similar to Ethereum Plasma, but there are some big differences. Read more about: What is Ethereum Plasma


Get to know payment channels

What is a payment channel?

Payment channels serve the same purpose as sidechains in terms of scalability, but they are fundamentally different. Like sidechains, payment channels encourage transactions to be carried out outside the main chain to prevent blockchain bloat. But unlike sidechains, payment channels do not require a separate blockchain.

Payment channels use smart contracts to allow users to transact without publishing their transactions to the blockchain. This is done with the use of software-enabled consent between two participants.


How does the payment channel work?

In models like the popular Lightning Network, two parties would first deposit coins to an address they own together. This is a multisignature address, requiring two signatures for funds to be spent. So, if Alice and Bob create an address like this, the funds can only be transferred with their consent.

Let's say they each deposit 10 BTC to an address that now holds 20 BTC. It would be easy for them to keep a balance sheet that starts by stating that Alice and Bob each have 10 BTC. If Alice wants to give coins to Bob, they can update it so that it reads that Alice has 9 BTC, Bob has 11 BTC. They don't need to publish it to the blockchain because the balance is constantly updated.


bagaimana cara kerja saluran pembayaran


When the time comes, let's say Alice has 5 BTC, and Bob 15 BTC. They can then create a transaction that sends this balance to an address owned by the parties, sign it, and post it.

Alice and Bob might record ten, a hundred, or a thousand transactions on their balance sheet. But as far as blockchains are concerned, they only perform two operations on-chain: one for the initial funding transaction, and one to reallocate the balance when it has been completed. Apart from these two, all other transactions are free and almost instant as they occur off-chain. There are no miner fees to pay and no block confirmations to wait for.

The example we discussed above certainly requires both parties to work together, this situation is not ideal for parties who do not know each other. However, special mechanisms can be used to punish any attempts to cheat, so that all parties can interact safely without needing to trust each other.


Payment path

It is very clear that payment channels are very beneficial for two parties that have high transaction volumes. There's even better news, the network of these channels can be refined, meaning Alice can pay parties not directly connected to her. If Bob has an open line with Carol, Alice can pay Carol provided there is enough capacity. He will move the funds to Bob's channel, Then Bob will move them to Carol's channel. If Carol is connected to another participant, for example Dani, the same thing can be done.

Networks like this develop into a distributed topology where each person is connected to many peers. There will often be multiple paths or routes to a single destination, and users will be able to choose the most effective one.


Closing

We have discussed two scalability approaches that allow transactions to be carried out without overloading the underlying blockchain. Sidechain and payment channel technologies are still relatively young, but they are increasingly in demand by users who want to avoid transaction deficiencies at the base layer.

As time goes by and more users join the network, the goal of decentralization should be achieved. This can only be done by imposing limits on blockchain growth so that new nodes can easily join. Proponents of off-chain scalability solutions believe that in time, the main chain will only be used to settle high-value transactions, or to process sidechain in/out links and open/close channels.