Bitcoin Software Layer Architecture

In this article, we learn about the major software layers that make up the Bitcoin network and any blockchain in general.

Table of contents.

  1. Introduction.
  2. Layer 1.
  3. Layer 2.
  4. Layer 3.
  5. Layer 4.
  6. Summary.
  7. References.


In this article, we will go through the main software layers of the Bitcoin blockchain network. This will give us a higher level of understanding of Bitcoin while incorporating future technological advancements that can be made to Bitcoin to make it more secure, immutable, and decentralized.

Before we start, we should have the following image in mind as we describe different layers and the part they play to make it work;


Note that this is just a generalized overview of how the whole network is structured. In later articles, we will learn about its peer-to-peer network architecture and the bitcoin core.

The source code of Bitcoin and Ethereum blockchains is open source anyone can access it in the links provided in the references section. This allows anyone to contribute to it, such transparency is key for participants to trust the network.

Layer 1

This is where the actual distributed ledger that stores all executed transactions are located. It runs on top of the TCP/IP network layer. This layer also defines how new blocks are verified through mining and consensus. The protocol on how transactions are propagated to the entire network is also included here. This layer holds the original Bitcoin as designed back in 2009 by Satoshi Nakamoto.

A BIP(Bitcoin Improvement Proposal) is a document that lists modifications made to a blockchain to improve its functionality in some way. A transaction is said to be On-Chain if it was executed on the bitcoin L1 network. We will also learn about BIPs in later articles, in the meantime, we can check out the link in the references section regarding Bitcoin BIPS. For the Ethereum blockchain, we have EIPs. This is also included in the references section.

This layer suffers from problems such as high transaction fees, this issue has resulted in new chains being derived from this layer's source code.
Layer 1 Bitcoin is also slow, the hash rate is higher and thus miners employ a lot of computational power as PoW(Proof-of-Work). Bitcoin's consensus algorithm(PoW) consumes a lot of energy. Note that as the price of bitcoin changes in the financial markets, the transaction fee does not change.

The mentioned issues above give rise to layer 2 protocols which we discuss in the following section.

Layer 2

We have seen the shortcomings of Layer 1 Bitcoin, and as innovation never sleeps, protocols were created on top of the original Bitcoin to make it faster in terms of processing transactions and reducing transaction costs. This is also seen as a cause for the scalability issues of Bitcoin.

In later articles we shall discuss chain splits, this is whereby the main chain splits into two chains, it can be caused by disagreements between network participants or two miners solving the puzzle at the same time.
An example of Layer 2 cryptocurrency is Bitcoin Cash, a derivative of the original L1 Bitcoin with lower transaction fees and faster transactions.

Layer 2 solutions solve the previously discussed issues from L1 by processing transactions off-chain and then updating the L1 decentralized ledger in a batch mode.

Layer 2s can also be sidechain solutions that support interoperability between different blockchains or Off-chain solutions whose operations happen outside the main L1. Transactions in L2 Bitcoin chains are faster and cheaper compared to their L1 counterparts.

Side-chain protocols
These perform different tasks and allow new feature implementations such as smart contracts witouth impacting the main Bitcoin protocol.
These also support interoperability between other blockchains.
Applications of side chains include;

  • Side-chains are able to support high data or transaction-intensive applications. For example gaming payment systems whereby we have multiple users simultaneously earning and spending tokens.
  • Side-chains can also be used in supply-chain tracking systems which are data intensive.
  • Domain-specific side-chains allow for quick feature iterations. This is achieved by finding ways around the consensus protocol used on public blockchain networks.

Off-chain protocols
Off-chain transactions are transactions taking place outside the main Bitcoin protocol. As discussed in the previous section, the Bitcoin core has bottlenecks that need to be navigated. This is how they are navigated.

Transactions on this protocol are faster, this is achieved by the creation of temporary instances outside the main core until a final settlement is directly initiated on the main network.

Layer 3

In the bitcoin layered model, this is the application layer. This layer allows developers to create decentralized applications on top of the blockchain. It is comprised of a server/client interface and a backend that serves as an interface to L1 and L2.

This is similar to how an app can be built on top of AWS or GCP. In building an app most critical aspects such as cryptography are outsourced, so as authentication, hosting, etc. All these services are controlled by a centralized entity(Amazon, Google).

Layer 3 of a blockchain solves this by allowing a single identity for everything. By having a wallet, a participant is able to use an app to interact with the blockchain. In the case of Ethereum, accounts are used as interfaces to the blockchain.

All this is functionality is evident in Solana and Etherium blockchain networks, L1 Bitcoin is meant for the storage and exchange of value.

Some components in this layer include;

  • Opensource APIs - these APIs are free to use by any developer wishing to use the backend services provided while ensuring privacy and fungibility.
    Examples include Wasabi Backend., Bitcore, and BTCPAY among others.

  • Commercial APIs are APIs that are proprietery to their creators. Examples include Bitpay - a bitcoin payment service provider, and Blockchain a crypto wallet and exchange.

  • Decentralized protocols are used in the creation and management of decentralized data in p2p markets. They can also be used in the tokenization of assets created on the Bitcoin protocol.

Layer 4

This layer allows user applications such as enterprise solutions to operate on the blockchain. These could be payment processors, wallets, escrows, and other financial products.

Layer 3 and 4 leverage Layer 2 protocols so they can deliver one of the most important aspects of a blockchain, decentralization, that is provided by bitcoin and add scalability to it.

Layer 4 protocols are applicable in multiple fields such as finance(crypto exchanges such as Binance, Coinbase), supply chains(drug supply chains, purchase orders, invoices, manufacturing), and blockchains cities such as Santiago de Chile, Toronto, Tel Aviv, Oslo, Milan, London, and Stockholm among others.


A blockchain consists of three major layers, layers I, II, and III. The base layer - Layer 1 of Bitcoin involves the underlying bitcoin architecture. Layer 2 involves protocols used in the network. Layer 3 is categorized by decentralized applications built on top of blockchain technology.