Watch Now


How to scale a blockchain

 Twitch, one of the CryptoKitties mascots. ( Image: CryptoKitties )
Twitch, one of the CryptoKitties mascots. ( Image: CryptoKitties )

In the media coverage, think pieces, and white papers about the challenges of implementing blockchain technology, something that almost always comes up is scalability. In this week’s Techpertise, we break down exactly what the issue is, and outline a few solutions that have already been proposed by blockchain developers working on various projects.

Bitcoin was the first cryptocurrency and the first large implementation of blockchain, proposed in a now-famous 2009 white paper authored by the pseudonymous Satoshi Nakamoto. Nakamoto invented blockchain and bitcoin simultaneously to solve the double-spend problem, a potential flaw in digital cash systems whereby someone can spoof transactions, or spend the same currency twice. Bitcoin’s distributed, immutable ledger allowed the network to verify transactions by comparing cryptographically secured timestamps and overruling minority attempts to impose alternate versions of history. Bitcoin is fairly limited, though: all it’s really good for is keeping track of a single kind of digital asset—amounts of bitcoin, and who sent them to whom.

About four years after the invention of bitcoin, a young Russian-Canadian programmer named Vitalik Buterin realized that blockchain technology could be taken much further. Buterin made the conceptual leap from decentralized nodes executing basic transactions—John sends .5 BTC to Jane—to a network that could actually perform complex computations and run software. Ethereum nodes work on a Turing-complete language, meaning that in theory, its smart contracts can be programmed to do anything that a computer can do. Indeed, the slogan on ethereum.org invites developers to ‘build unstoppable applications’. Just like bitcoin transactions are censorship-proof, meaning there’s no third party like a bank, government, or credit card company that has the power to halt or reverse a transaction, there’s no central authority in the Ethereum network that can stop its applications from running.

These decentralized applications (‘DApps’) include everything from collaborative working platforms like Graphite, which is essentially a distributed form of Google Docs and Sheets that isn’t owned by, say, Google, to whimsical games like CryptoKitties, where players collect, breed, and trade digital cats. Oddly enough, it’s actually CryptoKitties that helped expose one of the great weaknesses of the Ethereum platform: scalability. A mania—a craze—developed suddenly last December for the cute blockchain kitties, and prices and transaction volume exploded. After the game’s release, Ethereum experienced a sixfold increase in pending transactions, processed 1M transactions in a day for the first time, and slowed down significantly as the game sucked up a huge proportion of the network’s available computational power.

Ethereum’s superpower became its Achilles heel: sure, you could run truly decentralized software and retain ownership of your own data, but whereas bitcoin nodes only had to independently validate simple peer-to-peer transactions, Ethereum nodes had to validate every computation made by a DApp. Thousands and thousands of networked computers were essentially performing the same tasks over and over again, and while that made the network incredibly secure and attack-resistant, it was redundant and could be extremely slow. The problem was that adding a new node—a new server—to the Ethereum network enhanced security and decentralization without actually adding computing resources. The Ethereum network wasn’t a globally distributed supercomputer—it was just a globally distributed regular computer.

The dilemma became very clear: how could blockchain developers build a truly powerful distributed computer that minimized redundant computations, but still maintain the immutable, attack-resistant qualities of blockchain that made trustless transactions possible in the first place?

Software developers always have to deal with tradeoffs, with making decisions about how their code will use available hardware given their priorities, and blockchain is no different. One of the exciting things about the cryptocurrency space, even if you maintain a healthy skepticism of ICOs and the purported use cases of the tokens, is that there are now thousands of projects exploring all options and building blockchains with different combinations of the technology’s essential qualities (distributed, immutable, transparent). 

Buterin described the set of tradeoffs as a trilemma that claims that a blockchain system can have at most two of the following three properties: decentralization (defined as the system being able to run in a scenario where each participant only has access to relatively small resources, i.e. a regular laptop); scalability (defined as being able to process a number of transactions exceeding the resources of an individual participant); and security (defined as being secure against attackers with resources up to the equivalent of the network). 

As Georgios Konstantopoulos writes, “Α blockchain that claims to have solved the trilemma has either bent the laws of physics (highly unlikely), or it has discovered a breakthrough method that solves the major blockchain scalability problems that have stumped top mathematicians and computer scientists for the past decade. While this is not impossible, a more likely explanation is that the blockchain has sacrificed either decentralization, security, or both.”

Ripple (XRP) is a cryptocurrency that prides itself on being the fastest, most scalable cryptocurrency, with a network that consistently handles 1,500 transactions per second and should be able to scale to Visa’s traffic level. But Ripple has sacrificed decentralization—the Ripple network is only 674 nodes, as opposed to Ethereum’s 17,668 nodes (as of January 2018). Far fewer people control Ripple’s network, and thus the supply of the currency itself, and this has implications for the censorship-proof aspect of cryptocurrency transactions important to many users—the network actually does give itself the ability to freeze its users’ funds at any given time. Monero, on the other hand, trades transparency for extreme privacy and untraceability. Tradeoffs are unavoidable.

 A map of the Ethereum network on June 14. ( Image: Ethernodes.org )
A map of the Ethereum network on June 14. ( Image: Ethernodes.org )

There are a couple of emerging techniques that can help speed network transactions while maintaining an adequate level of security and decentralization, but they all involve compromises. Cardano is a third-generation cryptocurrency created by an international team of academics that attempts some scalability improvements on Ethereum’s model—Cardano does this by separating out ‘settlements’, i.e., the movement of digital assets like Cardano tokens themselves, and ‘computation’, the calculation of the various smart contract rules that determine how, why, and when value is transferred. By separating out the settlement layer from the computation layer, complex software can be run by the interested parties, and only will be vetted by the whole network on an as-needed basis. The ledger itself, the settlement layer that records ownership and transactions, is still vetted by every node on the network, but the computational resources required for managing the ledger are much smaller.

Another technique that Ethereum itself is trying to implement is called ‘sharding’. Blockgeeks explained it this way: “Suppose there are three nodes A, B and C and they have to verify data T. Instead of A, B and C verifying the entire data T individually, the data will be broken into 3 shards: T1, T2 and T3. After that A, B and C will verify one shard each side-by-side. As you can see the amount of time you are saving is exponential.”

“Imagine that Ethereum has been split into thousands of islands,” said Vitalik Buterin, the inventor of Ethereum. “Each island can do its own thing. Each of the island has its own unique features and everyone belonging on that island i.e. the accounts, can interact with each other AND they can freely indulge in all its features. If they want to contact with other islands, they will have to use some sort of protocol.”

The website CryptoRecorder claims that there are currently 250,000 developers working on the Ethereum platform: they’re all aware of the scalability issues and experimenting with new strategies to address it. 90 of the top 100 cryptocurrencies by market cap are based on Ethereum, so there’s a strong incentive to find a solution that is customized to a particular use case and can be massively scaled. From our perspective, it’s just a matter of time.