Ethereum & Smart Contracts

Ethereum Overview

Ethereum Overview

Module 1 of Ethereum & Smart Contracts


What Is Ethereum?

Ethereum is a decentralized computing platform that runs smart contracts — self-executing programs stored on the blockchain.

BitcoinEthereum
Decentralized moneyDecentralized computation
Limited scriptingTuring-complete programs
UTXO modelAccount model
Store of valueProgrammable platform

"Ethereum is a global, decentralized platform for money and new kinds of applications." — ethereum.org


The Vision

Vitalik's Insight (2013)

Bitcoin showed you could have decentralized money. But why stop there?

What if you could decentralize:

  • Exchanges
  • Lending
  • Insurance
  • Identity
  • Voting
  • Any application?

The World Computer: A global, censorship-resistant computer that anyone can program.


Key Components

1. Ether (ETH)

The native cryptocurrency:

  • Pays for computation (gas)
  • Secures the network (staking)
  • Store of value
  • Medium of exchange within dApps

2. Smart Contracts

Programs that:

  • Live on the blockchain
  • Execute automatically
  • Cannot be modified once deployed
  • Have their own state and balance

3. The Ethereum Virtual Machine (EVM)

The runtime environment:

  • Executes smart contract code
  • Deterministic (same input = same output)
  • Sandboxed (isolated from system)
  • Runs on every node

4. Accounts

Two types:

External Accounts (EOAs)Contract Accounts
Controlled by private keysControlled by code
Can initiate transactionsCannot initiate (only respond)
No codeHas code
Human usersSmart contracts

How Ethereum Works

Transaction Flow

1. User signs transaction with private key
2. Transaction broadcast to network
3. Validators include in block
4. EVM executes the transaction
5. State is updated
6. Block is finalized

State Machine

Ethereum is a giant state machine:

State N + Transaction → State N+1

State includes:
- All account balances
- All contract storage
- All contract code

Every transaction transitions the world state.


Gas: Paying for Computation

Why Gas Exists

Problem: Infinite loops would halt the network.

Solution: Make computation cost money.

Gas = Unit of computation
Gas Price = ETH per unit of gas
Transaction Fee = Gas Used × Gas Price

Gas Economics

OperationGas Cost
Addition3 gas
Storage write (new)20,000 gas
Storage write (existing)5,000 gas
ETH transfer21,000 gas
Contract deployment32,000+ gas

EIP-1559 (London Upgrade)

New fee structure:

  • Base fee: Burned (destroyed)
  • Priority fee: Tip to validators
  • Max fee: Upper limit you're willing to pay
If block is >50% full: Base fee increases
If block is <50% full: Base fee decreases

Result: More predictable fees

From PoW to PoS: The Merge

The Merge (September 2022)

Ethereum switched from Proof-of-Work to Proof-of-Stake.

Before (PoW)After (PoS)
MinersValidators
Energy: ~80 TWh/yearEnergy: ~0.01 TWh/year
Hardware: GPUsHardware: Consumer PC
Minimum: Expensive rigsMinimum: 32 ETH

99.95% Energy Reduction

One of the largest decarbonization events in tech history.

How PoS Works

  1. Validators stake 32 ETH
  2. Randomly selected to propose blocks
  3. Other validators attest to validity
  4. Rewards for honest behavior
  5. Slashing for misbehavior

Key Differences from Bitcoin

AspectBitcoinEthereum
PurposeMoneyPlatform
Smart ContractsLimited ScriptTuring-complete
Block Time10 minutes12 seconds
Supply21M capNo hard cap (but issuance low)
StateUTXO setWorld state (accounts + storage)
ConsensusPoW (Nakamoto)PoS (Casper)
ProgrammingBitcoin ScriptSolidity, Vyper

The Ethereum Roadmap

Completed

  • The Merge (2022): PoW → PoS
  • Shapella (2023): Staking withdrawals enabled

In Progress

  • Proto-Danksharding (EIP-4844): Cheaper L2 data
  • Account Abstraction: Smart contract wallets
  • Single Slot Finality: Faster finalization

Future

  • Full Danksharding: Massive L2 scaling
  • Statelessness: Lighter nodes
  • Quantum Resistance: Post-quantum crypto

The Ethereum Ecosystem

Layer 2s

Scaling solutions that inherit Ethereum security:

  • Optimistic Rollups: Optimism, Arbitrum, Base
  • ZK Rollups: zkSync, Starknet, Polygon zkEVM

DeFi

Financial applications:

  • Exchanges (Uniswap)
  • Lending (Aave, Compound)
  • Stablecoins (DAI, USDC)

NFTs

Non-fungible tokens:

  • Digital art
  • Gaming assets
  • Identity/credentials

DAOs

Decentralized organizations:

  • Treasury management
  • Governance
  • Coordination

Criticisms and Challenges

Scalability

  • Base layer: ~30 TPS
  • Solution: Layer 2 rollups

Complexity

  • Larger attack surface than Bitcoin
  • More bugs possible
  • Harder to audit

Centralization Concerns

  • Staking concentration
  • Infrastructure (Infura, Alchemy)
  • MEV dynamics

Monetary Policy

  • No fixed supply
  • "Ultrasound money" vs. "Ethereum is not money"

Key Takeaways

  1. Ethereum extends Bitcoin's vision to general computation
  2. Smart contracts enable complex applications
  3. The EVM provides deterministic, sandboxed execution
  4. Gas prevents infinite loops and spam
  5. The Merge reduced energy use by 99.95%
  6. L2s are scaling Ethereum for mass adoption

Questions to Consider

  1. Is Ethereum a competitor to Bitcoin or complementary?
  2. What can't be decentralized on Ethereum?
  3. How decentralized is Ethereum really?
  4. Will L2s make the base layer irrelevant?