How Ethereum Works: Blockchain, Contracts & Fees

Ethereum is a global network of computers that collectively maintain a shared database and run programs called smart contracts. Unlike Bitcoin, which primarily tracks who owns what coins, Ethereum tracks a full “state” of data, including account balances, stored files, and the status of thousands of applications, all updated every 12 seconds when a new block is added to the chain.

Understanding how Ethereum works means understanding four core pieces: how the network agrees on what’s true, how it runs code, how it prices transactions, and how it scales.

The State Machine, Not Just a Ledger

Most people hear “blockchain” and picture a list of transactions. Ethereum is better described as a distributed state machine. Its state is a massive data structure holding every account’s balance, every smart contract’s code, and every piece of stored data. When a batch of new transactions arrives, Ethereum applies them to the current state and produces a new state. Formally, you can think of it as a function: take the old valid state, apply valid transactions, and get a new valid state out the other side.

This state is organized in a structure called a modified Merkle Patricia Trie, a type of data tree where every piece of information is linked by cryptographic hashes. All those hashes collapse into a single “root hash” stored on the blockchain. If even one tiny detail in the state changes, the root hash changes, making tampering immediately detectable.

How Validators Keep the Network Running

Ethereum uses proof of stake to decide which transactions get added and in what order. Instead of miners racing to solve puzzles (proof of work), validators put up ETH as collateral and take turns proposing and verifying blocks.

To become a validator, you deposit 32 ETH into a special deposit contract and run three pieces of software: an execution client, a consensus client, and a validator client. Each plays a distinct role. The execution client gathers pending transactions from a waiting area called the mempool, bundles them together, and runs them locally to compute what the new state would look like. The consensus client wraps that bundle into a “beacon block” along with network bookkeeping like rewards, penalties, and votes from other validators. The validator client handles signing and sending the block out to the rest of the network.

Every 12-second window, called a slot, one validator is randomly selected to propose a block. All other active validators then vote on whether that block is valid. These votes are called attestations. Validators attest that the block follows the rules and is the logical next block in the chain, building on whichever chain has accumulated the most attestation weight.

What Happens If a Validator Cheats

Validators who break the rules face slashing, meaning the network forcibly destroys part of their staked ETH. The severity depends on how many validators misbehave at the same time. A single validator acting alone might lose around 1% of their stake. If many validators are slashed simultaneously, the penalty scales up and can reach 100% of each one’s stake. The process unfolds over 36 days: an immediate penalty of up to 1 ETH on day one, a correlation-based penalty on day 18, and full ejection from the network on day 36. During that entire period, the validator also receives small penalties each day for being present on the network but not submitting votes.

How Smart Contracts Execute

Smart contracts are programs stored on Ethereum that run automatically when triggered by a transaction. They power everything from token swaps to lending protocols to NFT marketplaces. The engine that runs them is the Ethereum Virtual Machine, or EVM.

The EVM is a sandboxed computing environment that exists identically on every node in the network. When you send a transaction that calls a smart contract, every validator runs that same code with the same inputs and arrives at the same output. This deterministic behavior is what makes decentralized applications possible: no single server controls the result, yet every participant agrees on it. Think of the EVM as a giant, shared calculator where the answer is always the same no matter who runs it.

Smart contract code is written in languages like Solidity, then compiled into low-level instructions the EVM understands called bytecode. Each instruction costs a specific amount of computational effort, measured in units called gas. More complex operations cost more gas, which prevents anyone from running infinite loops or overwhelming the network.

How Transaction Fees Work

Every action on Ethereum costs gas, and gas is priced in small fractions of ETH. The fee system has two components: a base fee and a priority fee (sometimes called a tip).

The base fee is set by the protocol itself and adjusts automatically block by block. When blocks are more than half full, the base fee rises. When they’re less than half full, it drops. This creates a self-correcting pricing mechanism: during busy periods fees climb, which naturally throttles demand, and during quiet periods fees fall. The key detail is that the base fee is burned, meaning that ETH is permanently destroyed rather than paid to anyone. This burn acts as a counterweight to the new ETH issued as validator rewards, sometimes making Ethereum’s total supply shrink during high-activity periods.

The priority fee is what you pay on top of the base fee to incentivize a validator to include your transaction sooner. Validators keep this portion. When you submit a transaction, you set two parameters: a max priority fee (the most you’re willing to tip) and a max fee (the absolute ceiling you’ll pay per unit of gas, covering both base fee and tip). The network calculates your actual cost by adding the current base fee to whichever is smaller: your stated priority fee or the gap between your max fee and the base fee. You never pay more than your max fee, and if the base fee drops below what you budgeted, you simply pay less.

How Ethereum Scales With Rollups

Ethereum’s base layer processes a limited number of transactions per block. To handle more activity without sacrificing security, the network relies on Layer 2 rollups. Rollups process transactions on a separate, faster chain, then post a compressed summary back to Ethereum for final settlement. There are two main types.

Optimistic rollups assume all transactions are valid by default and post compressed transaction data to Ethereum. Independent verifiers then have a challenge window, typically seven days, to check the data. If anyone spots a problem, they generate a fraud proof that forces the rollup to roll back and remove the invalid block. This “innocent until proven guilty” approach keeps costs low during normal operation. Optimistic rollups post their data either as permanent calldata on Ethereum or to cheaper temporary blob storage, where the data stays available for roughly 18 days before being pruned.

Zero-knowledge (ZK) rollups take a different approach. Instead of waiting for someone to challenge results, they generate a mathematical validity proof that confirms every transaction in the batch was computed correctly. This proof is posted to Ethereum, where the base layer can verify it almost instantly without re-executing every transaction. ZK rollups don’t strictly need to post full transaction data for correctness, but they still need to make state data available so users can verify their own balances and interact with the rollup.

Recent Protocol Changes

Ethereum evolves through coordinated upgrades. The most recent major upgrade, called Pectra (short for Prague-Electra), activated on mainnet on May 7, 2025. It included several changes that directly affect how the network operates.

One headline feature is a step toward account abstraction, introduced through EIP-7702. Traditionally, Ethereum wallets are simple key pairs that can only send basic transactions. Account abstraction lets regular wallet addresses behave like smart contracts, enabling features like bundling multiple actions into one transaction, sponsoring someone else’s gas fees, and setting up custom recovery methods if you lose your private key.

Pectra also doubled the network’s blob capacity from a target of 3 blobs per block to 6 (with a maximum of 9), directly increasing how much data Layer 2 rollups can post to Ethereum and lowering their costs. On the validator side, the maximum effective balance was raised from 32 ETH to 2,048 ETH. This means a single validator can now stake anywhere from 32 to 2,048 ETH and earn rewards on every additional ETH above the minimum, rather than needing to spin up a separate validator for each 32 ETH increment.

Putting It All Together

When you send a transaction on Ethereum, here is what actually happens. Your wallet broadcasts the transaction to the network, where it lands in the mempool. A randomly chosen validator’s execution client picks it up, bundles it with other pending transactions, and runs them to compute the resulting state change. That bundle gets wrapped into a beacon block by the consensus client and proposed to the network. Thousands of other validators attest that the block is valid. Once enough attestations accumulate, the block is finalized and the global state updates. Your gas fee gets split: the base fee is burned, and the priority fee goes to the validator who proposed the block. The entire cycle takes about 12 seconds per slot, with full finality typically reached within two epochs (roughly 13 minutes).

Post navigation