Blockchain Explained

Blockchain explained

What is a Blockchain?

Jonathan Zimmermann, Consultant at McKinsey, Msc Business Analytics responds to this question on Quora:

Blockchain Explained

“A Blockchain, or distributed ledger, is mostly known for the first technology it enabled, the Bitcoin, which Satoshi Nakamoto first described in a paper in 2008.

I will try to provide a general overview of the technology and its potential, from both practical and technical perspectives, which you should be able to understand without any previous knowledge on the blockchain.

Today, cryptocurrencies in circulation alone have a market capitalisation of well over ten billion dollars and new start-ups relying on the blockchain are funded every day, fulfilling the thirst of venture capitalists for the technology.

What blockchain promises to solve is a long-standing computer science issue discussed since the early 1970’s and generalised in 1982 as the Byzantine Generals’ Problem which essentially asks how multiple cooperating parties can reach common knowledge about a factual element when there exists some malicious actors actively trying to spread incorrect information and who have a certain likelihood of intercepting and altering every direct communication between individuals.

Until now, this problem would usually be addressed by relying on a trusted central authority, but for the first time, blockchain allows any such consensus to be reached without having to place trust in any single entity.

Much has been written on the societal changes blockchain will bring, the challenges governments will need to address or even how a new body of law, Lex Cryptographia, will be needed to adjust to this new paradigm.

Technical Overview

Blockchain’s solution to the Byzantine Generals’ Problem is to impose to every actor who wants to share some information to also solve a very complex mathematical puzzle (called block) that proves a large amount of work has been invested. Thanks to complex mathematical properties, it is possible to design problems that are hard to compute, but easy to verify; this is actually the reverse of the popular concept of asymmetric keys encryption in the field of cryptography, which powers most modern secured communication protocols and in which we want to generate puzzles that are easy to compute (creating the key) but hard to verify (cracking the key). Each block contains a hash (a string of characters), that has to refer cryptographically to the hash of the previous block (to guarantee the chronological order). Together, this serie of blocks, up to the genesis block (the only block hardcoded into the blockchain’s core script), form the blockchain. The computational difficulty of generating a valid block mostly stems from the randomness of the process of finding a new hash that will correctly connect to the hash of the previous block.

A copy of the blockchain database (of about 80 gigabytes today for the Bitcoin blockchain, but continuously growing as more blocks are appended) as well as the core script that contains the rules of what should be considered a valid blockchain are stored on every computer (called full node) that is willing to be part of the network. In addition to the hash, each block stores a large amount of information (called transactions). Anyone who wants to get information stored in the database can do so by querying from any node of the network; if some nodes disagree on what should be the correct state of the blockchain, one will always trust the longest valid blockchain (i.e. the full node that can prove his version of the blockchain required more computational effort than all the other existing versions), which honest nodes will actively be searching for to replace their own version of the chain. It is also possible that multiple blockchain temporarily have the same length, in which case one has to wait until further blocks are added to be able to distinguish which version of the blockchain one should trust. As a general rule, the older a block is in the chain, the more trustworthy it is, because an attacker would have to start and re-create a much larger fraction of the blockchain to replace it.

Most individuals who want to add some transactions into the blockchain do not have the computing power or the time necessary to find a valid block. In that case, they will add their transaction into a pool of unconfirmed transactions that are waiting for a professional block generator (called a miner) to find a block for them. When a miner finds a valid block, which is a really rare event, he will include in it as many transactions as the block allows for (currently one megabyte for the bitcoin blockchain) and broadcast it to all the full nodes of the blockchain, that will append the block to the chain after having checked its validity. In most blockchains, when a miner successfully adds a block to the chain, he receives a reward from the system as well a fee perceived from the individuals whose transaction has been included (optional, normally only included when there is a congestion of unconfirmed transactions, to help miners prioritise which transaction to include first).

