Why Ethereum, when we already have Bitcoin’s Blockchain?

Why Ethereum, when we already have Bitcoin’s Blockchain?
Abhishek Chakravarty

Abhishek Chakravarty

Jul 7, 2017 · 11 min read

When evaluating or learning about a new shiny technology, one of the first things one should seek to understand are the problems that necessitated it’s development. So when I first learnt about a new blockchain called Ethereum, my immediate question was

Why do we even need Ethereum — another blockchain — when we already have a blockchain that powers Bitcoin?

Looking for answers, the thing I quickly realized was that this was not a very accurate question.

Ethereum wasn’t just another blockchain, its in fact much much more than that.

Ethereum is a Platform

Ethereum is a Platform. Underneath the platform is acustom-built blockchain that enables new applications to be built on top of it. Ethereum’s blockchain promises that these applications will run securely forever without any censorship or downtime.

My favorite analogy to thinking about platforms is the American Interstate Highway system (or the highway system of any country, really).

These highways are governed by a set of defined rules that everyone has to follow when using them. For example, getting in and out only through exits, no stopping anywhere, lane discipline and speed limits, no drunk driving etc. As long as you are following these rules, you can use the highway network to go wherever you want to go, stop at any exit you want to stop.

The highways connect cities and towns and people living in them. They enable transportation and transaction of goods and services, power several businesses and over time unleash economic activity and commerce. Also, the more people use these highways, the more valuable they become. Nice!

The Ethereum platform is a lot like a highway network, except the network in this case is made up of computers (nodes) connected securely via the internet. Ethereum, just like our highway system also has a set of rules that one can use to build and power new businesses, applications, exchanges etc.

No one ‘controls’ Ethereum, just like Bitcoin

The American Interstate Network is managed and maintained by the government, which means the responsible authorities (if they wanted to) can control, limit or totally restrict access to any highway, or even multiple highways.

Worse still, authorities can restrict all highways leading to a particular city, completely cutting access to it. That, in short, is the problem with centralization of authority. It leaves the majority vulnerable to the will of the minority. In this case, it requires that to enjoy the advantages of a highway system, the majority trust the minority.

Ethereum is unlike the highway system in this regard. It is powered by a network of distributed computers that no one entity controls. Here, nobody can restrict access to a particular asset that belongs to you, and so there is no trusting any authority, but yourself. This system ensures that one can create apps, online businesses, contracts etc. in a completely trustless manner.

If you create an asset on Ethereum, you can rest assured that you will have access to that asset securely, without any censorship or downtime. This promise of real world trustless applications is what makes the Ethereum platform so valuable.

BUT wait a sec, secure and trustless apps can also be built on Bitcoin’s blockchain,after all, the nice things that I just mentioned about Ethereum and what makes it really valuable are really functions of distributed, trustless blockchains? If so, we already have Bitcoin’s blockchain, why Ethereum?

Well, it all comes down to who will build these distributed, trustless applications of the future, and the tools they will use to build this aspirational future.

The right tools to build the future

You see, building a software application (distributed or not, trustless or otherwise) needs one to write code. But you perhaps knew that. But what is not always obvious is that before writing software, serious developers choose their tools, carefully. One of the most important choices they make is what programming language to use, which is in turn driven by how developer friendly the language is. Developer friendliness of a language allows coders to focus on the end product , instead of spending time learning how to use it. It is a function of features in a programming language that help developers write better & optimized code.

One such feature is loops. Loops are what makes a the computer ‘run’ a piece of code over and over again. It is a time saving maneuver, because if there were no loops and say you wanted write a software to print out all natural numbers from 1 to 100, you’d have to write the same code 100 times. Not very efficient, is it?.

Bottomline — Loops are super important and most developers when they write software, use loops and conditions to implement complex algorithms easily.

Ok, but so what?

Good question. Bitcoin’s underlying blockchain scripting language (fancy word for programming language) does not support loops.

This seemingly simple downside means building even trivial and simple applications on bitcoin’s blockchain can often become a research project for most developers. Its hard to focus on the end product, when something that can otherwise be done by writing 3 lines of code, takes 3 weeks. This is by far the most important reason why we haven’t seen a proliferation of distributed applications on top of Bitcoin’s blockchain.

Ethereum’s programming language on the other hand support loops and other “Turing-Complete” features alleviating a lot of these frictions. Consequently, Ethereum has the potential to, and actually does, attract more developers to build applications on top of the Ethereum blockchain.

Now, the lack of Turing Completeness is a problem, but the Bitcoin’s scripting language has some other structural oddities that make it hard to build certain types of systems. (again, Not impossible, but hard)

UTXOs

When I first learnt about the concept of UTXOs in bitcoin transactions, it took me a while to understand them and why they were designed the way they’ve been designed. We’ll get to the details in a bit but to keep things from getting too complicated, here is the key takeaway from this section :

The way bitcoins transactions actually work under the hood makes creating new applications on the Bitcoin’s blockchain very complicated. And this complexity was one of key drivers that led to Ethereum’s development.

OK, back to UTXOs

Imagine you are in Bitcoin land and say you want to send bitcoins to a friend — the following layout the basic ground rules of every such bitcoin transaction.

  1. Any bitcoin amount that you send is always sent to an address, which is a public key.
  2. Any bitcoin amount you receive is locked to your receiving address — which is (usually) associated with a wallet.
  3. Any time you spend bitcoin, the amount you spend will always come from funds you previously received and have not spent.
  4. Addresses receive bitcoin, but they do not send bitcoin — bitcoin is sent from a wallet.

But here’s the thing about bitcoins: they don’t exist in reality, e.g on a hard drive or on the cloud. When you look inside somebody’s address, you cannot see bitcoins, or point to something and say “see, there is a bitcoin”.

