The Ethereum Series: Part 2 – How Ethereum Works

The Ethereum Series: Part 2 – How Ethereum Works
The Ethereum Series: Part 2 – How Ethereum Works

Everything you need to know about Ethereum, explained in a four-part series, by Colin Adams

Part 2: How Ethereum Works

When you drill down, blockchains are really a shared version of reality everyone agrees on. So whether it’s a fully immersive VR experience, augmented reality, or even Bitcoin or Ethereum in the physical world as a shared ledger for our ‘real world,’ we’ll increasingly trust blockchains as our basis for reality.

-Fred Ehrsam, co-founder @Coinbase, and trader @GoldmanSachs

In the context of Ethereum, the blockchain acts as a public ledger that lists everything that goes on in the network in real-time. It’s the thing that makes the whole show possible.

Some of the same fundamental blockchain technology that allows Bitcoin to function allows Ethereum to function. The structure of the Ethereum blockchain is similar to Bitcoin, in that when a transaction goes through, a copy of it is distributed through the whole network. Every node (computer running Ethereum software) on the network stores a copy of this history.

This distributed digital ledger of information can be easily synced across a large decentralized network. This is what makes Ethereum accessible to anybody with internet access, regardless of location.

Within the Ethereum network, there are blocks of data that consist of transactions and smart contracts. These blocks are chained together and are the complete record of Ethereum’s history going back to its first block. These blocks are created or mined by some users and distributed to other users who validate them or make sure they are ‘right’.

Every blockchain has some type of algorithm for reaching consensus. The network uses these algorithms to agree upon the single value of a data point across the entire system. As discussed in the section below, new transactions on Ethereum were initially agreed upon by miners using the same Proof-of-Work system as Bitcoin but plans to change that have been in the pipeline for quite a while now.

Now, let’s take a look at some key aspects of Ethereum.

The Ethereum Virtual Machine EVM

One of the key innovations of Ethereum is the introduction of the EVM.

Before the advent of Ethereum, cryptocurrencies were designed with a narrow range of function (sometimes this was completely singular). Bitcoin, for example, could only operate as digital currency.

Developers had hit a roadblock; they’d either need to expand the functionality of Bitcoin onto the existing blockchain (very time consuming and technically challenging) or start from scratch with a whole new platform. Recognizing this impasse, Buterin stepped into the void, pioneering the EVM.

To quote The Merkle:

this (the EVM) project focuses on preventing Denial-of-service attacks, which have become somewhat common in the cryptocurrency world. Moreover, the EVM ensures programs do not have access to each other’s state, ensuring communication can be established without any potential interference.

That is just one aspect, however, so let’s try to clarify in simpler terms why EVM matters so much.

With Ethereum, every time a program or transaction is activated the network has to process this. Contracts written in various programming languages are compiled into ‘bytecode’, which the EVM can decipher and execute (a bit like Google Translate). This means that anyone can run any program, regardless of the programming language given (and this is key) enough time and memory.

All the Ethereum nodes execute contracts using their EVMs and this invention is huge because it allows people to build things in a more efficient way than ever before. Now every application can be built in one place; there is no need for an original blockchain for every new project.

Smart Contracts

When you start learning about Ethereum, it becomes clear that the special sauce is its ability to power smart contracts. The phrase ‘smart contracts’ was originally coined in 1996 by computer scientist Nick Szabo (rumored by some to be Satoshi Nakamoto). Smart contracts are computer programs that directly control the transfer of digital currencies or assets between parties, if certain conditions are met.

Smart contracts carry out if-then statements. For example, imagine if a smart contract was used to operate a vending machine. The if-then statement could be: ‘If someone puts a dollar into the vending machine, the vending machine will release a can of Coke for them.’

Ethereum provides a base for these contracts because it is ‘software that can host other software’. This offers a level of functionality that many other cryptocurrencies simply don’t have. Ethereum is projected to have the ability to deal with things like identity systems, insurance payments, and management of permissions (to name a few).

All of these are possible due to the smart contracts which sit on the Ethereum blockchain. They effectively stand in for a transaction or contract in an all-digital environment. This may all sound a little nebulous, so let’s look at a concrete example.

