How does Ethereum work?
Ethereum can be broken down into 3 main components:
- • The Ethereum network
- • The Ethereum blockchain
- • The Ethereum Virtual Machine (EVM).
The Ethereum network is similar to Bitcoin’s in many ways, including it’s maintained and operated by a distributed group of contributors known as “nodes.”
These nodes perform various tasks including broadcasting and recording transactions,
as well as adding these transactions to the Ethereum blockchain.
Also like Bitcoin, Ethereum has its own native cryptocurrency called ether.
This digital asset fuels the entire Ethereum ecosystem.
Any activity performed on Ethereum, whether it’s moving funds between wallets or using a dapp, is stored on its blockchain as a data transaction.
To have this data transaction added to the blockchain, a fee needs to be paid to a miner.
Gas fees operate on an auction-style system.
People who attach higher gas fees to their transactions generally get them added to the blockchain faster.
Ethereum even uses the same “Proof-of-Work” system as Bitcoin for adding new blocks to its blockchain.
However, Ethereum is slowly phasing out mining in favor of a more efficient system.
Despite these overlaps, there is one major difference that makes Ethereum’s blockchain much more sophisticated than Bitcoin’s.
It’s not just a distributed ledger that records transactions,
it also has to execute and keep a record of special computer programs, known as “smart contracts.”
A smart contract sounds fancy but it’s simply a piece of code that automatically sends a transaction when it receives a certain input.
Developed by the Ethereum team, smart contracts are the magic things that make dapps work and can be created by any software developer to do a huge range of tasks.
For example,
you could create a dapp with a smart contract that instantly loaned money to a borrower as soon as the person deposited the right amount of collateral funds into a certain crypto wallet address.
In this instance, the input that triggers the smart contract to send a transaction is receiving funds in a particular wallet. Simple!
So with one simple computer program, you could make an app that loans money out to people without anyone having to run or watch it.
How cool is that?
The collection of all current Ethereum accounts and balances and all smart contracts created and executed on the blockchain are part of Ethereum’s “state.”
Each time a new block containing new transactions and smart contract code is added to Ethereum’s blockchain, it changes Ethereum’s state.
TL;DR Ethereum’s state changes all the time.
Once a new smart contract code is created and added to the blockchain, it then gets executed in a simulated computer environment called the Ethereum Virtual Machine (EVM).
Remember, smart contracts are computer programs that do things when certain conditions happen.
So just storing them on the blockchain isn’t enough, you need something that can actually process these special actions.
Each full node — people who participate in the Ethereum network by verifying and recording all transactions, data and states — has its own EVM.
Every node runs every smart contract in its own EVM and checks with every other node to ensure they all got the same outputs.
It’s like a class of students doing the same exam question and checking each other’s answers after to make sure they got it right.