The underlying assumption of the process is that the total effort invested by honest miners is greater than the total effort invested by those with malicious intents. By effort, one should understand money, since computational difficulty directly relates to electricity and hardware costs. Each individual involved in the process owns a public and a private key. Your public key identifies you and can be used by anyone to see what contributions you have made to the blockchain (e.g. how much money you possess in the case of a cryptocurrency blockchain). Using your private key, you can generate transactions that are cryptographically guaranteed to originate from you. By this process, even if a malicious actor were to control a majority of the blockchain’s computing power, its power, through what is called a 51% attack, would be limited to cancelling recent transactions and blocking new transactions from occurring; stealing money from other accounts is impossible without knowing the private key of the targeted individuals. That way, by limiting the incentives for malicious actors to harm the system and creating strong rewards for people to reinforce the system, we make the blockchain an extremely reliable decentralised ledger. So far, no such attack has ever been successful.

Modern uses & potential

The blockchain can be used in a large variety of applications. As of today however, the most widespread use of blockchains remains limited to cryptocurrencies, or more famously the bitcoin. It is only recently, with the introduction of the Ethereum network in July 2015, two years after being described in a white paper by Vitalik Buterin in 2013, that serious alternatives were made possible. The main innovation of the Ethereum was to introduce a Turing-complete programming language that supports all basic operations necessary to implement any algorithm, allowing to manipulate the Ethereum blockchain easily. These new kind of applications, powered by the Ethereum or similar blockchains, are what I will call the modern uses of the blockchain, as opposed to the traditional usage generally limited to digital currencies. In general, most of the value of the blockchain can be summarised in getting rid of the intermediaries, whether they are banks, lawyers or any entity, thus dramatically reducing agency and coordination costs.

Digital currencies and payment systems

While traditionally done through the Bitcoin network, payment systems will probably remain the main use of the blockchain for a few more years. With the introduction of better blockchains such as the Ethereum (which also supports payment systems), distributed digital payments are increasingly made easier, faster and cheaper. Through the blockchain, businesses could get rid of transaction fees, which often consume a large fraction of the margins in the retail industry, and automate payments without depending on banks. Such payment systems would be especially valuable in developing markets or countries with unstable currencies.

Online Privacy

Today, a factor that slows down technology adoption for many individuals, corporations or governments is privacy concerns and the fear of handing out too much control to other entities. But the blockchain would allow everybody to take advantage of new technologies, such as cloud storage of personal biometric information, while maintaining complete control over their data, even from governments, due to cryptographic encryption.

This would be of great value for example for corporations who focus on selling hardware or services, such as Walmart or even Apple, but of lesser value to corporations whose value creation reside in owning data, such as Google and Facebook.

Smart contracts

They can be considered as the building block of modern blockchain applications. Smart contracts are self-executing agreements written in code instead of words and enforced by the blockchain instead of courts. Blockchains that support external scripting, such as Ethereum, generally make the implementation of such contracts very easy with only a few lines of code.

Most traditional contracts could potentially be partially or fully implemented in a smart contract. The more objective the evaluation of the outcome is, the easier it is to draft such a contract. A classic example would be an online advertising agency selling search engine optimisation services, with the promise that the client’s website will appear on the first page of a specified search engine for a given keyword within 30 days. Such services generally appear very suspicious because they are often provided on the web by unknown companies based in a foreign country, but an example implementation of such a contract only requires a few rules:

– Start contract when both parties have sent agreed bitcoin amount to account managed by the smart contract (stored in the blockchain). If no amount is received within 7 days, cancel contract and send back all money received.

– After 30 days, check the search engine’s URL that corresponds to the selected keyword. If given website is in the URL’s source code, send all the money of the contract’s account to the agency; otherwise, send it all back to the customer (including the penalty for failed execution).

More advanced and larger scale contracts can easily take place, especially in the financial sector where trust plays a central role and allows intermediaries to justify hefty commissions in all trades. A multisignature escrow account, futures contract, any financial derivative or commodity trading with completely eliminated counterparty risk can be implemented just as easily using a similar stratagem; here the trust would be reduced to one agent only: the stock exchange that publicly displays the stock prices on its website, used as the source of truth when the contract triggers the settlement.

