Search⌘ K
AI Features

Introduction To Ethereum

Explore the core concepts of Ethereum, its approach as a programmable decentralized computer, and how smart contracts are written, uploaded, and executed on the Ethereum Virtual Machine. Understand Ethereum's shift from Proof of Work to Proof of Stake for enhanced scalability and energy efficiency.

Cash-oriented vs. programming-oriented

Bitcoin and Ethereum are two of the most popular and widely-used blockchains today. They each have their own blockchain infrastructures, and though they share some common features, they were created with different purposes in mind. Bitcoin is a cash-oriented system while Ethereum is very focused on executing programs.

Cash-oriented vs. programming-oriented
Cash-oriented vs. programming-oriented

Bitcoin was created as a peer-to-peer electronic cash system. Its main purpose is to provide a decentralized way of conducting transactions without the need for a middle man (such as a bank). So, it strongly focuses on cash transactions, spending conditions, and its digital currency bitcoin.

On the other hand, Ethereum’s purpose is not primarily to be a digital currency payment network. It was designed to constitute a general-purpose decentralized computer where programming code can be executed from the network. So, Ethereum has been described as the world computer” and its native digital currency ETH is seen as a utility currency, necessary to pay for the use of the Ethereum world computer. 

Ethereum

Ethereum can be imagined as a blockchain with a computer embedded in it.

From a computer science point of view, Ethereum is a general-purpose computer called Ethereum Virtual Machine (EVM) with a globally accessible state (the world state) able to run programs (smart contracts).

But how does a computation work on Ethereum? Who can implement and execute a program on Ethereum?

Here are the basic steps:

  1. Write a smart contract: A smart contract is a program, written in the form of computer code, that implements an arbitrary computation. Anyone with the appropriate knowledge can write a smart contract.

  2. Upload the smart contract: The smart contract code is uploaded to the blockchain with a special type of transaction (contract deployment transaction) and becomes part of the ledger’s world state. Anyone can upload a smart contract to Ethereum; the only requirement is paying the contract creation transaction fee.

  3. Execute the smart contract: Once in the ledger, the smart contract can be executed using a transaction (execution transaction). The data layer of the execution is the world state. Therefore, a contract run can eventually change the world state. Anyone can execute a smart contract; the only requirement is paying the transaction fee. 

Contract deployment and execution
Contract deployment and execution

In practice, anyone can create a smart contract and any user can call it to execute its code. Users pay a fee to the network to have their code execution requests fulfilled.

This means that Ethereum is a programmable state machine, similar to Bitcoin. But, while Bitcoin is focused on tracking only currency ownership, Ethereum has a more general-purpose world state, able to store any data expressible as a key-value tuple.

From an infrastructural perspective, the Ethereum world computer is fully decentralized. So, Ethereum can be considered a decentralized computing infrastructure, and the blockchain is used as the data layer to synchronize and store the world state changes securely and consistently.

The Ethereum ecosystem abstracts away all the underlying mechanisms of a blockchain so that any developer can create and upload a smart contract without worrying about the P2P network, the consensus algorithm, and so on.

Anyone can submit a request for computation to the network; this is a transaction request. As with any other transaction, it is broadcasted to the blockchain network and the nodes verify and validate it and execute the computation. Nodes run the smart contract code against their local copy of the world state. The consensus mechanism ensures that the network agrees on changes to the world state resulting from the computation. Then, the state changes are propagated to the entire network.

Ethereum’s native cryptocurrency is Ether (ETH), which enables the pricing mechanism for computing power because it is the only acceptable form of payment for transaction fees.

Ether has a lot of denominations, but the most important are:

  • Wei: The smallest amount possible (1 Wei equals 10-18 ETH).

  • Gwei (Giga-wei): Usually used to indicate transaction gas costs (1 Gwei equals 10-9 ETH).

Ether Denominations

Denomination

Value in ether

Wei

10-18 ETH

Gwei

10-9 ETH

Ethereum is a PoS blockchain network from late 2022. Earlier, it had a PoW consensus which later changed to PoS. The consensus mechanism changed for two main reasons:

  • Scalability

  • Energy efficiency

The PoW consensus mechanism requires a large amount of energy to power the network and is limited in terms of scalability. The PoS consensus mechanism is more energy-efficient and can scale more effectively.

Additionally, the PoS consensus mechanism is considered more secure against the possibility of a 51% attack and allows for more efficient distribution of rewards to network participants, encouraging greater participation and decentralization.