What is the scalability problem of Bitcoin and how can it be solved?
In the last two months of 2017, delerium hit the crypto market. The price of bitcoin broke record after record and reached a temporary high that was around the twenty thousand dollar mark. The popularity brought the Bitcoin scalability problem to light.
The explosion of media attention led to millions of new users and millions of extra transactions along with them. Then something that had been foreseen by connoisseurs for some time: the Bitcoin network ran against the limits of its capacity. With a maximum capacity of roughly seven transactions per second, the network became overloaded.
How does that work exactly? Bitcoin transactions are spread over the network and collected in a so-called local transaction pool, also known as a memory pool (mempool). Subsequently, transactions in bundles of up to 1 MB are processed in a block and added to the blockchain. The blockchain is therefore simply a chronological chain of blocks with transaction data.
One such block has a maximum size of 1 MB and the average bitcoin transaction is roughly 250 bytes. In addition, the network processes an average of 1 block per 10 minutes. This translates back to the aforementioned seven transactions per second. But what if dozens or hundreds of transactions are made per second?
The Bitcoin network uses a sort of auction system. Users can bid against each other to have their transaction processed faster. The miners ultimately decide which transactions they include in a block and then add them to the blockchain. From the point of view of the miner, it is logical that he picks the transaction that the highest fee pays. This fee goes directly to the miner and besides the blockreward the only reason why there are miners.
You’re not necessarily obliged to pay a high fee. However, if you refused to send a competitive fee with your transaction during the heavily congested period of late 2017, it’s possible that you had to wait days, or sometimes weeks, before a miner processed your transaction in a block and became 'final'. If you bought bitcoins from one of the Dutch cryptocurrency brokers and had the coins sent to your wallet as a long-term investment, there were no hindrances. The problem was that many users did in fact purchase bitcoin to trade on exchange sites. Third parties always wait until your transaction has a number of confirmations on the blockchain, they can then only say with certainty that the transaction is irreversible. For many new users, this was their first experience with bitcoin and other cryptocurrencies.
So it could happen that you had to pay a fee of twenty dollars or more for a quick confirmation of your transaction at the end of December. This is still acceptable for transactions with a value of tens of thousands of euros, but for small transactions, completely inadmissible.
This 'network congestion' caused some frustration for a number of users and Bitcoin's opponents used the option to write off the digital currency as a serious alternative to the banking system. If the Bitcoin network already had problems with these relatively low numbers of transactions, how could it ever scale up to the capacity needed for a global payment network, they reasoned.
It’s pretty reasonable to believe that these people will end up eating their words in the not too distant future. Behind the scenes, out of sight of the spotlights and the rise in the price that everyone was working on, the software was (and is) updated every day to come up with solutions. This work is carried out by an ever-growing group of software developers who are not led by the issues of the day and often without having to pay for improving the Bitcoin software.
With on-chain scaling, ways are looked for to be able to handle more transactions in the blockchain. This can be done in a creative and elegant way by processing more transactions in a block of 1MB, Segwit is an example of that. Or in a less elegant way simply by raising the blocksize, as Bitcoin Cash did.
SegWit is an abbreviation for Segregated Witness. This refers to the signature that is sent with each transaction in a block. That signature is part of the block and in that sense also includes bytes.
It goes like so: one block on the blockchain is 1MB. A part of this is reserved for so-called overhead, the signature falls into that overhead. The rest of that 1 MB consists of information about the transaction itself.
What SegWit does is remove that overhead from the block. For example, there is extra space for more data about the transactions themselves; or so that more transactions can fit into one block.
That overhead is placed as an extended block at the end of the regular block. This ensures that the block + extended block together are larger than 1MB.
Since August 2017 all bitcoin miners support SegWit and are allowed to refuse transactions without SegWit.
Not everyone within the bitcoin community agrees with SegWit. Many people saw salvation in increasing the block size. The idea is: 'The larger the block, the more transactions that can be processed at the same time.' This caused controversy and a split in the bitcoin community.
To cope with this difference in insight, on 1 August 2017 a hard fork on the blockchain of bitcoin occured. This actually means that a chain splits off and continues as its own blockchain and own currency. Bitcoin Cash (BCH) was born. The biggest difference with Bitcoin is the size of the block.
The blocks of Bitcoin remained 1MB while the blocks of BCH were initially 8MB. However, a BCH block is currently at 32MB. This means that there can be more transactions in one block, but also that the blockchain can be many times larger.
In the long run it will no longer be possible to download the complete BCH blockchain on a regular computer, limiting those without a lot of computing power. This again has consequences for the decentralised nature of the currency.
In off-chain scaling we look at ways to build extra layers on top of the blockchain and to do all kinds of transactions with each other. These transactions could then be bundled and sent as one transaction on the blockchain.
In 2015, a white paper was submitted by Thaddeus Dryja and Joseph Poon. Here the contours of the Lightning Network were described.
With the Lightning Network, transactions no longer take place on the blockchain itself, but in an extra layer over the blockchain. These layers are called channels. The Lightning Network keeps track of which transactions take place within these channels and sends the final balance to the blockchain when a channel is closed.
Instead of sending each transaction separately, a block with multiple transactions can now be added to the blockchain at the same time.
Two parties can open a channel between each other. They give them a value, for example two bitcoins. This means that they can send a maximum of two bitcoins to each other per transaction. These two parties are not the only ones with a channel however. A third person can also have a channel with one of these parties and in turn a channel with another party. They can all use each other's channels. In this example, transactions are carried out without the miners being exhausted of their resources. It is only when a channel is closed that the final position disappears as a transaction in a memorandum. A miner can then process this transaction in a block and immortalise it on the blockchain.
The Lightning Network was implemented this year and is already being experimented with. The network exists by the grace of the number of active nodes and that number is growing steadily.
Is this enough?
Should the situation as it occurred at the end of 2017 be repeated then bitcoin seems to be more mature and better able to deal with a high number of transactions in a short time. In addition, SegWit and the Lightning Network are not the only solutions that are being looked at. That is also the beauty of bitcoin as a protocol; it is programmable and therefore adaptive. The bitcoin community is active and constantly looking for more efficiency.