Web3 Reference Architecture

Eugene Zaid
8 min readFeb 7, 2022

--

Without a doubt, Web3 is one of the hottest topics being discussed today as the mainstream industry begins to acknowledge the potential of Web3. One of the angles that do not seem to be getting much coverage however, is Web3 architecture. It is assumed that Web3 will undo the current fabric of the Internet and will replace it with blockchain, solving lots of existing problems in the process. However, as a first step we need to articulate what Web3 is composed of. This article defines Reference Architecture of Web3, articulating the main building blocks along with the key interactions between them. It is not intended as a deep-dive technical reference page, like the one here.

Definition. There are plenty of definitions about (e.g. here and here), but the general consensus is that Web3 represents the next iteration of the web, that it will be underpinned by the blockchain technology and protocols, remove existing intermediaries and

… that [it] will be decentralized, open, and of greater utility.

In a way, this sounds a lot like how its predecessors were defined some 20+ years ago, and just like Web1.0 and Web2.0 we can expect that Web3 have a material impact on the business models across most industries. However, it did take well over a decade to develop and mature services, create relevant architectures, design patterns, controls, monitoring and other essential ingredients before the promise was fulfilled. I think it is reasonable to expect that Web3 will go through a similar maturity journey over the coming years. Reference Architecture is one of the methods that can be used to guide and track this evolution across specific functional and non-functional areas.

Everything is connected. Nothing exists in the vacuum and Web3 is not an exception. Just like Web2 and cloud technologies that it increasingly relies on are fundamentally a collection of services hosted in someone else’s physical data centres, Web3 is intrinsically linked to the real (“off-chain”) world. Web3 applications consume and complement various services provided outside of the blockchain-centric ecosystem. This includes data centres and IaaS/PaaS services that they host, operational risk, AML and fraud related services, treasury functions, market data and so on. Some of the distinctions will likely blur over time, creating complementary “on-chain” and “off-chain” ecosystems. Again, Reference Architecture is one of the useful methods to articulate the interdependencies and hand-offs between the two worlds.

Reference Architecture. The following diagram represents the proposed Web3 Reference Architecture. Conceptually, there are 3 distinct layers: Channels, Apps and Infrastructure & Utilities

Web3 Reference Architecture
Web3 Reference Architecture

Channels. The major components of this layer are the actual UIs that users interact with via web browsers or mobile apps as well as wallets. The latter are intrinsically linked to the “off-chain” world to fund them with fiat currencies, onboard users (and related services, e.g. KYC, where appropriate) and so on.

  • UIs. Most of these are typical react front-ends, utilising Web3.js and similar libraries.
  • Wallets. They come in different shapes and sizes but in the end of the day provide the same functionality: enable you to store and transact with your digital assets in a safe and secure manner. In a Web3 world a wallet represents your identity (identities) and the token balances.

Apps. This is were Distributed Applications (DApps) and Smart Contracts are logically located, catering for an increasing number of use cases. They interact with the underlying Infrastructure resources, as well as support user interactions via the Channels. Just like the Infrastructure components, DApps and Smart Contract need to run somewhere; hence, reliance on the hyperscalers and various “off-chain” service providers to ensure that functional and non-functional requirements are met.

Infrastructure & Utilities. There are 3 main capability bundles within this layer, Front-end Enablers, Blockchain Core and Utilities

  • Indexing is part of the Front-end Enablers bundle; it is a broad category of protocols and development platforms that allow more efficient interactions with the underlying blockchain and utilities layers (e.g. Ethereum, IPFS, etc).
  • Hosting & Naming category also forms part of the Front-end Enablers bundle and encompasses various tools and platforms used to build and run Web3 sites and apps. It also includes naming and name resolution services, such as ENS (which arguably crosses over into the Identity space as well).
  • Connectivity is the last part of the same Front-end Enablers bundle. It is a critical building block of Web 3 and as correctly outlined here, just about all calls to the blockchain protocol layer are mediated here today. Clearly, this undermines the premise of Web3 being decentralised. It will be interesting to see whether Light Clients or similar developments will change the current status quo.
  • Blockchain Protocols are part of the Blockchain Core bundle. They are fundamental to the existence of Web3. Significantly, there is a clear distinction between L1 and L2 protocols (e.g. impacting scalability of the solutions), and an emerging category of protocol bridges. They create assets, which in essence means either Crypto/Fungible tokens (ERC-20) or Non-Fungible/NFT token (ERC-721).
  • Various Exchanges and On-/Off-Ramps are also part of the same Blockchain Core bundle. They are comprised of the traditional order book — style exchanges and CeFi vendors (e.g. Coinbase, BlockFi), emerging distributed exchanges (DEX) and automated market makers (AMM) — an AMM is how Uniswap is designed, for example. Custody capabilities are often provided by the exchanges, and exposed via the wallets. There are capabilities to transfer Assets (e.g. fiat currencies) and Data (e.g. market data Oracles). Emerging social protocols, e.g. Lens, is here too as well as decentralised governance based on the concept of DAO communities.
  • Utilities represents a set of core capabilities including storage protocols and P2P network set up for various purposes (e.g. coin mining), security and identity related toolsets, analytics and so on