Say we were to set up an Uber-type service. A smart contract could be written to track the GPS coordinates of someone’s phone. It could be designed in such a way that if the GPS reaches an intended destination, then the smart contract automatically pays out to another user whose GPS made the same trip (in theory, the driver).

The driver could be paid $15 or whatever the reasonable fee is and this could all be done seamlessly without either party trusting each other or even really communicating for that matter. The driver has a guarantee of payment if, and only if, they deliver the other person to this specified GPS location.

The potential magic of Ethereum lies in making daily life more efficient and cost-effective by automating everyday processes and removing middlemen from human systems. The above example of Uber is but one of thousands of possible use cases.

To learn more about smart contracts, check out our articles Digital Assets and Smart Contracts: A Beginner’s Guide and  4 Reasons Smart Contracts Will Change The World.

ERC20 Token

ERC20 is simply the name for the standard requirements for anyone wishing to introduce a new token onto the Ethereum blockchain. ERC stands for Ethereum Request for Comments.

Introduced in late 2015, ERC20 used to be unofficial guidelines until they became formalized on the Ethereum GitHub page. To paraphrase Coindesk, the primary reason that ERC20 exists is to ensure that Ethereum-based tokens perform in a predictable way throughout the ecosystem, such that decentralized applications and smart contracts are interoperable across the platform, and that all tokens follow a fixed standard of security. In layman’s terms, it’s so that new things work with everything else in the system.

Given the huge number of ICOs that have taken place on Ethereum, it makes sense they’d want to develop some type of a standard. As of January 2018, there are more than 21,000 ERC20 token contracts and making sure they work across platforms and applications benefits Ethereum as a whole.

Ether supply and ‘gas’

As alluded to earlier, the ether token is the currency that makes the Ethereum ecosystem run.

The Ethereum website explains it this way:

ether is a necessary element — a fuel — for operating the distributed application platform Ethereum. It is a form of payment made by the clients of the platform to the machines executing the requested operations.

The cost of this fuel is determined by the degree of computation for an action the network performs — basically, everything costs a bit of gas, but some things more than others. This means that no one works for free and it disincentivizes inefficient code.

Who needs ether? Any developer wishing to build something on Ethereum or anyone wishing to access an Ethereum-based smart contract should have ether. It can also be used as a currency. As the Bitcoin network slowed and transaction fees rose toward the end of 2017, some people turned to ether as a medium of exchange.

The total supply of ether is not capped like Bitcoin is. The supply and rate of issuance were largely determined by initial donations at the 2014 pre-sale. It breaks down like this:

The Ethereum Series: Part 2 – How Ethereum Works

(Source: etherscan)

  • 72 million ether created and given to contributors of the pre-sale.
  • 24 million ether created and given to the development fund, most of it going to early contributors and developers, and the remaining to the Ethereum Foundation.
  • 1.4 million created in ‘Uncle Rewards’ (rewards for recording alternative or ‘very close but not quite right’ blocks)
  • 98 million ether (roughly) in current total circulation (at time of writing).

As Ethereum changes, some have speculated that the ETH issuance rate might as well. But this has previously been guaranteed not to change. As one Redditor put it, “Casper FFG doesn’t mean anything for the supply of tokens or inflation rate. It’s PoS built on top of PoW.”

In 2017, the issuance rate of ether is 14.75%, or roughly 5 ETH per block. It should also be noted that the issuance of ether is capped at 18 million ether per year (this number equals 25% of the initial supply).

As we move into 2018, the introduction of Casper has been said to be ‘dis-inflationary’ (i.e., inflation perpetually trending towards 0 but never reaching it).

You should now have a basic idea of how the Ethereum blockchain, the ether token, smart contracts, the ERC20 standard and PoW/PoS consensus protocols work. For those who really want to dig into the engineering side of things, there is an excellent medium article on the technical nitty-gritty of Ethereum. Or you can always read the white paper.

In part 3 of this series, we will be looking at some of the applications of Ethereum, and its advantages and disadvantages.