Thoughts, stories and ideas.

A primer on blockchain scalability

A primer on blockchain scalability

While most bystanders think CO2 emissions, criminal use, high volatility, or Elon’s opinion are some of the fundamental flaws in crypto, the truth is that for insiders, these are either water under the bridge or problems with a solution underway. For them, there are more pressing concerns. Ones that can really jeopardize the future of the ecosystem. Scalability is one of them.

Every blockchain has a limited ability to process transactions. Bitcoin’s blockchain, for example, writes a new block every ten minutes containing ~1MB of information with the details of the transactions. As bitcoin has grown in popularity, this capacity has been proven insufficient.

If the blockchain’s capacity does not grow proportionately to demand, the frictions of use become too big. You have to wait too much for your transactions to be approved, usage fees skyrocket, and all of this lifts a barrier to access the advantages of cryptocurrencies and blockchain-based applications. Crypto would never make it into a worldwide financial solution, and it could be bound to die of success, should this problem not be solved.

For newcomers to crypto, let us take a little break to share an explanation about how blockchains work and why this is important. There’s one metaphor that comes in handy. It takes place on a nice sunny tropical island, and it helps explain the technology, at least from this particular angle.

So we’re on that remote tropical island, hundreds of years ago. An island a few families scattered across a few villages within the island, peacefully coexisting. They usually trade goods between them, but as families get bigger and more families and villages appear, trade becomes more and more complex. To save time transporting goods from one point of the island to another, they build an immense hut in the middle of the island. They will take all the goods there, and instead of handing every item to each other, they will track who owns what through a ledger. The ledger says, for example, that family A has purchased 40 coconuts from family B in exchange for 10 pounds of fish, and family C has purchased a boat from family Din exchange for 400 coconuts (it’s not a very nice boat, tbh). By the end of the day, everyone will check the books, take home what the ledger says they bought, and let go of what the books say they sold.

Initially, that ledger is managed by a single person—a man who tracks transactions and writes them down in order. But over time, this man becomes corrupt. He starts messing with prices, accepting bribes, taking unfair commissions…

The islanders decide to act. There will be no central ledger anymore. Every family will have their own transaction book, handled by a ledger keeper from each who will act as a scribe. A stage is built in the middle of the hut, and every transaction is proclaimed out loud for all the scribes to write down. There’s not one single copy of the ledger, but as many as there are families, which makes bribing or tampering with records so costly it becomes virtually impossible to manipulate the market. By the end of the day, the villagers will compare all notes, and the information contained in the majority of them will be written down in one final book, which will determine who takes what home.

This solution decentralizes supervision, and therefore provides more security to the whole system, but it also makes it slower and less scalable. The more families involved in the process, the more scribes taking notes in their notebooks. More time writing down every transaction and more time, in the end, comparing the final notes.

Back in the real world, in current times, Vitalik Buterin coined the term “the blockchain trilemma” when describing the problem with scalability. It basically says the current state of affairs in crypto can only give you two of these three items: decentralization, security, and capacity. You want as many nodes (=ledger keepers in our island) as possible to guarantee the lack of a centralized, corruptible authority. Plus, an abundance of nodes makes messing with the system increasingly difficult. But also slower. Any tradeoff that makes things faster would require some concessions in terms of the degree of centralization or risk to security.

Many have warned of a Malthusian catastrophe impending over crypto: you can only grow to a certain extent before the whole system collapses. But technology always has some answers, and one of them, or more probably a combination of several, will probably help kick the problem away. Let’s take a quick tour through some possible solutions.

  • Increasing block capacity. It’s the easiest solution: it immediately creates more space, but what will happen when the current block size becomes too small again? Besides, bigger blocks require better hardware to run a node, hurting decentralization. It is a short-sighted solution that can’t be repeated many times because it would bring back the problem.
  • Optimizing the blockchain. Bitcoin was already able to trim down the information that entered every block, moving some non-necessary info outside blocks (SegWit, Segregated Witness). Something like allowing ledger keepers in our island to write down only the initials of the names instead of the full names of people involved in transactions. Nevertheless, this looks more like basic maintenance and good table manners. Scalability needs more of a shove.
  • L2, or second-level solutions. Every Bitcoin or Ethereum transaction pays the same fees, regardless of whether it is a $5 coffee in BTC or a $100 million transaction between wallets on Ethereum. One possible improvement could involve layering blockchains: a slightly less decentralized blockchain that sacrifices a bit of decentralization for very cheap transactions, and the main blockchain would only be used, for example, for daily summaries, limiting the number of operations. This is the approach chosen by Bitcoin’s Lightning Network or Ethereum’s rollups.

If there's a Layer 2, what's Layer 1? Layer 1 solutions are blockchains in and of themselves. While Layer 2 projects are scalability solutions designed to improve the performance of a current blockchain, Layer 1 are blockchains built from scratch. Many of them have been designed with scalability as one of the top priorities.  Check out Solana, Terra or Avalanche, as examples.
More, here
  • A blockchain of blockchains. Instead of having the main blockchain and several sidechains, we can have a mesh of different blockchains with a protocol that connects them to send messages and transactions. It’s a technologically challenging solution, really difficult to implement, but it improves capacity by several magnitude orders. This is the approach followed by Ethereum 2.0 and shards, Polkadot and parachains, and Cosmos and zones.

The implications of scalability are huge, and they can prevent crypto from becoming a global solution. But Malthus was wrong about humans, so maybe there’s hope for crypto.

Can we go back to the island?