Smart contracts not only eliminate enforcement costs, they also get rid of ambiguity and make all business dealings instantaneous: if a specified condition is met, the blockchain immediately releases the fund and all other digital assets as specified by the contract.

Smart property

Also known as colored coins. Pushing the limits even further, the blockchain allows for cryptographically activated assets. Those could be either physical or digital and would take the form of a token; whoever possesses the token, which can be easily exchanged and transferred like any other digital currency, owns the asset. Those assets could be real estate (e.g. a house whose door only opens to people in possession of the token), objects (e.g. diamonds whose transactions are only recognized by governments if sold with a valid token, reducing trafficking and making it easier to verify their authenticity) or intellectual property (e.g. patent ownership that can be traced back to the entity owning the patent’s token, or music royalties that are sent automatically to the owner of the token associated with the rights to the songs).

Some of these systems would require full support from the government as it currently manages most of the existing ledgers, e.g. land registries that often require a lengthy and costly administrative procedure to access or to change, often necessitating the services of a notary in case of a sale. But the private sector will play a key role in defining how those evolutions take place and, potentially, whether it can take over some of these functions that used to require the government—a trusted central authority—but can now be handed over to the blockchain.

Decentralized name registration

A natural extension to smart property is decentralized name registration: the first individual to add a certain name to the blockchain, if it did not exist already, receives “ownership” of that name. This could be used to manage internet domain names, traditionally a responsibility of registry operators who owned a monopoly on a specific top level domain. In the case of domain names, the blockchain could require from individuals to pay a yearly fee to maintain ownership, which would be used to cover mining costs or would be sent automatically to the government as a tax.

We could further generalise the registration of names to more abstract concepts such as texts, images, videos or even ideas: the first to submit automatically gains ownership of intellectual property.

Decentralized autonomous organisations (DAOs)

When smart contracts are bundled together, they can sometimes form what is called a Decentralised Autonomous Organisation (DAO). While there is not yet a formally agreed upon definition of the concept, DAOs can be understood as regular organisations except that, instead of following the lead of human managers, they have an automated governance encoded in smart contracts. The most famous implementation of a DAO was the venture capital fund sobrely called The DAO that (despite later issues that led to its shut down) raised over a hundred million USD over a crowdfunding campaign in May 2016. Contrary to traditional funds, shareholders of The DAO do not elect a board to represent them but are directly involved in the operational activities and investment decisions.

Wikipedia is a perfect example of organisation that could have benefited from the blockchain. Its organisational structure is really close to that of a DAO, with most of its content being generated by its community and all decisions being made through a democratic process. Yet, without the blockchain, the Wikimedia Foundation had to rely on a few individuals to manage the organisation, such as the executive director, vested with special powers. This creates conflicts of interest, even within a non-profit. A Wikipedia DAO could easily be implemented, thus removing the need for human representatives and making Wikipedia truly neutral and independent.

Similarly to smart contracts, not even its creators can control a DAO once deployed in the blockchain (unless special provisions have been written in the initial code). Large networks of DAOs could grow to become artificially intelligent clusters of computer programmes with control over physical assets, similarly to how machine learning neural networks work, bringing us a bit closer to the technological singularity.

Blockchain Costs and risks

Reduced control

The blockchain is attractive for its unmatched level of security. You can trust it to protect the integrity of your data more than you would trust any bank or government. But it will do so indiscriminately and will not protect you from your own mistakes. Once a smart contract is released into the blockchain, no one can stop it, not even you. If by mistake you forgot to add a clause that indicates where to send the funds back when the contract is cancelled, the money will stay forever lost in the blockchain. Worse, if you design a harmful contract that incentivises illegal behavior (e.g. by automatically remunerating individuals who publish terrorist content) and equip it with large financial resources, neither remorse nor an injunction will be of any effect to stop it.

Latency

The blockchain is not as reactive as traditional databases. This is the cost to pay for security: for each block and each transaction we add, the nodes need to run many time-consuming checks that insure they comply with the rules defined by the core script. In addition, many blockchains artificially adjust the level of “difficulty” of the mining to make sure the blockchain doesn’t grow too fast. In the bitcoin for example, a new block is only added about every ten minutes, which is why transactions take a few minutes on average to be confirmed.

