Contents

  • Entrance

  • Blockchain scalability problem

  • What are off-chain scaling solutions?

  • Introduction to sidechains

    • What is a side chain?

    • How does sidechain work?

    • Why are side chains used?

  • Entry to payment channels

    • What is the payment channel?

    • How do payment channels work?

    • Payment forwarding

  • latest ideas


Entrance

Scalability generally refers to a system's ability to grow to meet increasing demand. On computers, you can increase the performance of your machine by upgrading your hardware to perform certain operations faster. In blockchain scalability, we talk about increasing the capacity of the system so that it can handle more transactions.

Protocols like Bitcoin have many strengths, but scalability is not one of them. If Bitcoin ran on a centralized database, it would be quite easy for administrators to increase speed and efficiency. But Bitcoin's value proposition (e.g., censorship resistance) requires a copy of the blockchain to be synchronized by a large number of participants.


Blockchain scalability problem

Becoming a Bitcoin node is relatively cheap, and even the simplest devices can do it. However, since thousands of nodes must stay up to date with each other, there are certain limitations on node capacities. 

To prevent the database from growing excessively, an upper limit is imposed on the number of transactions that can be made on-chain. If the database grows too large too quickly, nodes will have a hard time keeping up. Moreover, if the blocks are too large, they cannot be transmitted quickly over the network.

As a result, we find ourselves in a bottleneck. A blockchain can be thought of as a train that departs at specific time intervals. Each carriage has a certain number of seats and passengers have to pay a higher price to get a ticket. If everyone tries to board the train at the same time, the price will be high. Similarly, on a network clogged with pending transactions, users who want their transactions to be included quickly must pay a higher transaction fee.

One solution might be to make the wagons larger. This means more seats, higher efficiency and cheaper ticket prices. However, there is no guarantee that the seats will not be filled immediately as before. Just like blocks or block gas limits cannot be scaled infinitely, wagons cannot be scaled infinitely either. The other solution is to make it more costly for nodes to stay on the network because nodes then need higher-priced hardware to stay in sync.

Ethereum creator Vitalik Buterin coined the concept of the Scalability Trilemma to explain the challenges facing blockchains. According to Buterin's theory, protocols need to strike a balance between scalability, security, and decentralization. These three contradict each other. For example, if there is too much focus on two of the features, the third feature will be weakened.

For this reason, many people think that security and decentralization should be maximized on the blockchain itself, while scalability can be achieved off-chain.


What are off-chain scaling solutions?

Off-chain scaling refers to approaches that allow transactions to be made without clogging the blockchain. Users can send and receive funds through protocols added to the chain, with their transactions not visible on the main chain. We will talk about the two most important advances towards this: sidechains and payment channels.


Introduction to sidechains

What is a side chain?

The sidechain is a separate blockchain. However, it is not a platform in itself as it is somehow linked to the main chain. The mainchain and sidechain are interoperable, which means assets can move freely from one chain to another.

There are several ways that funds can be transferred between chains. In some cases, assets can be separated from the main chain by being deposited into a private address. These assets are not literally sent to another chain, but are instead locked in the address and an amount equivalent to the amount of the asset is mined on the sidechain. A more direct way (also a centralized option) is to send the funds to a custodian, who then converts the deposited amount into funds on the sidechain.


How does sidechain work?

Let's say Alice has five bitcoins. He wants to convert these into five units of equivalent value on a Bitcoin sidechain (let's call these side coins). The sidechain in question uses two-way migration, meaning users can transfer their assets from the main chain to the sidechain and from the sidechain to the main chain. 

We said that the sidechain is a separate blockchain. Therefore, it has different blocks, nodes and verification mechanisms. Alice sends her five bitcoins to another address to receive her side coins. The owner of this address may be a person who will send the five coins to Alice's sidechain address after the bitcoins reach him. Or instead, the address could have a trust-minimized layout, and software could detect that a payment has been made and automatically deposit side coins.


Yan zincir ölçeklendirme


Alice has now converted her side coins but can reverse the process at any time to get her bitcoins back. Now that it has entered the sidechain, it can start transacting on this separate blockchain. It can send side coins to other people or receive side coins from these people, just like on the main chain.

For example, he might pay Bob with a side coin for a Binance hoodie. When he wants to return to Bitcoin, he sends his remaining four subsidiary coins to a special address. Once the transaction is confirmed, four bitcoins are unlocked and sent to an address on the main chain that Alice controls.


Why are side chains used?

You might be wondering what the point of all this is. Why doesn't Alice choose to use the Bitcoin blockchain?

