What Is Web3 Infrastructure and How Is It Resolving Web2 Vulnerabilities?

By Anush Jafer
13 Min Read

Unequivocally, the evolution from the first iteration of the static read-only web to web2 was revolutionary. Despite its merits, the omnipresent interactive and social web comes with its set of pitfalls. Virtually every legacy web2 application, whether it be Meta, Gmail, or Twitter, is hosted on centralized servers owned by a handful of large corporations. This concentration of power not only diminishes user privacy and security but also turns the online landscape into an oligopoly where the terms of service dictate how users’ data is treated. Web3 infrastructure aims to circumnavigate these core issues by radically transferring access, ownership, and governance to the user. To understand the fundamental differences between web2 and web3 in greater depth, read the below article.

Recommended to read : Blockchain Revolution: Internet’s Transition from Web2 to Web3

The internet as we know it is at the precipice of a paradigm shift. Web3 aims to decentralize web applications and bypass the vulnerabilities of the current centralized hosting infrastructure. To do this, developers are tasked with implementing a new tech stack dedicated to web3 that begins with the base blockchain network layer all the way to the use case and access layers. 

Before we touch upon the issues of web2 that web3 addresses, this article will take a closer look at the different infrastructure layers that represent the building blocks to power the next generation, decentralized web. 

The Web3 Tech Stack and Layers

Web3 strives to facilitate ownership, privacy, and trust in the digital realm by overcoming the perils of centralization. In order for this vision to materialize, web3 requires infrastructure that upholds the ethos of decentralization while simplifying the onboarding process for new users. Web3 infrastructure refers to a tech stack that includes a network of interconnected protocols, tools, and solutions that developers require to build decentralized applications (dApps). 

The web3 architecture shares similarities with traditional web2 tech stacks, specifically in front-end development. However, building composable, decentralized, trustless applications require a fundamentally different core infrastructure and backend tools. To better understand the tech stack, it is useful to visualize the different layers to build a dApp at a high level. 

Image via: Infura 

Layer 1 or the Protocol Layer 

At the bottom of the web3 infrastructure architecture are blockchains. This layer is often referred to as the data or the protocol layer and is the foundation for web3 applications. This layer represents a fundamental difference in how data is stored between web2 and web3. Data on web2 applications are stored on centralized databases with closed access that are owned and operated by companies. On the other hand, web3 applications are built on top of decentralized, and permissionless state machines for data storage (user accounts and balances). This data layer is powered by blockchain technology. To learn more about why and how blockchain technology is viewed as a trust-building protocol.

Recommended to read : Blockchain Technology: Fostering Trust in a Digital World

Programmable layer 1 blockchain networks like Ethereum, Solana, Avalanche, Binance Smart Chain, etc. facilitate the storage and execution of smart contracts. In the context of web3, smart contracts operate in the backend of an application. It defines application logic and controls the overall functionality of the application. Smart contracts are autonomous, self-executing codes with predefined rules and conditions. Since smart contracts run on the blockchain’s execution layer, the lines of code are tamper-proof.

This means that dApps are censorship-resistant and cannot be shut down by a single entity. Therefore, smart contracts effectively take over the client-server architecture used in web2 where the code controlling the application is operated by a company and can be amended at any time. Depending on the blockchain network, smart contract code is written using different programming languages like Solidity and Vyper (Ethereum and EVM-compatible chains) or Rust (Solana and non-EVM chains).  

In addition to the Layer 1 blockchains in the protocol layer, developers have created several Layer 2 scaling solutions on top of the base layer to alleviate congestion. Layer 2 blockchains like Polygon, Optimism, Arbitrum, etc, maintain security and decentralization while providing faster transactions and higher throughput. 

The Web3 Infrastructure layer

The infrastructure layer sits on top of the protocol layer. This layer is composed of interoperable tools and solutions that enable users and dApps to interact with a blockchain network. It is a critical and diverse layer, with projects building on a broad range of tasks. This includes API or data access through node providers, smart contract auditing software, decentralized storage networks, DeFi primitives, identity solutions, etc. 