Recent blockchains such as Ethereum have been able to decrease that delay to about fifteen seconds between each block, but that remains far too slow for real-time applications.

Storage costs

One of the fundamental properties of the blockchain is that it has to conserve the full history of the transactions and thus will forever grow over time. In addition, its distributed nature requires thousands of nodes to make copies of the entire blockchain, and to store it on a well connected computer with a high bandwidth. As a result, storage costs are thousands of times higher than any other solution, making it largely impractical at the moment to store more than a few bytes of text, let alone images or videos.

Mining costs and risks

Mining represents the majority of the costs in traditional blockchains that rely on a Proof-of-Work (PoW) algorithm, such as the Bitcoin. As explained earlier, the blockchain makes it artificially difficult to create a new block (thus very costly in electricity and hardware) to protect the network from 51% attacks. The drawback is that to provide a decent level of security, indecent amounts of electricity need to be wasted, which is not only expensive but also leaves a terrible environmental footprint. At the current value of the bitcoin, a few million dollars worth of electricity are consumed every day by bitcoin miners alone.

The theoretical foundations of PoW incentives stem from game theory: if the rewards for a successful attack are lower than the costs, no rational individual should attempt an attack. As we saw, the rewards for a successful attack are limited as it is impossible to steal money without also knowing the private key of individuals. As for the costs, with PoW they come from two components: the initial investment (to acquire the necessary hardware) and the electricity.

The cost of controlling the network will be proportional to the duration of the attack, as the attacker has to keep finding valid blocks faster than the honest nodes to maintain its blockchain longer than the honest blockchain. But with the recent advances in cloud computing, it has become cheap to rent a large CPU capacity for a very short period of time with little upfront investment. In addition, economies of scale and geographic differences in electricity and hardware prices have created strong incentives for miners to pool their resources, making the system more vulnerable.

Blockchains can remunerate miners for their effort either by generating new currency or by perceiving a fee on each transaction. The former will create inflation and is thus equivalent to a “wealth tax” (since each coin loses a fraction of its value), whereas the latter is equivalent to a “value added tax” (or “financial transaction tax”); both kinds of taxation have been active topics of research in public policy for a long time and have well-understood advantages and inconvenients. There is also a trade-off between the desired level of security and the cost of running the blockchain, thus incentive levels might have to be adjusted depending on the criticality of the infrastructure.

A promising alternative to PoW is Proof-of-Stake (PoS). With PoS, the network is protected as long as honest participants own at least 51% of all the assets at stake. Here, the incentive system has to be built in a way that makes anyone who successfully carries an attack lose as much wealth as possible.

Many variations of PoS have been suggested, such as the Casper algorithm —expected to replace PoW in Ethereum soon—, in which individuals can “bet” coins on which block they believe will be added to the blockchain next. In such cases, the only circumstances in which participants will make non-hedgeable losses at betting is if the network is successfully attacked: this very low probability event is similar to a “systematic risk” in finance, and the gains made on successful bets can be compared to the “risk-free” return offered by government bonds. Just as for government bonds, all participants in such a blockchain should invest all their “assets” into the “betting” to gain the “risk-free” return unless they are too risk-averse to agree to increase their exposure to the “systematic risk” (to which they are exposed anyway whether they bet or not).

We can actually show that consensus-by-bet PoS can be modelled as a subset of PoW displaying similar mining incentives except that the cost of carrying a successful attack against the network is not proportional to the duration of the attack but roughly constant (since your stake is likely to lose most of its value if you attack the network). This is a desirable property as the social cost of an attack is generally better represented by a fixed value than by a linear function of time.

Assuming that most cryptocurrencies owners participate in the betting process, it also makes it easy to raise the cost of an attack to billions of dollars instead of millions. PoW also practically eliminates electricity consumption and, incidentally, makes possible several improvements to raise the speed of the network.

Note that if financial instruments allowing speculators to take highly leveraged short positions on the blockchain exist (for example by shorting the stock of companies that have invested heavily in the technology), attackers will start having financial incentives to take the network down.