So what’s in you wallet, if its not bitcoins?

In your wallet are transactionrecordsof every bitcoin that you’ve ever received from anybody, and not spent yet. When somebody sends you bitcoins, these amounts are termed as outputsin Bitcoin speak. These Unspent Transaction Outputsare abbreviated as UTXOs.

When somebody sends you outputs, the UTXOs in their wallet are reduced by the amount they transferred, and UTXOs in your wallet go up by the same amount.

These transaction records don’t mix up or add up as they come in, but are stored exactly the way they were received. In other words, if you received a transaction#1 of 2 bitcoins, another transaction#2 worth 4 bitcoin, and yet another transaction#3 worth 5 bitcoins, your wallet will show 3 separate transactions with values 2, 4 & 5 bitcoins respectively.

Sure, Your wallet balance will be the sum total of all these transaction records = 11 bitcoins , but the thing to remember is → each transaction record is stored individually.

Okayy…so what has that to do with the original question of bitcoin vs ethereum?

The complexity involved

Lets say you want to send exactly 3 bitcoins to a friend’s address. No problem! you have 11 bitcoins enough to cover the transfer, right?

Right. But like I mentioned, your wallet has 3 different transaction records that add up to 11 bitcoins. And the problem with bitcoin’s scripting language is that it is value-blind.

In other words, the scripting language has no fine grained control over the bitcoin amounts that you can withdraw to transfer to your friend. All that complexity is left to you.

Here’s what I mean.

To send 3 bitcoins to your friend, you will first have to create a transaction and to do the following

  1. You will need to choose an input, from amongst transactions that you have previously received AND have not already spent.
  2. You will have to prove that these input transactions belong to you
  3. You will have to create an output to your friend’s public key or wallet address as the destination for the 3 bitcoins you’d like to transfer

Note that you have 3 transaction records that you can reference as inputs in step 1 above (txn#1 or #2 or #3). BUT you do not have any transaction records that is EXACTLY 3 bitcoins. Instead, you have 3 transactions with values 2, 4 & 5 bitcoins.

Ok, so here’s the problem. The way bitcoin’s scripting works, you CANNOT simply say :

“ Take transaction#2 (with 4 bitcoins) and send 3 out of the 4 bitcoins to my friend’s address”

Instead, you will have to spend all 4 bitcoins that you received in transaction#2.

Now because you HAVE to spend all 4 bitcoins but you only want to transfer 3 out of those to your friend, you will need to create another output transaction sending the remaining 1 bitcoin to yourself. Weird.

Before we move ahead, a lot happened above, so here is a picture to bring it all together.

That is how UTXOs work under the hood, and by the way they are way more complicated to implement than this explanation above.

If you want to write a bitcoin wallet application — the “send bitcoin” function that you’ll write will be super complicated. Such a function will take all the UTXOs a user has available in their wallet → then choose a subset of these UTXOs as inputs to the transaction, such that the sum of these UTXOs are greater than or equal to the desired outputs of the transaction.

If there are two or more subsets of UTXOs that meet this criteria then one needs to write additional logic that will somehow decide which subset to use. Clearly, too much complexity for a simple transaction, for most developers anyway.

To be sure though, these limitations of the bitcoin’s scripting language are due to some important reasons that bitcoin’s founder Satoshi probably foresaw and some that (he/she/they) did not foresee, but those reasons are beyond the scope of this post.

What is important to this discussion however is that this value blindness introduces complexity in building applications on top of the Bitcoin’s blockchain — hence the need for a language/platform that better manages this complexity and therefore facilitates development of new apps. Ethereum fills that gap and therefore has seen rapid adoption.

By the way, and maybe you already noticed, UTXOs have another property that makes them hard to configure. The fact that UTXOs can fundamentally assume only two states → Spent or Unspent.

This binary state along with value-blindness makes it even more difficult to create multi-stage smart contracts over Bitcoin’s blockchain, such as an application where multiple users contribute UTXOs to an agreed upon contract, then perform some additional operations and finally based on pre defined contract rules funds are disbursed out to appropriate parties. Again, coding this seemingly simple rule based algorithm is worthy of a research challenge for most developers if they were using bitcoin’s scripting language. Ethereum on the other hand scores much much better in terms of ease of implementation for such a smart contract.

Building the Future

If blockchain technology ever reaches its potential, it will be because a lot of factors facilitated it, and amongst the most important factors will be the ability to harness the power of blockchains easily, to build new things on top of them — not just by rocket-scientist level programmers but by regular programmers armed with great ideas.

Today, most developers that want to develop blockchains apps struggle because there are no easy platforms that lets them build things easily, and a platform like Ethereum aims to solve just that, so everyone including non-expert programmers like myself can also build things that are powered by blockchain. That is how you build the future, and distribute it evenly.

As I read Vitaliks Buterin’s White-Paper introducing Ethereum, and understood the mechanics of the platform, I am convinced that the Ethereum platform is a tectonic shift in how blockchains can be tamed, and its already showing. There are several development groups already working on decentralized apps ranging from value exchange, asset registry, device discovery and things you and I cannot fathom right now.

Bottomline ? If you are in the business of building products, or even if you are not — you should not miss this tectonic shift in tech. It will define how things are built in the future. If this is the first time you are hearing about blockchains and Ethereum, then do yourself a favor and listen to this amazing podcast by Tim Ferris and Naval Ravikant talking to the crypto great Nick Szabo. You will thank me later. You can also read part-1 of my blockchain series too.

In part 3 of this series, I hope to share how Ethereum really works under the hood, and also share how I built a basic 2 node test Ethereum blockchain and a simple smart contract!

Thanks for reading, and follow me to be notified when part 3 is up!

Source link