For example, let’s take a look at node providers forming an integral part of the infrastructure layer. For a dApp to communicate with a blockchain and access its data, it must connect to a node on the network. Running a self-hosted node to retrieve blockchain data can be time-consuming and costly. Therefore, node providers like AlchemyQuicknodeInfuraand Moralis, to name a few, represent a solution for developers to focus on building out application features rather than maintaining nodes. 

Another example of a pivotal solution in the infrastructure layer is decentralized file storage networks, a topic that we at DroomDroom have covered in the past. Web3 aims to negate centralized databases. Layer 1 Blockchain’s distributed, transparent and trustless nature makes it an ideal solution for data storage. However, storing large files like images and videos on the base chain can be impractical due to limits on block sizes. This is where dedicated decentralized file storage networks like Arweave, IPFS, Storj, Filecoin, and Sia come into play. These platforms not only solve the data management issue for web3 apps but also ensures data security and immutability. 

The web3 revolution is still in its nascency. Therefore, the entire infrastructure and tech stack is constantly evolving to deploy apps more seamlessly. New projects and protocols are emerging to make use of the interoperability and modularity of web3 to achieve this goal.

While each project in the infrastructure layer can act as a standalone application, a developer can use an amalgamation of these tools to construct a holistic dApp. For example, the decentralized blogging platform, Mirror, uses Arveawe for data storage. At the same time, the platform allows authors to be paid in crypto by leveraging Ethereum and tokens are distributed to their ENS (Ethereum Name Service) address. 

Presentation and Access Layers

The presentation layer is also known as the front-end or user interface layer. The front-end of many dApps is similar to how web2 apps are built. Developers use the same set of programming libraries such as React.js to create user interfaces. The major difference between web2 and web3 in the presentation layer is how frontend applications communicate with the backend. 

Unlike web2 applications’ client-server architecture which relies on HyperText Transfer Protocol libraries (HTTP) to fetch data, blockchain-based applications are based on a distributed network of computers or nodes. Therefore, to enable the front-end to communicate with the blockchain, web3 apps are handled by custom JavaScript libraries like ether.js and web3.js. 

The access layer represents the entry point into the world of web3 applications. Unlike the traditional sign-in process in web2 through username/email and password, web3 completely revamps the identity management process. DApp users can sign in through their web3 wallets and authenticate their identity through their unique public-private keypair. Wallet-based authentications give users the authority to control their online identity, privacy, and data, away from the purview of big tech companies managing your personal data. 

Closing Thoughts 

Web2 reconstructed social interactions by bringing creators and consumers of information, goods, and services closer together. Platforms like Meta, Twitter, Instagram, and Amazon brought global peer-to-peer interactions to the fore. However, the simplicity of web2 applications comes with a massive tradeoff of a middleman acting as a trusted intermediary between users. 

Ultimately, these middlemen can dictate all the rules and control the data of their users. Therefore, today’s web applications are highly centralized which comes with a slew of drawbacks for its users. Users are subject to the whims of the company who decides how data is handled, censored, or removed. Countless data breaches and mismanagement have upended users’ privacy. These concerns have been vindicated by several incidents like the Cambridge Analytica scandal and data leaks from established web2 companies from Uber to LinkedIn. 

Web3 addresses these downsides by reinventing how we build and interact with applications from the ground up. At its core, the next generation of the internet is built by a set of protocols with blockchain technology as its foundation. Web3 primarily remodels the way the internet is wired in the backend. As data is distributed and managed collaboratively by a network of computers, web3 creates a trustless, open-source, immutable, and decentralized Internet. This next generation of the web breaks away from the shackles of corporations while transferring power to the user. 

How does Web3 work?

Web3 is the next generation of the internet that runs on blockchain technology at its core. It represents a radical shift from the current centralized web2 paradigm to a more open, secure, and trustless ecosystem. 

What are dApps?

Decentralized applications or dApps are a new breed of software applications that run on blockchain networks rather than relying on centralized servers. dApps are immutable and censorship-resistant through the use of decentralized protocols and smart contracts. This empowers users with greater control over their data while enabling true peer-to-peer interactions.

Why is Web3 important?

Web3 is important because addresses the pitfalls of the predominantly centralized web of today such as lack of data ownership, security, and unjust censorship. Web3 facilitates an internet that is based on decentralization, enhanced privacy, and a user-centric model.