Sybil attacks

Another less discussed vulnerability of the blockchain is its full nodes. If copies of the entire blockchain are not stored on enough computers, attackers can potentially fill the network with clients controlled by them and partially take down the system through what is called a Sybil attack. Malicious nodes are only problematic if they are so prominent that finding honest nodes becomes too time consuming, thus it is required to control much more than half of the network to inflict a generalised failure.

Increasing the mining incentives will not necessarily improve the protection against sybil attacks, but a certain number of measures are generally put in place to make these attacks difficult, such as limiting the number of outbound connections per ip address. So far, blockchains have never really lacked of full nodes so research efforts have been concentrated in other areas. If sybil vulnerabilities become critical (for example because hosting full becomes too costly), it might be necessary to provide financial incentives to people running full nodes.

Mitigation and recovery 

While vulnerability to attacks and to human mistakes are a major weakness of the blockchain, recent events have shown that possibilities of mitigation play a huge role in the credibility of the system, in particular with regards to forking, which can sometimes allow an almost full recovery of lost or stolen funds.

In June 2016, a vulnerability in the smart contracts behind The DAOallowed a hacker to steal over fifty million dollars from the fund. While this was not due to a failure of the Ethereum blockchain but only to the bad implementation of The DAO, the losses were of such large scale that they would strongly affect the Ethereum and put its survival at risk if nothing was done. The DAO had become a too big to fail financial institution that Ethereum (the “State” of this microeconomy) had to bail it out. Ethereum’s core developers thus released a patch that would essentially invalidate all the stolen funds, correct the vulnerability and bring back the Ethereum to its state just before the attack.

When a communication failure between nodes occurs or when only part of the nodes update their core script, the blockchain may split into two distinct versions. This is what we call a fork. Most of the time, forks are only temporary and disappear once all the nodes are synchronised. But sometimes, they come from a conscious decision from one part of the community to disregard certain changes made in the core blockchain script by the rest of the community. If both parties can rally enough support from stakeholders, both blockchains may subsist, having only in common the blocks history up to the breakup point. This is what happened when the DAO’s bailout patch was released: a significant portion of the community, against the bailout, decided to ignore it and to keep mining the old blockchain, which still exists today as Ethereum Classic, with a market capitalisation of about 10% of that of the patched Ethereum as of September 2016.

They now live as competitors. Despite both blockchains’ code being roughly identical, the split allowed both communities to make a strong statement to the world: Ethereum Classic is truly immutable and will not easily tolerate forks in the future, whereas Ethereum is likely to allow them again and even advertises them as a feature, an additional protection against potential attacks. The split could certainly have been avoided if Ethereum had taken a clear stand in favor of forks when it was first created, and businesses relying on a blockchain will have to decide whether they want to favor systems whose community supports voluntary forks or not. While a forking culture improves the mitigation potential, it can also backfire and overly empower core developers or a few individuals that can more easily impose their personal agenda to all the users of the blockchain.

Blockchain Implementation and Monetisation

Beyond the hype, businesses realize that integrating such technologies might be just as hard as the transition to Big Data, both to implement and to extract value. Massive injection of funds will not suffice and some business models might prove more compatible than others, at least initially.

As decentralisation and getting rid of intermediaries are the main purpose, the blockchain is generally associated with open-source technologies and can appear as an enemy to modern capitalism. However, many successful bitcoin and blockchain startups have shown that the technology can be synergised effectively with paid services; this contrasts strongly with the traditional open-source community—in which users expect an integrally free service—in part because people are already expecting to pay fees due to mining costs necessary to guarantee the reliability of the blockchain. Consulting advice on blockchain can also be offered for governments or organisations that want to leverage the potential of blockchain, and IT consulting firms will quickly need to develop an expertise in that area to respond to the demand. Similarly, companies offering cloud computing services can include Blockchain-as-a-Service (BaaS) into their offering. Universities will also observe a growing interest for both introductory and advanced blockchain courses in their computer science, economics and business degrees.

