Ethereum, for Earthlings
a.k.a. How To Understand Ethereum Without Traumatizing Your Brain
When I began my journey down the rabbit hole into cryptocurrency land last year, it was very challenging to understand technologies like Ethereum. The more I read about the technologies that enable cryptocurrencies to exist, the more questions would come up. And in my experience, the majority of guides to Ethereum out there are either overwhelmingly technical, or just too simplistic.
The reason, I believe, is because it is easier to describe the individual components of this technology (Merkle trees, hashes, keys) rather than to try and conceptualize the big picture; the sum of every moving piece, combined.
But as Albert Einstein once said:
“If you can’t explain it to a six year old, you don’t understand it yourself.”
I don’t mean to discredit the authors that have written extensive technical posts on this – I just know from my own experience that trying to understand this technology can be a little disheartening if you don’t begin with a macro perspective of what Ethereum is.
Regardless of technical complexity, I think more needs to be done to educate non-engineers about this technology because, at the end of the day, better education is the only way of getting people excited about this incredible platform.
And this is what I’ll attempt to do in this post: explain Ethereum to ‘six year olds,’ aka- myself last year.
Ethereum is a network of computers that are constantly sharing information
In the real world, in order for a group of people to understand each other, they need to communicate using a set of rules; a common language. Similarly, all individual computers in a network need to follow a set of rules; a common (network) protocol.
The basis of Ethereum is a network protocol that shares information amongst thousands of computers around the world. That information represents money in the form of computer code. Networks like Bitcoin and Ethereum use a shared database, and every participant in these networks stores transactions that are valid, and spread the word amongst their peers.
Text, videos, music, apps… we know that everything in a digital format can be duplicated by copying (Ctrl+C) and pasting (Ctrl+V). Ethereum’s native token, Ether, is digital, so what stops people from just copying their balance and tricking the system? The short answer is: every participant is hyperaware of every event that has ever happened in the network — And what facilitates that hyperawareness is something called a blockchain.
Many meanings over the past years have been assigned to the word blockchain, but simply put, a blockchain is a type of database; a way to store data (often in the form of ledgers) over a period of time. When a transaction occurs in a network like Ethereum, it is grouped with other unprocessed transactions in something called a “block.” Every 20 seconds or so, a new block is created and “chained,” to the previous block. So, in essence, the Ethereum blockchain is just a series of blocks that contain transactions that occurred over a period of time.
Every network participant stores a copy of the blockchain in their computers, which contains all transactions from the first block, the genesis block, up until the most recent block the software is able to find. Users running the Ethereum software are the backbone of the network and are called nodes. Ethereum nodes are able to verify the validity of transactions by checking whether the sender has enough balance to send funds.
There is no hierarchy within the network, everyone has equal power to transact, verify, and keep track of all transactions. And the greatest benefit of having every node maintain a copy of the blockchain is that, once a block has been added to the chain, it is very difficult to revert the transactions inside that block. The “chain” connecting blocks together uses complex math to connect blocks, which makes this database very difficult to tamper with.
So what is the hype all about?
If we look at the way business is conducted in the real world, there is a great amount of trust involved even with the simplest business transactions. Everything involves a contract, and things are generally supposed to work because of fear; one party is afraid that other will sue, so there is an incentive for the terms of the contract to be honored.
But in reality, the requirement of trust introduces a huge problem in the digital world. Business are global, and at times it can be hard to fully assess who you’re dealing with. And the same is true for online services. Ask yourself, when was the last time you read the terms of service of an app that you love and use?
Terms of service have become so long, and update so frequently, that it’s nearly impossible to keep track of them. Most people (myself included) don’t spend hours reading these documents, and this allows companies like Facebook to collect and sell sensitive data on their users.
The keyword here is trust. We are forced into trusting institutions because we don’t have a choice other than not using their services. But I believe that’s about to change. Technologies like Ethereum can bring the power back to users through virtual agreements called smart contracts.
The basic idea of a smart contract is to execute the terms of a contract automatically by a computer, or a network of computers. Cypherpunk pioneer Nick Szabo coined this term back in 1994 and created some clever examples to help us understand the concept.
When I began learning about smart contracts, one of Nick’s simple analogies was particularly helpful; vending machines. I mean if Mini Oreos can’t be the light at the end of the tunnel, what really can?
Similarly to smart contracts, vending machines are predetermined agreements that are executed automatically and without the involvement of a third party. When we select a good that we want to purchase from a vending machine, it first tells us how much it will cost. We then make a payment and the machine checks the validity of the money we provided and if the quantity inserted is sufficient. If these conditions are met, the machine will then deliver the Mini Oreos you requested.
In essence, a smart contract works the same way, but digitally. If certain conditions are met, the contract is executed automatically. No need for trust, no need for lawsuits.
(Ethereum) Smart Contracts
In order to understand how smart contracts work, let’s look at how a decentralized version of Uber could be implemented on the Ethereum platform.
Just like the vending machine example, this service could be implemented using a series of if, then statements in the form of code. Consider the following example: Alice is in uptown Manhattan and she wants to go meet her friends downtown using dUber (decentralized Uber).
The basis of any application is user identity. In Ethereum, identities are defined as accounts. Generally speaking, there are two types of accounts: user accounts and smart contract accounts.
Alice’s account address is: 0xA74fe11fcD265e8caCa0d82E677E4FD71df3044b
Users in Ethereum interact with smart contracts through transactions.
Alice invokes dUber by sending an Ethereum transaction to dUber’s smart contract that basically says: “Alice (0xA74), located at […], wants to go downtown.” dUber’s contract will match her address with Bob, who is a driver looking for passengers in the same area.
dUber’s contract will match her address with Bob, who is a driver looking for passengers in the same area.
Once both Alice and Bob agree to the terms of their business engagement, dUber’s contract will use GPS coordinates to track their locations. In this case, the GPS is used as the contract’s oracle.
Oracles, in the context of smart contracts, are third party verifiers which are generally agreed upon by both parties and written into the smart contract. dUber users must agree that the GPS coordinates in their smartphones will be used to trigger the payment within the platform.
The GPS oracle will keep track of Alice and Bob for the duration of the ride.
The oracle informs dUber’s smart contract (through yet another transaction) when both smartphones reach the predetermined destination.
Bob’s app wallet will automatically send the contract a request for payment.
That leads Alice’s dUber app to triggers a transaction that pays Bob for his services.
So, to recap, here are the transactions that took place in this example:
- Alice -> dUber: Alice shared her location with the dUber app and requests a driver willing to take her downtown. Like real world Uber, dUber calculates the cost of the ride in advance and Alice funds a temporary account for payment that dUber has temporary control of.
- Bob -> dUber: Bob communicates to dUber that he’s looking for a passenger in the area and is connected with Alice.
- Oracle -> dUber: the prearranged oracle proves to the dUber contract that both Alice and Bob reached their destination.
- Bob -> dUber: Bob requests dUber to release the payment for the ride.
- Alice (temporary account controlled by dUber) -> Bob: Alice’s temporary account sends Bob the payment.
Ethereum smart contracts aren’t able to generate external transactions by themselves, but use cases like dUber can use temporary accounts (often called escrows) to facilitate payment, as shown in transaction #1.
Why this new system changes everything
I imagine that this all makes sense so far, especially for those of you who live in metropolitan areas where car services are popular. And it probably seems very similar to digital car services that are up and running today — so you might be asking yourself, what justifies switching to a decentralized platform?
There are many benefits but let’s start out with economic incentives for both drivers and passengers.
On average, digital car service companies take 25% from all revenue that drivers earn. And the popularity of this type of service granted companies like Uber multi-billion dollar valuations (yep, that’s an illion with a B!). An intermediary this big leaves drivers with very little for their time, gasoline, car insurance, and other operational costs associated with the activity itself: taking Alice from point A to point B. And who then has to pay higher costs? The user. That doesn’t seem to add up correctly, or at least fairly, and here’s why a decentralized system makes sense— it cuts out intermediaries.
Yes, dUber will probably carry a founders’ fee and have many operational costs like the salaries of the developers improving the platform as well as the committee, or co-op, in charge of business-related decisions. While these operational costs can add up, they pale in comparison to the need of turning a profit. By not requiring a profit margin, a decentralized version of Uber would be putting money back into the (digital) pockets of both drivers, who expect to profit from fair margins, and passengers who now have lower costs.
Another point I want to focus on is the ability to create an institution where economic incentive is stripped from decision making, where morals and economic gain don’t clash. Allegations of sexual misconduct against drivers on popular car service applications are popular and the way some of these companies have dealt with these allegations is disgraceful. And the sad part is that it often boils down to economic incentives. There is no incentive to fire a driver that misbehaves when the company is struggling to make the supply of drivers meet the demand for the service (and this is in large part because of how big of a chunk of the drivers’ revenue the company takes).
There is no incentive to refund riders who have had horrible experiences or, at the very least, run background checks on all drivers because that would ultimately hurt profit margins. What if, in this decentralized system, the much smaller fee taken from drivers was solely used for overhead costs, legal fees/refunds, and a founders’ fee that is algorithmically determined? What if incentives could be perfectly designed so that there is no clash between ethics and profit margins?
Sounds utopian, right?
It might. But for the first time in human history we have the technology that allows us to create this type of institution.
Back to the Tech (& Its Current Limitations)
We are at a point where the basis of the technology exists, but there are scalability constraints that make it difficult for it to be widely adopted. As you saw in the dUber example, one simple ride resulted in five transactions, and Ethereum’s current throughput is limited at ~15 transactions per second.
One of the complicating factors is that each dUber transaction as well as all information/code attached to them is verified by Every. Single. Ethereum. Node. On one hand, this comprehensive verification system makes it difficult to commit fraud in the network, but on the other, it also makes it difficult for it to scale.
Different cryptocurrencies use different methods of verifying transactions in their network, and there is an ongoing debate about how to make this verification more efficient. Ethereum nodes use a set of rules, a.k.a a consensus protocol, that involves a competition called mining to agree on what’s valid from what’s not. Mining is important because it protects the network against cyberattacks.
Any Ethereum user can become a miner if they have the correct hardware and are willing to become a node by downloading the entire Ethereum blockchain going back to its genesis block (the first block to ever exist). Miners are responsible for gathering unprocessed transactions, adding them to a new block, and, most importantly, solving a complex math problem with the help of specialized hardware.
If that puzzle is solved, the miner is awarded Ether as payment for putting in the work to help secure the network. Miners also get all transaction fees paid by the senders. How quickly a pending transaction is mined depends on how much the sender is willing to pay in transaction fees. And as you can imagine, the more the sender is willing to pay, the quicker the transaction is added to the blockchain.
The essence of the puzzle described above is to make it so that miners have skin in the game; a collateral in the form of electricity. Solving the puzzle is required to add a block to the blockchain, and it is a costly process in terms of electricity and the necessary hardware. The idea behind it is to create an incentive layer so that, when a miner solves the puzzle, she is incentivized to cooperate with the rest of the network, rather than include a fake transaction in the block, and be scrutinized later.
This system is called Proof-of-Work (PoW) because solving the puzzle means proving that work was done and that miners have skin in the game. In a near future, Ethereum will migrate to something called Proof-of-Stake (PoS). Instead of proving skin in the game by using lots of electricity and fancy hardware, Proof-of-Stake involves locking a balance of tokens in an escrow account before adding a block to the blockchain. Under PoS, if a block contains a scam transaction, the miner loses her tokens in escrow.
This new system may help us find better ways to scale the network, but there are other limitations too that I should note. The infrastructure behind the oracles that I used in my dUber example is still under construction, and very primitive at the moment.
You made it!
There you go! Hopefully you enjoyed reading this article and learned something new:)
This is my first medium post and writing it was for educational purposes for both the community and myself. I would like to thank Lucas Nuzzi for editing this piece for me.
Any constructive feedback is welcomed- no heckling! If you enjoyed this piece, please share and give it as many claps as possible-let’s spread awareness about this amazing technology:)