Content
Introduction
The blockchain scalability problem
What are off-chain scalability solutions?
An introduction to sidechains
What is a sidechain?
How does a sidechain work?
Why are sidechains used?
An introduction to payment channels
What is a payment channel?
How does a payment channel work?
Payment route
Final considerations
Introduction
Scalability generally refers to the ability of a system to grow to accommodate increasing demand. In computing, you can increase your machine's performance by improving its hardware, so that certain tasks can be performed faster. When we talk about scalability in blockchains, we refer to increasing their capacity to 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 relatively easy for an administrator to increase the speed and throughput. But Bitcoin's proposition (like censorship resistance) requires many network participants to synchronize a copy of the blockchain.
The blockchain scalability problem
Running a Bitcoin node is relatively cheap and even simple devices can do it. But because thousands of us need to stay up to date with each other, there are certain limitations on its ability.
Limits are set on the number of transactions that can be processed on-chain, to prevent the database from reaching very large proportions. If it becomes too large quickly, the nodes will not be able to keep up with this expansion. Furthermore, if the blocks are too large, they cannot be quickly relayed across the network.
Thus, we find ourselves in the middle of a bottleneck. A blockchain can be seen as a train transportation service, which departs at defined intervals. There are a limited number of seats in each carriage and to obtain a ticket, travelers must bid to secure a seat. If everyone is trying to catch the train at the same time, the price will be higher. Likewise, a network clogged with pending transactions will require users to pay higher fees to get their transactions included in a timely manner.
A possible solution would be to increase the size of the wagons. This would result in more seats, greater transfer capacity and lower ticket prices. But there is no guarantee that the seats will not all be filled as before. The capacity of cars cannot be scaled infinitely, just as blocks and the gas limit of blocks cannot be scaled infinitely. The latter makes remaining nodes on the network a more expensive process, as they will need more expensive hardware to stay synchronized.
Ethereum creator Vitalik Buterin created the Scalability Trilemma to describe the challenge facing blockchains. He states in his theory that protocols must achieve a balance between scalability, security and decentralization. These properties are somewhat out of balance – by focusing too much on two of them, the third will perform poorly.
For this reason, many view scalability as something to be achieved off-chain, while security and decentralization must be maximized on the blockchain itself.
What are off-chain scalability solutions?
Off-chain scalability refers to approaches that allow transactions to be executed without overloading the blockchain. Protocols connect to the chain and allow users to send and receive funds without transactions appearing on the main chain. Let's delve deeper into two of the most important advances: sidechains and payment channels.
An introduction to sidechains
What is a sidechain?
A sidechain is a separate blockchain. However, it is not an independent platform as it is linked in some way to the main chain. The main chain and sidechain are interoperable, meaning assets can flow freely from one to the other.
There are several ways to ensure that funds can be transferred. In some cases, assets are moved from the main chain and deposited at a special address. They are not actually sent – they are locked at the address and a corresponding value is issued on the sidechain. A more direct (although centralized) option is to send funds to a custodian, who exchanges the deposit for funds on the sidechain.
How does a sidechain work?
Suppose our friend Alice has five Bitcoins. She wants to exchange them for five equivalent units on a Bitcoin sidechain – let's call them sidecoins. The sidechain in question uses a two-way peg, meaning users can transfer their assets from the main chain to the sidechain and vice versa.
Remember that the sidechain is a separate blockchain. So, it will have different blocks, nodes and validation mechanisms. To obtain her sidecoins, Alice sends five Bitcoins to another address. This address could be someone who will send 5 sidecoins to Alice's sidechain address, after receiving the Bitcoins. Alternatively, there may be some type of configuration that lessens the need for trust, in which sidecoins are automatically credited upon payment detection by the software.