Firms can also use blockchains to externalise data sensitive components of their applications to decrease their compliance costs and risks of legal liability. If the company does not control the blockchain and only has ownership of the front-end built on top of it, it can only be sued for building the system, not for what becomes of it. This would add a layer of protection for companies operating in an uncertain legal environment. Most of all however, the value of the blockchain for organisations resides in its ability to streamline processes and improve vertical integration of the value-chain by getting rid of costly intermediaries and by simplifying coordination. This will be especially valuable for very fragmented industries that rely heavily on external partners or for companies that trade in a market with a generally low level of trust or high level of uncertainty, such as in many developing countries.

As for many modern technologies, the early business adopters will probably be start-ups, which can absorb a larger amount of risk and whose dynamism allows for better capacities to adapt to the fast-changing environment of blockchain. Businesses that will be the most at risk are those whose purpose is already to decrease coordination costs, such as banks and law firms, but are also the ones that have the most to gain by adapting. Lawyers for example could expand their services to include smart contracts drafting and bankers could design complex financial instruments living in the blockchain, offering a lot of transparency but requiring the competence of qualified financial advisors to be used appropriately.

While the blockchain presents significant opportunities for economic growth, it might often represent more of a threat for individual companies than an opportunity. It will decrease the overall need for both the private and public sectors, in favor of what we call the “autonomous sector”, a complex (somewhat chaotic) network of intertwined DAOs and smart contracts living in the blockchain, over which no one has control. In such cases, the financial incentive for businesses to understand the technology will be more about how to dodge the threat and adjust the offering to remain competitive than about how to extract value out of it. In particular, key differentiation arguments over which the blockchain might win market share are privacy, security, reliability and independence: if companies can improve their products on these characteristics, they might avoid losing the customers who are the most at risk of switching to the blockchain.

Most business uses of blockchain technologies will not require a dedicated blockchain. Use-cases can generally be satisfied easily through smart contracts encoded on networks supporting scripting, such as Ethereum, or by developing applications that rely on existing blockchains, such as a payment systems powered by the Bitcoin.

Recently, private blockchains have been suggested as alternatives to public blockchains. Contrary to regular blockchains, private blockchains can only be modified or mined by a pre-approved network of computers, with a reading access potentially also restricted. Adding and approving transactions could for example be limited to a consortium of banks who trust each other to a certain extent, with the requirement that each transaction has to be confirmed by at least a certain percentage of the participants. With private blockchains, as the number of participants is limited and known in advance, PoW or PoS can be replaced by proof-of-membership (to a set of hard-coded authorised public keys). Obviously, such systems lose most of the desirable properties that made the blockchain so innovative in the first place (including proof-of-work itself), but they offer an original approach to partially decentralised consensus with cryptographic auditability.

Conclusion

Most current implementations of blockchain are unadapted for large-scale solutions. In particular, the Bitcoin community has shown great difficulties to scale and adapt its technologies. The blockchain revolution will not happen overnight, however trends are already emerging—often set by key actors quickly gaining influence—and the Ethereum system is imposing itself as the default option for modern blockchain applications. Further developments should make it highly usable and cost efficient for most business applications.

Where business will play the most important role in the initial phase of this technology is in providing expertise for both private and public sectors through consultancy services and executive education, in complementing the current cloud computing offering with Blockchain-as-a-Service, in commercialising front-end applications on top of existing blockchains (e.g. e-wallet on top of the Bitcoin or smart contract drafting on top of Ethereum) for business and consumers and in leveraging private blockchains for internal uses. Blockchain should also be considered as a valid threat and direct competitor by many industries for long-term strategic planning.

The blockchain by itself is of limited value, just as internet and most popular programming languages—all open-source technologies—did not benefit most to their inventors but to those who managed to create value on top of them. The key will be to identify the segments of the value chain of each industry for which the market values decentralisation from the segments for which the market values most the quality of the service and to focus on the latter. Today, practical limitations will orient which technologies we should put on a blockchain, but hopefully future developments such as proof-of-stake will make the blockchain just another database system that companies can choose from.”

One thought on “Blockchain Explained

Leave a Reply