How Does Ethereum Work?

Ethereum is a blockchain-based network that aims to make it easier to create applications that aren’t managed or controlled by one entity. Instead, they are governed by code.

Updated Feb 14, 2023 at 2:06 p.m. UTC

When the Ethereum network launched in 2015, it became the first project to expand the use cases of blockchains by introducing unique technologies that allowed people to create their own digital tokens and self-sustaining, autonomous applications. This innovation paved the way for a broad spectrum of markets including decentralized finance (DeFi), initial coin offerings (ICOs), GameFi and non-fungible tokens (NFTs).

But the question is, how does Ethereum achieve this?

At a high level, Ethereum consists of several key components:

  • Smart contracts: Rules governing under what conditions money can change hands
  • The Ethereum blockchain: A record of Ethereum’s entire history – every transaction and smart contract call is stored in its blockchain
  • Consensus mechanism: The method for validating and recording data on the blockchain; it also helps to secure the network and is responsible for issuing new tokens into circulation
  • The Ethereum Virtual Machine (EVM): The part of Ethereum that executes the rules of Ethereum and makes sure a submitted transaction or smart contract follows the rules
  • Ether: Ethereum’s token, which is required to make transactions and execute smart contracts on Ethereum

Smart contracts

Let’s start with smart contracts because they’re kind of the whole point of Ethereum.

A smart contract is simply a programmable agreement that runs on a blockchain. This technology allows users to digitize conditions governing the relationship and interactions between the two parties involved in a transaction. Once these conditions are programmed and launched on the blockchain as smart contracts, they self-execute (that is, they initiate and complete the set of transactions that they govern, as long as the predefined conditions are met).

For instance, Alice decides to borrow from Bob 1,000 tether (USDT) only if Bob deposits ether worth $2,000 as collateral. Using a smart contract, Alice could independently define the conditions that validate this deal, instead of trusting a middleman that would broker the deal. If done right, such a smart contract would autonomously release 1,000 USDT to Bob after he had deposited and locked $2,000 as collateral. Also, when Alice repays the loan, the smart contract would release the collateral and send it back to Bob.

As such, the smart contract offers a trustless system where Alice or Bob do not need to worry about counterparty risks. It also eliminates the need for middlemen. Here, Alice and Bob do not need to pay an extra fee to an intermediary or escrow service before they can conduct peer-to-peer transactions.

Interestingly, Ethereum was the first blockchain to discover and implement smart contracts as part of the functionalities of blockchains. Subsequently, this innovation unlocked more blockchain use cases and ultimately brought about the explosion of decentralized applications.

Blockchain

Ethereum shares some similarities with Bitcoin in that it relies on a blockchain to store and secure transactions.

Note that a blockchain is a chain of chronologically ordered blocks containing the data of confirmed transactions. Think of it as a ledger where all the activities executed in a network or platform are being recorded. Importantly, this ledger is publicly available, meaning network participants and even outsiders can easily track its content. Also, copies of this ledger are distributed across a global network of computers known as “nodes.” These nodes perform a variety of tasks on the network, including verifying and recording transaction and smart contract data.

This architecture allows participants to own a copy of the blockchain and collectively verify the validity of the content added to it. Some of the benefits of this include:

  • No single point of failure
  • Data is completely transparent, reliable and immutable
  • Censorship resistant

However, where Ethereum is different to Bitcoin is that nodes don’t just have to verify and record transaction data, they also have to keep track of the network’s “state.” Ethereum’s state is the current information of all the applications running on top of it, including each user’s balance, all the smart contract code, where it’s all stored and any changes that are made.

Here’s a summary of what’s stored in each node:

  • Accounts: Each user can have an account, which shows how much ether the user has
  • Smart contract code: Ethereum stores smart contracts, which describe the rules that need to be met for money to be unlocked and transferred
  • Smart contract state: The state of the smart contracts

Consensus mechanism

Ethereum and Bitcoin used to use the same consensus protocol for validating data and adding it to the blockchain – known as proof-of-work (PoW). This involves mining nodes competing against one another using energy-intensive machines to win the right to add the next block to the blockchain. This happens roughly once every 10 minutes.

However, in 2022, Ethereum underwent a major transition known as "The Merge" which migrated the network to a proof-of-stake blockchain (PoS.)

Instead of requiring mining nodes to run expensive equipment to discover new blocks, the new PoS system requires users to deposit and lock away 32 ether – the native cryptocurrency of Ethereum (see below) – to become network validators.

