Core Infrastructure

12 min readUpdated: March 2026

Every DeFi protocol, every NFT marketplace, every DAO governance vote runs on the same foundational layer: blockchain infrastructure. Understanding this layer is the difference between building on solid ground and building on assumptions.

Blockchain Architecture

A blockchain is a linked list of data structures called blocks, where each block contains a set of transactions and a cryptographic reference (hash) to the previous block. This hash-linking creates tamper-evidence: changing any historical block invalidates all subsequent hashes, making the alteration immediately detectable by any node in the network.

Within each block, transactions are organized in a Merkle tree — a binary tree of hashes that allows any single transaction to be verified in O(log n) time without downloading the entire block. The Merkle root, a single hash representing all transactions in the block, is stored in the block header alongside a timestamp, a nonce, and the parent block hash.

Node types in a blockchain network each serve different roles:

  • Full nodes download and validate every block and transaction, maintaining the complete chain state. They enforce consensus rules and provide the strongest security guarantees.
  • Light nodes (SPV nodes) download only block headers, trusting full nodes for transaction data. Used in mobile wallets and resource-constrained environments.
  • Archive nodes store not just the current state but every historical state snapshot. Expensive to run (Ethereum archive nodes require 12TB+) but essential for indexers, explorers, and analytics platforms.

Blockchain Structure

Block N-2
Hash: 0x4a3f...
Prev: Genesis
1,847 txs
Merkle root
Block N-1
Hash: 0x7c91...
Prev: 0x4a3f...
2,103 txs
Merkle root
Block N
Hash: 0x2e58...
Prev: 0x7c91...
1,956 txs
Merkle root

Each block references its parent via cryptographic hash — altering any block invalidates all descendants

Smart Contracts

Smart contracts are programs stored on the blockchain that execute deterministically when called by a transaction. Because every node in the network runs the same code and reaches the same result, contract execution requires no trusted third party. As of early 2026, Ethereum alone secures over $30 billion in value through smart contracts.

The Ethereum Virtual Machine (EVM) is the runtime environment for smart contracts on Ethereum and all EVM-compatible chains (Polygon, Arbitrum, Optimism, BNB Chain, Avalanche C-Chain). Contracts are written in Solidity or Vyper, compiled to EVM bytecode, and deployed to a specific contract address. Key Solidity concepts include:

  • State variables: persistent data stored in contract storage (expensive to read/write)
  • Functions: executable logic that can read state, modify state, or transfer value
  • Modifiers: reusable access control patterns (e.g., onlyOwner)
  • Events: logs emitted during execution, used by off-chain indexers like The Graph

Gas Mechanics

Every EVM operation has a gas cost — a unit of computational work. Users pay gas fees in ETH to compensate validators for executing their transactions. Since EIP-1559 (August 2021), fees split into a base fee (burned, reducing ETH supply) and a priority fee (paid to validators). Complex smart contract interactions with many storage writes cost significantly more than simple token transfers. Gas optimization is a specialized skill in high demand across DeFi protocol teams.

Security Considerations

Smart contract bugs are permanent and often irreversible. Major vulnerability classes include:

  • Reentrancy: an external contract recursively calls back into the vulnerable function before the first execution completes. The DAO hack (2016, $60M) exploited this.
  • Oracle manipulation: protocols that rely on spot prices from a single DEX pool are vulnerable to flash loan-driven price manipulation. The Mango Markets exploit ($130M, 2022) used this vector.
  • Access control failures: missing or incorrectly implemented permission checks on administrative functions.

Formal verification, independent security audits, and bug bounty programs (Immunefi hosts $200M+ in active bounties) are standard practice for production DeFi protocols.

Consensus Mechanisms

Consensus mechanisms define how a decentralized network agrees on the canonical state of the blockchain — determining which transactions are valid and in what order they occurred.

Proof of Work (PoW)

PoW requires miners to expend computational energy to propose new blocks, solving a hash puzzle that requires significant trial-and-error. The chain with the most accumulated work is considered canonical. Bitcoin uses PoW. Its security property is straightforward: attacking the chain requires controlling 51% of the network's total hash rate, which for Bitcoin represents billions of dollars in hardware and electricity.

Proof of Stake (PoS)

PoS replaces computational work with economic stake. Validators lock up (stake) a deposit of cryptocurrency as collateral and are selected to propose and attest to blocks in proportion to their stake. Ethereum's transition from PoW to PoS ("The Merge", September 2022) reduced the network's energy consumption by 99.95% — from ~112 TWh/year to under 0.01 TWh/year — while increasing throughput and maintaining security.

Consensus Mechanism Comparison

MetricPoWPoSDPoS
ExamplesBitcoinEthereumEOS, TRON
Energy useVery highMinimalMinimal
Finality time~60 min~12 sec~3 sec
Attack cost51% hashrate33% stake33% delegates
DecentralizationHighHighModerate

Alternative Consensus Models

Other networks have developed specialized consensus mechanisms optimized for different trade-offs:

  • Delegated PoS (DPoS): token holders vote for a small set of delegates who produce blocks. Faster finality but reduced decentralization.
  • Practical Byzantine Fault Tolerance (pBFT): used in permissioned chains (Hyperledger Fabric). Provides instant finality but requires known validator sets.
  • Proof of History (Solana): a cryptographic clock that orders events before consensus, enabling Solana's 65,000+ TPS throughput.

Network Security

Blockchain security is ultimately economic. A 51% attack on Ethereum's PoS chain would require acquiring 33%+ of staked ETH — currently over $30B in value — and the attacker's stake would be slashed (destroyed) if the attack is detected. The cost of attack exceeds any realistic gain, creating a strong security guarantee.

Validators operate under slashing conditions: if a validator signs conflicting attestations or goes offline repeatedly, a portion of their staked ETH is automatically destroyed. This aligns validator incentives with honest participation. As of early 2026, over 1 million validator instances are active on Ethereum, providing exceptional redundancy.

At the application layer, formal verification (mathematical proofs of contract correctness) and independent security audits by firms like Trail of Bits, OpenZeppelin, and Certora are standard practice for protocols managing significant TVL. Bug bounty programs through Immunefi provide additional coverage through crowdsourced security research.

Key Takeaways

  • Blockchains are cryptographically linked lists of blocks — altering history requires recomputing all subsequent hashes, detectable by every node
  • Smart contracts are immutable programs that execute deterministically; $30B+ secured on Ethereum alone
  • Gas mechanics price computational work; EIP-1559 burns the base fee, making ETH deflationary under load
  • Ethereum's Merge (Sept 2022) cut energy use by 99.95%, transitioning from PoW to PoS without downtime
  • Economic security (slashing, attack cost) makes attacking PoS networks more expensive than any realistic gain