The Web3 Stack
The tech industry is bursting with stacks, be that the full-stack developer, LAMP, MEAN or Java stacks to name a few. These groups of tools or frameworks, or stacks as you may, are crucial building blocks upon which technology platforms are built using and deployed upon. There are no strict rules as to what is defined as a stack, it's simply the sets of technologies you use to support various parts of your organisation. The LAMP stack (Linux, Apache, MySQL, and PHP) is one of the best-known stacks, as it was a key building block adopted by Web2 companies such as Facebook, where each component of this stack has a clearly defined role.
In the LAMP stack:
- Linux is the underlying operating system (or Windows in the case of the lesser-known WAMP stack)
- Apache provides the webserver serving up the web pages
- MySQL provides the data persistence layer
- PHP provides the web application framework encapsulating the business logic and presentation layers
As the technology landscape has evolved so have the stacks, and in addition to these core web stacks, there are also stacks or applications for application performance monitoring (APM), business intelligence, load balancing, product analytics, machine learning, etc. — the list goes on.
If we switch our attention to Web3, the notion of a stack is less well defined, which is a testament to how early we are still with respect to the evolution of this technology. Additionally, given decentralization is a core theme of Web3, one can argue that a Web3 stack should be fully decentralized, which provides some interesting challenges to more traditional stacks.
If we examine the core application themes as they stand in Web3, they are dominated by:
- Cryptocurrencies and utility tokens
- Non-fungible tokens (NFTs)
- Decentralized finance (DeFi)
- Decentralized Autonomous Organisations (DAOs)
- Decentralized identity (DID)
- Workflow synchronisation
These are typically making use of the following foundational building blocks, which I think of as the Web3 foundation stack:
Consensus is the bedrock of the Web3 stack, serving as the mechanism to achieve agreement and synchronization across a decentralized network. Through consensus algorithms, such as Proof of Work (PoW) or Proof of Stake (PoS), nodes in the network reach a common understanding of the blockchain's state. This distributed agreement eliminates the need for a central authority, ensuring security and immutability.
In the Web3 stack, data availability is paramount. Decentralized networks use ingenious protocols like InterPlanetary File System (IPFS) to store and distribute data across multiple nodes. This approach fosters redundancy, making data retrieval more reliable, efficient, and censorship-resistant compared to traditional centralized storage systems.
Smart contracts play a pivotal role in the execution layer of Web3. These self-executing pieces of code reside on the blockchain and automatically execute predefined actions when specific conditions are met. Smart contracts enable decentralized applications to operate autonomously, free from human interference, enhancing transparency and efficiency.
Decentralized storage solutions are an integral part of this. Instead of relying on centralized servers, blockchain-based networks leverage decentralized storage platforms like Filecoin. This ensures that data is distributed across a network of nodes, minimizing the risk of data loss and unauthorized access.
Web3's decentralized applications, or dApps, are user-facing applications that operate on the blockchain. These applications unlock a myriad of possibilities across various domains, including finance, supply chain, gaming, and more. Decentralized apps offer greater security, accessibility, and inclusivity, as they are not controlled by any central entity.
Web3 wallets are instrumental in facilitating user interactions with the decentralized web. These digital wallets store private keys, which grant access to users' blockchain assets and enable seamless engagement with dApps. Web3 wallets come in various forms, ranging from software wallets like MetaMask to hardware wallets like Ledger.
There are additional components, for example, interoperability, layer2s and naming protocols, but they won't be discussed here.
In a nutshell, the distributed ledger or blockchain maintains the state of the application. This is underpinned by a consensus and data availability layer, which are enablers for the core ledger technology, rather than the specific application being built out. The execution layer sits on top of these layers providing the capabilities to actually run applications.
The logic that runs these applications is embedded in smart contracts which define how the decentralized applications (DApps) themselves run. Wallet technologies may also be used by users to interact with the DApps depending on their specific use case.They may also make use of decentralized storage technologies to store data off-chain in a decentralized manner.
After this point, the foundation stack ends and more traditional web technologies come into play, as an integration layer is required to bridge DApps to users or other services. This is where front-end integration libraries such Hardhat or Truffle come in, or back-end libraries such as our very own Web3j library.
It is here that with the creation of the integration applications that centralization starts to creep in, as we're now transitioning to an established, traditional stack for the execution of these applications. These applications likely run within virtual machine containers on top of an orchestration platform such as Kubernetes in the cloud. Where this cloud exists in a data centre controlled by the likes of Amazon, Microsoft or Google. Here, new opportunities for decentralization start to emerge, which is an area that is lesser discussed at present, but will likely become commonplace as the Web3 industry evolves.
The Web3 Index, provides an interesting snapshot of some of the companies and protocols building out this next iteration of decentralized platform building blocks. Many of these companies have already been running for a number of years in relative obscurity compared with some of the better-known Web3 projects.
Their areas of focus include decentralized services for:
- APIs (The Graph)
- Permanent storage of data and serverless applications (Arweave)
- Wireless infrastructure (Helium)
- Cloud computing marketplace (Akash)
- Video streaming (Livepeer)
These types of services will facilitate truly decentralized services and applications. If we consider the integration layer discussed above, using these additional services, one could deploy the services onto Arweave in the case of front-end applications, or run them on cloud services provisioned by Akash in the case of server-side applications which rely on The Graph for querying various blockchain services. Video content could also be streamed using Livepeer and users could access these platforms via wireless infrastructure provided by Helium.
It will take time for these services to mature, and for winners to emerge, but it really helps to paint a more vivid picture of how Web3 technology is not just about blockchains and tokens, but fully decentralized applications and services that run entirely on decentralized infrastructure as I've outlined here with all of the resiliency features we have become accustomed to with public networks like Ethereum.
This is another reason why I'm incredibly excited about the potential of Web3 and why when you dig beneath the surface of the dominant technology stacks in existence today, you can see that we're only just getting started.
If you'd like to dig deeper into what I've discussed here, I encourage you to check out the episode of Web3 Innovator's I did with Doug Petkanics, founder and CEO of Livepeer, the decentralized video streaming network.