The answer is that the sidechain can do things that Bitcoin cannot. Blockchains are carefully designed systems for exchange. Although Bitcoin is the most secure and decentralized cryptocurrency, it is not the most successful in terms of efficiency. Although Bitcoin transactions are faster than traditional methods, they are still slow compared to other blockchain systems. Blocks are mined every ten minutes and transaction fees can become quite high when the network is congested.

Frankly, such a high level of security is probably not necessary for small daily payments. If Alice is paying for a coffee, she can't wait at the register until the transaction is confirmed. He occupies the checkout line and by the time the transaction is confirmed, his coffee will already be cold.

Sidechains are not subject to the same rules. In fact, they don't even need Proof of Work to work. You can use any consensus mechanism, trust a single validator, or change as many parameters as you want. You can add upgrades that are not included in the main chain, produce larger blocks, and make payments faster.

Interestingly, sidechains can have significant software vulnerabilities without affecting the main chain. This makes sidechains platforms that can be used for experimental work and makes it possible to add features to these chains that would normally require the consensus of the majority of the network.

Given that users are satisfied with their transactions, sidechains can be an important step towards scaling effectively. There is no requirement for main chain nodes to store all transactions on the side chain. Alice can enter the sidechain with a single Bitcoin transaction, make hundreds of sidechain transactions, and then exit the sidechain. In terms of the Bitcoin blockchain, Alice only makes two transactions, one input and one output.

Ethereum's Plasma is similar but has some important differences. Learn more What is Ethereum Plasma? You can find it in our article.


Entry to payment channels

What is the payment channel?

Payment channels serve the same purpose as sidechains in terms of scalability, but they are fundamentally very different mechanisms. Payment channels move transactions off the main chain to avoid clogging the blockchain, similar to what sidechains do. However, unlike sidechains, these channels do not require a separate blockchain to operate.

Payment channels use a smart contract so users can make transactions without broadcasting them to the blockchain. It does this by using a software-supported contract between two participants.


How do payment channels work?

In popular models such as the Lightning Network, coins are first deposited to an address jointly owned by two parties. This is a multi-signature address and requires two signatures before funds can be spent. So if Alice and Bob create such an address, funds cannot be moved without confirmation by both.

Let's say they both deposited 10 BTC into an account and the account currently has 20 BTC. It would be easy for both Alice and Bob to hold a spreadsheet that starts by stating that they have 10 BTC. If Alice wants to give Bob a coin, they can update the spreadsheet to say Alice has 9 BTC and Bob has 11 BTC. They don't need to publish transactions to the blockchain while still updating balances this way.


ödeme kanalları nasıl çalışır


After some time, let's say Alice has 5 BTC and Bob has 15 BTC. In this case, they can create, sign, and publish a transaction that sends the balances to the parties' addresses.

Alice and Bob may keep tens, hundreds, or thousands of transactions in their spreadsheets. But in the case of blockchain, they only perform two on-chain transactions: the initial funding transaction and the final movement of balances when they are done. Apart from these two, all other transactions are inexpensive and almost instantaneous because they occur off-chain. There are no miner fees to pay or block confirmation to wait for.

Of course, the example mentioned above requires cooperation between two parties, which is not ideal for people who do not know each other. However, special mechanisms can be used to punish parties that attempt to cheat so that parties can safely interact with each other without the need for trust. 


Payment forwarding

Undoubtedly, payment channels are useful for two parties that will make high volume transactions. But payment routing takes it one step further. A network of payment channels could be created, meaning Alice could pay a party to which she is not directly connected. If Bob has an open channel with Carol, Alice can pay Carol if there is sufficient capacity. He directs his funds to Bob's side of the channel, and Bob transfers those funds to Carol. The same thing can happen again if Carol is in contact with another participant, Dan. 

Such a network can become a distributed structure where everyone is connected to multiple peers. In this type of structure, there are usually multiple paths to reach the destination, and users can choose the most efficient one among them. 


Latest Ideas

We talked about two scaling approaches that allow transactions to be made without creating a load on the base blockchain. Both sidechains and payment channel technology are not yet mature, but users who want to overcome the problems seen in base layer transactions are increasingly taking advantage of both solutions.

As time progresses and more participants are added to the network, it is important that decentralization continues to be maintained. This can only be done by setting limits on the growth of the blockchain and thus ensuring that new nodes can easily join. Proponents of an off-chain scaling solution believe that over time, the main chain will be used only for high-value transactions or for entering/exiting and opening/closing channels onto sidechains.