Fiveable

💱Blockchain and Cryptocurrency Unit 9 Review

QR code for Blockchain and Cryptocurrency practice questions

9.1 DApp Architecture and Components

9.1 DApp Architecture and Components

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
💱Blockchain and Cryptocurrency
Unit & Topic Study Guides

Decentralized Applications (DApps) blend web tech with blockchain magic. They're like regular apps, but with a twist: the backend runs on a blockchain network, making them super secure and resistant to tampering. This unique architecture opens up a world of possibilities for trustless, peer-to-peer interactions.

DApps are built on three main pillars: a user-friendly frontend, smart contracts for the backend logic, and decentralized storage for data. The blockchain network ties it all together, creating a robust, censorship-resistant ecosystem that's changing how we think about apps and user empowerment.

DApp Components

Decentralized Application (DApp) Architecture

  • DApp consists of a frontend user interface that interacts with a backend smart contract running on a decentralized blockchain network
  • Frontend can be built using standard web technologies (HTML, CSS, JavaScript) and frameworks (React, Angular)
  • Backend is composed of smart contracts that define the business logic and rules of the application
  • Smart contracts are deployed and executed on a blockchain network (Ethereum, EOS, TRON)

Decentralized Data Storage

  • Blockchain primarily stores transaction data and smart contract code, but has limited capacity for large data files
  • Decentralized storage solutions (IPFS, Swarm, Storj) are used to store and distribute application data
    • Data is split into smaller pieces, encrypted, and distributed across a network of nodes
    • Each piece of data is assigned a unique hash that can be used to retrieve it from the network
  • DApp references the data stored on decentralized storage using the unique hash within smart contract logic
Decentralized Application (DApp) Architecture, Blockchain and smart contract for IoT enabled smart agriculture [PeerJ]

Smart Contracts and Execution Environment

Smart Contract Fundamentals

  • Smart contracts are self-executing computer programs that run on a blockchain network
  • Define the rules, conditions, and actions of a DApp
    • Can automatically enforce the terms of an agreement between parties
    • Can trigger actions based on predefined conditions (time-based, event-based)
  • Written in high-level programming languages (Solidity for Ethereum, C++ for EOS)
  • Compiled into bytecode that can be executed by the blockchain's virtual machine
Decentralized Application (DApp) Architecture, A simple layer enabling a smart contract based web app

Ethereum Virtual Machine (EVM)

  • The EVM is a sandboxed, isolated environment for executing smart contract code on the Ethereum network
  • Provides a runtime environment for smart contracts that is separate from the main Ethereum network
    • Ensures the deterministic execution of smart contracts
    • Prevents unauthorized access to or modification of smart contract state
  • EVM is Turing-complete, meaning it can perform any computation that a Turing machine can
  • Other blockchain platforms (EOS, TRON) have their own virtual machines with similar functionalities

Decentralized Network Infrastructure

Peer-to-Peer (P2P) Network

  • DApps run on a decentralized network of nodes that communicate directly with each other
  • Each node in the network maintains a copy of the blockchain and participates in validating and recording transactions
  • P2P network enables the decentralized, trustless execution of smart contracts and storage of data
    • No central point of control or failure
    • Resistant to censorship and tampering
  • Nodes in the network are incentivized to participate through rewards (block rewards, transaction fees)

Web3 Provider and DApp Interaction

  • Web3 is a collection of libraries and protocols that enable the interaction between DApps and the blockchain
  • Web3 provider (MetaMask, Mist browser) acts as a bridge between the frontend and the blockchain
    • Enables users to securely manage their blockchain accounts and sign transactions
    • Injects a web3 object into the frontend JavaScript environment, allowing the DApp to interact with the blockchain
  • DApp frontend communicates with the smart contract backend through web3.js or similar libraries
    • Can call functions defined in the smart contract
    • Can listen for events emitted by the smart contract
    • Can send transactions to the smart contract, which are then validated and recorded on the blockchain
Pep mascot
Upgrade your Fiveable account to print any study guide

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Click below to go to billing portal → update your plan → choose Yearly → and select "Fiveable Share Plan". Only pay the difference

Plan is open to all students, teachers, parents, etc
Pep mascot
Upgrade your Fiveable account to export vocabulary

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Plan is open to all students, teachers, parents, etc
report an error
description

screenshots help us find and fix the issue faster (optional)

add screenshot

2,589 studying →