There are three main benefits to the transition:

  • Ethereum’s new PoS blockchain supports the implementation of new “shard chains.” These will be 64 smaller blockchains that will each handle their own batches of data, allowing for Ethereum to process significantly more transactions per second.
  • The new Ethereum blockchain uses 99.95% less energy than the proof-of-work version.
  • Because validators will not need to purchase and operate expensive mining equipment, it will reduce the barrier for entry for people to participate in the network. This should help to improve overall decentralization and network security.

The Ethereum Virtual Machine (EVM)

The EVM is Ethereum’s native processing system that allows developers to create smart contracts and lets nodes seamlessly interact with them. Ethereum developers write smart contracts with Solidity, a programming language much like Javascript and C++. These smart contracts written in Solidity can be read by humans but not computers. It, therefore, has to be converted into low-level machine instructions – called opcodes – which the EVM can easily understand and execute.

  • It’s important to know every Ethereum node has its own EVM.

When a person sends a transaction to a smart contract deployed on Ethereum, every node runs the smart contract and the transaction through their own EVM. In this simulated environment, each node can see what the end result will be and whether the outcome produces a valid transaction or not. If all nodes reach the same valid outcome, the changes are made and the updated Ethereum state is recorded on the blockchain.

Ether

Ether is needed for doing just about anything on Ethereum, and when it’s used to execute smart contacts on the network it’s often referred to as “gas.” The amount of gas needed to pay is determined by the type of transaction you plan on executing and the number of Ethereum transactions waiting to be verified. The more complex the transaction, the higher the gas fee.

Ethereum uses accounts to store the ether, analogous to bank accounts. There are two types of accounts to know:

  • Externally owned accounts (EOAs): The accounts that normal users use for holding and sending ether.
  • Contract accounts: These separate accounts are the ones that hold smart contracts, which can be triggered by ether transactions from EOAs or other events.

Find more about accounts here.

How do users interact with Ethereum?

As mentioned earlier, some users interact with Ethereum via nodes. In other words, they have to connect their computers to Ethereum by downloading the blockchain software on their system (known as a “client”). Depending on the Ethereum software client you choose, you may need to download the full copy of the Ethereum blockchain.

Alternatively, you could simply generate a private key and create a wallet address to start interacting with the blockchain. Wallet in this context refers to digital or physical storage devices designed for cryptocurrencies. Each Ethereum wallet comes with a unique identifier called wallet addresses (they are random strings of alphanumeric characters).

And while most assume the crypto holders store their digital assets on wallets, these applications and devices function as storage systems for private keys. You do not leave the Ethereum blockchain. Instead, the blockchain assigns all ether holders a private key that allows them to access their ether balance and use it as they please. When you transfer ether, the blockchain updates your balance to reflect the change in the ownership of the transferred coins. It is these private keys that wallets are designed to store. Note that without the private key, a crypto holder cannot access his digital asset. This is why it is paramount to keep keys secure and away from lurking eyes. If anyone manages to steal your private key, then they have successfully stolen the digital assets associated with such a key. Below is an example of what a private key looks like (please do not send any funds to this address):

073d9dbee8875e7c91422d80413c85ba5e8e9fe7cad5dc001871dac882d07f2f

Note that you would have to pay a fee denominated in ether whenever you execute a transaction on Ethereum or trigger a smart contract.

Further reading on Ethereum

Ethereum is the world’s second-largest crypto project by market capitalization and was the first to introduce smart contract functionality to the industry.

Ether is the second-largest cryptocurrency and handles more transaction volume than any other digital asset.

A gas fee is something all users must pay in order to perform any function on the Ethereum blockchain.


This article was originally published on Sep 7, 2021 at 4:18 p.m. UTC

Disclosure

Please note that our privacy policy, terms of use, cookies, and do not sell my personal information has been updated.

CoinDesk is an award-winning media outlet that covers the cryptocurrency industry. Its journalists abide by a strict set of editorial policies. In November 2023, CoinDesk was acquired by the Bullish group, owner of Bullish, a regulated, digital assets exchange. The Bullish group is majority-owned by Block.one; both companies have interests in a variety of blockchain and digital asset businesses and significant holdings of digital assets, including bitcoin. CoinDesk operates as an independent subsidiary with an editorial committee to protect journalistic independence. CoinDesk employees, including journalists, may receive options in the Bullish group as part of their compensation.

Andrey Sergeenkov

Andrey Sergeenkov is a freelance writer whose work has appeared in many cryptocurrency publications, including CoinDesk, Coinmarketcap, Cointelegraph and Hackermoon. He holds BTC and ETH.


Learn more about Consensus 2024, CoinDesk's longest-running and most influential event that brings together all sides of crypto, blockchain and Web3. Head to consensus.coindesk.com to register and buy your pass now.