As noted above, there are various cross-overs from the Web3 Infrastructure layer into the real “off-chain” world. This includes physical infrastructure hosting services, e.g. storage, network and compute provided by the hyperscalers, as well as IaaS services, e.g. LevelDB required by Ethereum. This also includes integrations into “fiat” treasury functions, AML/CTF, fraud and risk related capabilities, off-chain dependencies and so on.

End-to-end detailed view

Web3 Reference Architecture — detailed view
Web3 Reference Architecture — detailed view

Roadmap. The nascent world of Web3 is rapidly evolving, adding new vendors, tools and capabilities to the mix. While there are still quite a few gaps, I think we are starting to see the new ecosystem taking shape driven by the modularity described above. However, there is still plenty of work before it becomes a mainstream. Expanding on the “Simplicity, Security, Utility” approach described here, the notable areas include:

  • Interoperability. As noted here, there is an urgent need for a seamless, universal, and decentralised method of sharing information and assets between blockchain ecosystems. Without achieving this, liquidity of digital assets will remain relatively low and adoption will remain patchy. The technical alternative to mitigate this fragmentation is currently limited to protocol bridges. They are complex to develop and maintain, and as recent events show (e.g. here and here) — not easy to secure either. The other obvious concern is — besides creating potential bottlenecks, that bridges are centralised from the development, operations and ownership perspectives, which is exactly opposite from what Web3 stands for.
  • Scalability. Most of the existing L1 protocols are struggling to compete with the needs of the “real,“off-chain” world. This is fundamental to the success of Web3, and this is why the impending upgrade of the Ethereum — which is hosting a lion share of the Web3 interactions is so critical, as well as advances in the Solana, Cardano and other camps. Over time we are likely to see a more balanced L1/L2 protocol ecosystem that would match and exceed what we see in the “off-chain” world today.
  • Trust. This is something that is yet to be achieved, as it needs to based on the end to end security and auditability, not just vendor statements. Using NFT as an example, there is a large degree on trust that users place on providers like OpenSea. However, there is limited ability to independently validate what exactly is happening on the chain and all API calls are proxied and mediated. Furthermore, having a simple URL in the chain is clearly problematic, as well as lack of end-to-end validation. It feels like the same old PKI problem that was largely solved in Web2, is now in play here.
  • Identity. Moral issues aside, there are certainly circumstances where user anonymity makes sense. However, if Web3 were to blur the lines between the “on-chain” and “off-chain” commerce, there is a need to provide true identity where specific types of transactions are taking place (e.g. land title transfers) or where there is a need to better manage risk (e.g. to mitigate one of the reasons behind the reported 40% default rate in crypto-based micro-finance space or have reliable delivery-vs-payment processes). This means KYC and other Digital ID related capabilities which are slowly starting to find their way into Web3.
  • Service management and observability. Things fail and Web3 is no exception. However, while Web2 platforms spent a lot of time and efforts ensuring end to end monitoring, observability and proactive management of services, for a lot of Web3 projects this seems to be an afterthought — even though the stakes are only getting higher.
  • Design patterns. Just like with cloud, solid design patterns for specific use cases are bound to emerge. This would include both “technical” level patterns showing where and how different components interact and more business centric patterns focused on data flows and the likes.
  • User experience. Even with the rapid uptake and growing interest in Web3, this is still a world of enthusiasts, crypto nerds and various nefarious players. Making it easier, simpler and safer is a key component of expanding the reach of Web3 and turning it into a utility.

Conclusion. Web3 is an exciting development, however it is still some time before it becomes a general purpose technology (GPT). The likely evolution trajectory will include new interoperability standards, improvements related to security and trust, scalability and so on. One of the first steps in this process is to be able to articulate the overall landscape and start breaking it into the manageable chunks, focusing on specific pressure points. Creating Reference Architecture can be viewed as a first step in this process.

While not pretending to be exhaustive, I think that the proposed model fundamentally captures the essence of the Web3 and its building blocks. I am looking forward to comments and contributions that would help to evolve it further.

Attachments: HiRes version of the diagram, both detailed and high level.

Disclaimer: The opinions, views and assertions expressed in this article are those of the author only and do not purport to reflect the official policy or position of his employer.

--

--