Blockchain Basics Module
Smart Contracts & Execution Layer
How on-chain programs execute, mutate state, and compose with each other
Core path (recommended): What is a smart contract → Deployment → Execution layer → ABI → State mutation/atomicity → Logs/indexers → Composability
This is the required path to complete the module. All other articles are optional.
Start core pathWhat this module covers
Smart contracts are public programs with persistent state and callable interfaces.
This module covers how contracts are deployed and addressed, how execution is deterministic, how ABIs enable interaction, how calls mutate state atomically (commit or revert), and how logs/indexers make execution observable.
Hard stop: before protocol-specific languages, security audits, and advanced DeFi patterns.
This module is for
- Anyone who wants a correct mental model of on-chain program execution
- Developers integrating with contracts via ABI and RPC
- Users trying to understand receipts, reverts, and event logs
This module is not
- Protocol-specific languages and chain-specific toolchains
- Security audits and exploit education
- Advanced DeFi patterns and deep protocol design
Stage 0
Orientation: On-chain Programs
What makes a program “on-chain”?
See a smart contract as a public program with persistent state and a callable interface — not an “automatic agreement”.
Core
Smart Contract
Supporting (intuition)
Optional intuition and mental models.
Code vs Deployment
Programs vs Accounts (Intuition)
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Where Contracts Appear in Explorers (Conceptual)
You can move on when:
- You can explain what makes a program “on-chain”.
- You can distinguish code from deployment and addressability.
- You can explain why contracts are not “just scripts”.
Stage 1
Deployment & Contract Identities
How do contracts come into existence and get addressed?
Treat a contract as a special account-like identity with code and an address.
Core
Contract Deployment Basics
Contract Accounts vs EOAs
Supporting (intuition)
Optional intuition and mental models.
Why Contracts Can’t “Sign” Transactions
Who Pays for Deployment and Execution
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Deployment Transactions in Explorers
You can move on when:
- You can explain deployment as creating an addressable contract identity.
- You can explain why EOAs and contracts behave differently.
- You can explain why contracts can’t sign transactions.
Stage 2
Execution Environment
Where and how does contract code actually run?
Treat the execution layer as a deterministic rule-application machine, not a server.
Core
Execution Layer
Determinism and Why It Matters
Supporting (intuition)
Optional intuition and mental models.
Gas Metering During Execution
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Execution Traces (Conceptual)
You can move on when:
- You can describe what the execution layer does at a high level.
- You can explain why determinism is required.
- You can explain why execution is metered (limits and safety).
Stage 3
Contract Interfaces (ABI)
How do users, apps, and contracts know how to talk to a contract?
Treat ABI as an interface contract, not just a dev artifact.
Core
ABI Explained
Why ABIs Matter for Wallets and dApps
Supporting (intuition)
Optional intuition and mental models.
Encoding Calldata and Decoding Results
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
ABI Usage in Wallets (Conceptual)
You can move on when:
- You can explain ABI as a description of callable functions and return types.
- You can explain how wallets/dApps encode intent into calls.
- You can explain why decoding matters for UX.
Stage 4
State Mutation & Atomicity
How do contract calls change state — safely or not at all?
Lock in: read → compute → write → commit or revert.
Core
Reads vs Writes: How Calls Mutate State
Reverts, Errors, and Atomicity
Supporting (intuition)
Optional intuition and mental models.
Storage vs Memory
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Transaction Receipts and Status Flags
You can move on when:
- You can explain reads vs writes at a high level.
- You can explain what a revert means for state changes.
- You can explain why atomicity matters for UX and safety.
Stage 5
Events, Logs & Observability
How do apps know what happened during execution?
Understand that logs ≠ state, but logs make execution observable for apps.
Core
Events and Logs
Indexers and Event-Driven Apps
Supporting (intuition)
Optional intuition and mental models.
Reading Contract History: Receipts and Traces
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Event Logs in Explorers
You can move on when:
- You can explain why apps rely on logs/events.
- You can explain what indexers do at a high level.
- You can connect receipts/traces to observability.
Stage 6
Composability & Shared State
Why can contracts build on each other — and why is that risky?
Treat composability as a system property of shared state.
Core
Composability Basics
Supporting (intuition)
Optional intuition and mental models.
Reentrancy and Call Stack Intuition
Permissioning and Access Control Basics
Reference (how to observe the system)
Optional verification via explorers, clients, wallets, and documentation.
Common Composability Failures (Conceptual)
You can move on when:
- You can explain why shared state enables contract-to-contract calls.
- You can explain why composability creates new failure modes.
- You can explain why permissions and access control matter.
Stage 7
Boundaries & Next Modules
What execution enables — and what it does not solve?
Close before languages/toolchains, audits, and advanced DeFi patterns; bridge into scaling and advanced security topics.
You now have the execution lens: deploy → call → execute deterministically → commit/revert → observe via logs → compose via shared state.
Hard stop (covered later)
- Protocol-specific languages and toolchains
- Security audits and exploit education
- Advanced DeFi patterns
Leads naturally to
- Fees & Incentives (cost of execution)
- Scaling & Layer 2 (execution off-chain)
- Security & Auditing (advanced)
Supporting (intuition)
Optional intuition and mental models.
State Models and Storage Layout
Fee Markets and Gas Pricing
Nodes, RPC, and Data Serving
Completion checklist
If you can answer these, you have the module’s mental model.
- What makes a program “on-chain” compared to an off-chain service?
- How do contracts get deployed and addressed, and how do they differ from EOAs?
- What does the execution layer do, and why must it be deterministic?
- What is an ABI and how do wallets/dApps use it?
- How do calls mutate state and why do reverts enforce atomicity?
- Why are logs crucial for apps, and what do indexers do?
- Why does composability exist and what risks does it introduce?
FAQ
Key concepts
Back to Blockchain Basics
Blockchain Basics hub
Next module
Scaling & Layer 2
How systems scale beyond base-layer throughput constraints.