The best definition of the Web3 stack I’ve come across so far was written by Nader Dabit, a developer relations engineer for a Web3 company called Edge & Node. Back in August 2020, when he worked at Amazon Web Services as a serverless expert. At that time, he had just released an O’Reilly Media book entitled “Full Stack Serverless: Modern Application Development with React, AWS, and GraphQL”. In April 2021, he brought those skills into the nascent Web3 world. Part of his work with Edge & Node is helping to build The Graph, “a Web3 protocol for indexing and querying blockchain data with GraphQL.”
let’s take a closer look at his Web3 reference article. He categorizes the Web3 stack as follows:
- Blockchain development environment
- File storage
- P2P Databases
- API (Indexing & querying)
- Client (frameworks and libraries)
- Other protocols
As he noted, this stack is “completely different in many ways” to traditional web architecture — with blockchain and cryptocurrency-based identity being the two most obvious differences. Dabit also cautioned that the “Web3 tools, technologies, and ecosystem are less mature than Web2.”
From a web infrastructure perspective, “the main differences really are around what we’d consider ‘backend’ technologies, but in Web3 they are usually talked about in terms of ‘protocols’.”
“Also identity and how we deal with identity is different on the front end,” said Dabit. “To read data, you don’t need to know anything about the user — since almost all of the data is public. But for writing data, you usually need to connect to the user’s wallet. There are a couple of ways in which this is done. On a desktop app, the user usually has a browser extension for their wallet, which automatically injects a global window object for the network (e.g. solana, ethereum, arweave). Or on mobile, [it] will allow you to authenticate in a wallet app and redirect after signing a transaction.”
If you’ve played around with buying cryptocurrencies or NFTs, or experimented with dapps (decentralized applications), chances are high that you’ve used MetaMask — which has a browser extension for Chrome, Firefox, and Chromium-based browsers like Brave. MetaMask is owned by ConsenSys, which calls itself, with justification, “the leading Ethereum software company.”
ConsenSys also owns one of the leading IDEs (integrated development environments) in Web3. Truffle is a “development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM).” Among other things, it offers “smart contract lifecycle management” and “automated contract testing.”
Learning Ethereum (and Rust)
Now we get to the more complex aspects of the Web3 stack. By now, most developers are familiar with the concept of a blockchain — basically, it’s a distributed ledger of data. But there are many different types of blockchains. The two most important are Bitcoin and Ethereum (and not coincidentally, the cryptocurrencies associated with those blockchains are the two market leaders). But whereas Bitcoin is about as programmable as a calculator — as Ethereum researcher Justin Drake put it in an episode of the podcast, Web3 Breakdowns — Ethereum is a fully programmable “Turing-complete” computer.
It’s the programmable nature of Ethereum that has led to the new paradigm of a blockchain-focused web development stack — a.k.a. “Web3”. One of the tenets of Ethereum is that, theoretically, you can build anything on top of it. It’s a web platform, to use Web 2.0 parlance. Ethereum is the largest Web3 platform, and it is also compatible with some of the other blockchains. So the main on-ramp to becoming a Web3 developer is to learn how to use Ethereum.
“In the Blockchain world, learning Solidity and the EVM (or Ethereum Virtual Machine) might be the best bet when getting started as a blockchain developer,” explained Dabit in his article. “Using this skillset (and tech stack), you can build not only for Ethereum, but other Ethereum Layer 2s, sidechains, and even other blockchains like Avalanche, Fantom, and Celo.”
However, in another nod to the Web 2.0 world, Rust is also becoming a go-to skill for smart contract developers. Dabit cites Solana, NEAR and Polkadot as three examples of blockchains with “first-class Rust support.”
“I’d say that Solidity and Rust are the most used and in-demand languages for smart contract development by a wide margin,” Dabit added that experienced smart contract programmers, since they are relatively rare, can command salaries “in the mid-hundreds of thousands of dollars per year easily, and I’ve even seen some examples of the most experienced ones pulling in the range of $1M per year.”
How to Store Data and Query It
One of the trickiest parts of Web3 development is storing and using data. While blockchains are good at being “trustless” chains of immutable data, they are also incredibly inefficient at storing and processing large amounts of data — especially for dapps. This is where file storage protocols like IPFS, Arweave and Filecoin come in.
Arweave is an open source project that describes itself as “a protocol that allows you to store data permanently, sustainably, with a single upfront fee.” It’s essentially a peer-to-peer (P2P) network, but has its own set of crypto buzzwords — its mining mechanism is called “Succinct Proofs of Random Access (SPoRAs)” and developers can deploy apps to the “permaweb” (“a permanent and decentralized web built on top of the Arweave”).
To complicate matters further, dapp developers have the option to use “off-chain” solutions, where the data is stored somewhere other than the main blockchain. Two common forms of this are “sidechains” (secondary blockchains) and so-called “Layer 2” (L2) solutions, like Bitcoin Lightning Network and Ethereum Plasma. For more on how to approach data management in Web3, check out this recent post on The New Stack by Shashank Golla from data API company Fauna.
As for how to index and query data on the blockchain, this is a relatively new area of development. But as noted above, Dabit is working on one solution — The Graph, powered by GraphQL. Among other things, it enables developers to query directly from L1 or L2 chains using GraphQL within the application.
Decentralization: The Web3 Developer’s Quandary
From a developer’s point of view, Web3 seems to be in a transition period at the moment, trying to find ways to move away from the reliance on centralized services like Coinbase, OpenSea and Alchemy. But doing that is where all the complexity comes in, because true decentralization is really hard to achieve for dapps.
I’ll be curious to see how the Web3 stack evolves over 2022, as it searches for ways to live up to its own decentralization hype. In the meantime, do check out Nader Dabit’s Web3 developer’s guide if you want to learn more.