Ethereum and Smart Contracts
What Ethereum is, how smart contracts run on it, what ether is used for, and the main risks of code that cannot easily be changed.
Bitcoin showed that people can send value over the internet without a bank in the middle. Ethereum took the idea further: what if a blockchain could run not just payments, but any program? Ethereum launched in 2015 and became the best-known platform for smart contracts, programs that live on a blockchain and run exactly as written.
What Ethereum is
Ethereum is a public blockchain maintained by many independent computers around the world. Like Bitcoin, it keeps a shared record of balances and transactions. Unlike Bitcoin, it also keeps the code and data of programs, and every node can execute that code and arrive at the same result.
The native currency of Ethereum is ether (ETH). It has two main jobs:
- paying fees for transactions and for running smart contracts, known as gas
- securing the network through staking, since Ethereum uses proof of stake
What a smart contract is
A smart contract is a program deployed to the blockchain at its own address. Once deployed, anyone can send it a transaction to call one of its functions. The contract then follows its code: it can hold funds, send them, record data, or call other contracts.
A simple way to picture it is a vending machine. You put in the right input, and the machine gives the output defined in advance, without a shop assistant deciding whether to serve you. The word contract is a bit misleading: a smart contract is not a legal agreement, just code with predictable behavior.
How they run
Smart contracts on Ethereum run inside the Ethereum Virtual Machine (EVM), a standard environment that every node implements. Developers usually write contracts in a language such as Solidity and compile them into EVM code. Because every node runs the same code on the same inputs, they all reach the same new state.
Every operation in the EVM has a cost in gas. This protects the network from programs that run forever or overload it: whoever starts a transaction pays for the computation it uses.
What makes them different from regular programs
- Transparency: contract code and its activity are visible on the blockchain.
- Immutability: deployed code generally cannot be edited. Some contracts are built to be upgradable, which means someone holds the power to change them.
- No central operator: once deployed, a contract keeps working as long as the network runs.
- Composability: contracts can call one another, so developers build new services on top of existing ones.
What people build with smart contracts
- Tokens: many cryptocurrencies and stablecoins are smart contracts that follow common standards, such as ERC-20 for interchangeable tokens.
- Decentralized exchanges and lending protocols, often grouped under the name DeFi.
- NFTs: unique tokens that represent ownership of a specific item, following standards such as ERC-721.
- DAOs: organizations where members vote through contracts on how shared funds are used.
Key milestones
Ethereum changes through network upgrades that node operators adopt. A few important ones:
- 2015: Ethereum mainnet launched, using proof of work.
- August 2021: the London upgrade introduced EIP-1559, which changed how fees work and began burning part of each fee.
- September 2022: The Merge moved Ethereum from proof of work to proof of stake.
Later upgrades continue to change details of the network, and upcoming ones appear in the events calendar.
Risks to understand
The fact that code runs exactly as written is both a strength and a danger.
- Bugs: if a contract contains a mistake, attackers can exploit it, and stolen funds are usually not recoverable.
- Upgrade keys: if a team can change a contract, users depend on that team acting honestly and keeping its keys safe.
- Malicious contracts: scammers deploy contracts that look legitimate but drain the wallets of anyone who approves them.
- Irreversibility: a transaction sent to the wrong address or to a harmful contract cannot be undone.
An audit by a security firm reduces risk but does not remove it. Audited contracts have been exploited too.
Scaling and layer 2
Because every node executes every transaction, the main Ethereum network has limited capacity, and fees rise when demand is high. To handle more activity, many projects use layer 2 networks that process transactions separately and then post the results back to Ethereum.
Key points
- Ethereum is a blockchain that runs programs called smart contracts.
- Ether pays for gas and secures the network through staking.
- Smart contracts are transparent and hard to change, which helps trust but makes bugs costly.
- Tokens, DeFi, NFTs and DAOs are all built on smart contracts.