Alice has now converted her coins to sidecoins, but she can always reverse the process to get her Bitcoins back. Now that it has entered the sidechain, it is free to transact on this separate blockchain. It can send sidecoins or receive them from others, in the same way as on the main chain.
She could, for example, pay Bob a sidecoin for a Binance hoodie. When she wants to return to Bitcoin, she can send the remaining four sidecoins to a special address. After the transaction is confirmed, four bitcoins would be unlocked and delivered to an Alice address on the main chain.
Why are sidechains used?
You might be wondering what the reason for this is. Why doesn't Alice just use the Bitcoin blockchain?
The answer is that the sidechain can be capable of things that Bitcoin cannot do. Blockchains are carefully designed systems of trade-offs. Although Bitcoin is the most secure and decentralized cryptocurrency, it is not the best in terms of transfer fees. 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 rates can increase significantly when the network is congested.
There is probably no need for this level of security for small, everyday payments. If Alice is paying for a coffee, she will not wait for the transaction to be confirmed. She would line up and her coffee would be cold when it was delivered.
Sidechains don't follow the same rules. In fact, they don't even need to use Proof of Work to work. You could use any consensus mechanism, trust a single validator, or tweak any parameters. You could add upgrades that don't exist on the main chain, produce larger blocks, and speed up the process.
Interestingly, sidechains can even introduce critical errors without affecting the underlying chain. This allows them to be used as platforms for experimentation and deployment of features that would otherwise require consensus from the majority of the network.
As long as users are satisfied with the trade-offs, sidechains can represent an important step towards more effective scaling. There are no requirements for mainchain nodes to store all transactions from the sidechain. Alice could enter the sidechain with a single Bitcoin transaction, perform hundreds of sidecoin transactions, and then exit the sidechain. From the perspective of the Bitcoin blockchain, it would have carried out only two transactions – one to enter and one to exit.
Ethereum's Plasma protocol is similar, but has some important differences. Read more on the subject: What is Ethereum Plasma?
An introduction to payment channels
What is a payment channel?
Payment channels have the same goal as sidechains in terms of scalability, but they are fundamentally very different. Like sidechains, they move transactions off the main chain to prevent the blockchain from becoming congested. Unlike sidechains, however, they do not need a separate blockchain to function.
A payment channel uses a smart contract to allow users to transact without publishing their transactions to the blockchain. This is done using a software-enforced contract between two participants.
How does a payment channel work?
In models like the popular Lightning Network, two parties deposited coins at an address they jointly owned. This type of multisignature address requires two signatures for funds to be spent. So if Alice and Bob created this address, the funds could only be moved with their consent.
Let's say they each deposited 10 BTC into an address that now holds 20 BTC. It would be easy to keep a spreadsheet tracking the balance, showing that Alice and Bob have 10 BTC each. If Alice wanted to give Bob a coin, they could update the spreadsheet so that it shows that Alice has 9 BTC and Bob has 11 BTC. They would not need to publish to the blockchain as they keep track of the balances.

At any given time, let's say Alice has 5 BTC and Bob has 15 BTC. They could create a transaction that sends these balances to each party's corresponding addresses, sign it, and transmit it.
Alice and Bob could have recorded ten, a hundred, or even a thousand transactions on the balance sheet. But as far as blockchain is concerned, they only performed two on-chain operations: one for the initial transaction and one to consolidate the updated balances. Apart from these two, all other transactions are free and almost instantaneous because they occur off-chain. There is no mining fee to pay and there is no need to wait for block confirmations.
Obviously, the example discussed above requires both parties to cooperate, which is not an ideal situation for users who don't know each other. However, special mechanisms can be used to punish any attempted cheating, so that parties can safely interact with each other without the need for trust.
Payment route
Evidently, payment channels are convenient for two parties who anticipate a high volume of transactions. But not only that. A network of these channels can be developed, meaning Alice can pay a party that is not directly connected to her. If Bob has an open channel with Carol, Alice can pay her as long as there is enough capacity. She will transfer funds to Bob's channel, who will in turn send them to Carol's channel. If Carol is connected to another participant, the same process can be done.
This network evolves into a distributed topology in which everyone connects to multiple peers. Often, there will be several routes to the same destination and users will be able to choose the most efficient route.
Final considerations
We discuss two scalability approaches that allow transactions to be made without overloading the corresponding blockchain. Sidechains and payment channel technology have not yet matured, but they are increasingly being used by users who want to bypass the hassles of base layer transactions.
As time passes and more users become part of the network, it is important that decentralization is maintained. This is only possible by applying limits to the growth of the blockchain so that new nodes can easily join. Proponents of off-chain solutions to scalability problems believe that over time, the main chain will only be used to settle high-value transactions or to couple/decouple sidechains and open/close channels.
