DX Heroes logo
#blockchain
#web3

Web3 High-level Overview

Length: 

15 min

Published: 

June 9, 2022

Web3 High-level Overview

What Web3 is about and what it brings to the table

Blockchain became a popular destination for geeks with a vision: this tech in their hands would shape the future of web architecture and replace it with a fundamentally fair environment driven by code, also known as Web3.

Then came the skeptics. They noticed signs of immaturity, large-scale protocol attacks that drained millions of dollars, network outages, and only a handful of use cases for blockchain applications in daily life.

Another group still keeps its distance from crypto. They know there is something called Bitcoin and they noticed the NFT art bubble, but they have not looked closely enough at how blockchain technology actually works.

Whichever group you belong to, let me walk you through a high-level overview of what Web3 is about, how it is structured, and how building Web3 dapps differs from building traditional web applications.

Table of content:

  • A. Web3 Architecture (Presentation layer, Persistence layer, Business layer, Which blockchain to pick)
  • B. Governance
  • C. Web3 Use cases
  • D. Downsides

A: Web3 Architecture

If you google "Web3 definition", you get a lot of different interpretations. Some of them list blockchain as one puzzle piece in a people-driven shared economy, next to fields like Artificial Intelligence or the Internet of Things.

This article focuses purely on the blockchain concepts behind decentralized smart contract platforms, the foundation for decentralized web applications (dapps). Their key values are:

  • Decentralization of service ownership
  • Permissionless territory where everyone has an equal opportunity to take part in the decision process
  • Trustless environment that follows rules given by the code

Full-stack decentralized web applications that follow all three concepts still live in client-server architecture. Two things set them apart: how the server part operates and how you have to maintain the whole stack.

1. Presentation layer

As mentioned, the client side in Web3 stays consistent with the traditional web experience. A dapp frontend has two main jobs:

  • Talk to the user's blockchain wallet through a browser extension or a desktop/mobile application. The wallet holds all the keys and signatures needed for secure communication between the frontend and the blockchain platform.
  • Read from and write to the blockchain (server) to interact with it. Communication runs over a JSON-RPC interface instead of a standard API. A remote procedure call (RPC) routes the dapp to a specific blockchain node to share state updates across the whole network.

When you pick a stack, React/Next became #1 thanks to its maturity and its compatibility with a large ecosystem of libraries.

React paired with TypeScript is the usual combination for anyone chasing a career as a Web3 frontend developer.

React also rewards beginners with a rich set of dev tooling and ready-made boilerplates like Wagmi, Thirdweb, or Rainbowkit.

2. Persistence layer

A blockchain records data on its own and does not follow traditional database systems like SQL or noSQL. It is designed to share and update its state rather than to store large amounts of data, so that thousands of individual nodes can join the network without huge storage requirements.

With a limited block size (1 MB for Ethereum), dapps have to find other ways to store persistent data like images or media. One option is specialized P2P networks similar to BitTorrent, which a dapp can reference, for example:

  • IPFS
  • Arweave
  • Sia

This workaround only lets the dapp access static data references, often immutable. Processing dynamic data from outside the blockchain through an API is not recommended, because that data lives outside the decentralized world and the output could be tampered with. This situation is often called the Oracle problem.

To solve the Oracle challenge and securely fetch data like exchange rates, sporting events, or even a random number, the application has to connect to a data provider that serves data in a trustless way. That adds yet another decentralized network to the stack. Chainlink leads the oracle market by far, with a solid approach to connecting data providers and motivating them to behave correctly through defined penalties and rewards.

3. Business logic layer

Up to this point, the layers used more or less the same concepts, just in a form tailored for Web3. The server part handles both transaction processing and state updates.

Instead of running your own server instance, you can use one of dozens of blockchain networks that are already publicly open for interaction. They fall into three groups by functionality:

  • 1st generation (Bitcoin) can send a certain amount of cryptocurrency from account A to account B and update its ledger securely, without any third party.
  • 2nd generation (Ethereum, Tezos) introduced smart contracts, self-executing programs you can deploy into the chain's state. Anyone can define their own set of conditional functions in a shared space where anyone can interact with them and use them.
  • 3rd generation blockchains (Polygon, Avalanche, Binance Chain) add concepts that greatly improve scalability and the overall experience for both developers and users.

The most used smart contract function is a swap, a trade function for decentralized exchange of cryptocurrencies that runs without any institution in the middle. It comes with two programmatically defined pieces:

  • a reward for the liquidity provider of the swapping pair in "liquidity pools", where anyone can contribute a liquidity pair (for example ETH/BTC),
  • a weighted price reaction after the swap (trade) via an algorithm called the Automated Market Maker (AMM), so that buying pressure and lower liquidity of a pair item pushes the price up, and vice versa.

Functions written this way, with only hundreds of lines of code, have already handled billions of dollars transferred securely through the Uniswap decentralized exchange.

The current #1 language for smart contracts, Solidity, was built as a developer-friendly tool to simplify byte-code execution on Ethereum. Over time it became the industry standard because:

  • Many other blockchains derived their architecture from Ethereum (also called EVM-compatible chains),
  • it was the first to gather a large community effort around development tooling, including debugging, security analysis, and transaction monitoring.

The most used languages for writing smart contracts on blockchain:

  • Solidity: to this date, smart contracts hold roughly $70b of value locked in its applications,
  • Vyper roughly $6.5b (a Python-based alternative to Solidity),
  • Rust roughly $2.5b (used for smart contracts on Solana, Near, Terra Luna).

4. Which blockchain to pick

One of the many paralyzing parts of deploying a dapp is the choice of network. Instead of one "internet", there are dozens of independent blockchains, often without an effective way to talk to each other.

Projects under financial pressure from venture investments (in return for utility tokens) cannot afford to split across all the networks, because that damages the project's tokenomics: the price of assets with lower liquidity is easy to manipulate for whales and trading robots. So many projects only get one shot to pick the best environment to start their business.

As you might guess, there is no single right choice, and you cannot say which tech will rule the market in the coming years and which one will perform poorly and eventually die. Due diligence increases the probability of success.

During the analysis phase, everyone is responsible for finding the right match by asking questions like these:

Hard aspects

  • Decentralization: How censorship-proof should the dapp be?
  • Security: What would happen if someone exploited the blockchain's vulnerabilities?
  • Scalability: How many transactions do I expect to process daily in an optimistic scenario? Is it reasonable for my users to pay a transaction fee of more than $0.01 / $1 / $10?
  • Smart contract language: Is there a reason to consider a language other than Solidity?
  • Development and monitoring tooling: Do I need to monitor blockchain data for my use case? Is there a provider that serves easily consumed indexed transactions?
  • Cross-chain ability: Does it make sense to run on multiple chains? Should the app be able to communicate between them?

Examples of network adoption aspects:

  • Total Value Locked on chain (TVL): Do I need an attractive capital on the chain to circulate through my DeFi application?
  • The number of active users: How important is it for me to operate on an already established chain with a solid network effect?
  • The number of chain transactions: Would I prefer a low-key operation to being exposed to wildness full of attacking bots?
  • Marketing strategy & product vision: Can I build on the marketing and communication done by the team behind the blockchain?
  • The ecosystem of applications: Could existing projects on the chain help my dapp shine, or would it pay off more to build everything on my own?

B. Governance

One-time deployment of self-governed, decentralized or semi-decentralized applications brings a whole new challenge not yet seen in web development.

Projects need to evolve over time, adjust to market trends, or keep up with competitors. The concept of a DAO (Decentralized Autonomous Organization) gives you the tooling to sustain project goals long-term, if you design it carefully.

1. Tokenomics

Utility tokens act as the engine from the investment phase through continuous maintenance, keeping the project healthy. Whatever kind of application you build, you have to adopt some token strategy, and it heavily shapes the project's business. The questions to answer:

  • What is the utility behind the token? Will it serve as an exchange value for premium services, or as a governance tool?
  • Will there be enough initial liquidity on the chain to keep healthy price movement on the market?
  • Can the token survive the inflation caused by the distribution mechanism without hurting stakeholders?

Answering questions like these helps you design:

  • a vesting lockup to test the team's commitment to the project,
  • a token launch method to secure enough liquidity at the start: Lockdrop, liquidity bootstrap, IDO, Launchpad, Dutch auctions,
  • initial supply and allocation to the team, investors, community, and other stakeholders,
  • a revenue split between users, service providers, and the protocol,
  • treasury size, structure, and intended uses,
  • coin governance, including voting, escrow, stake-weighting, vesting, and gauges.

2. Govern

Once the project is fully developed and shifts into the "decentralized" mode where everyone rules, updates and protocol optimizations usually happen through governance voting. Holders of utility tokens put forward proposals and try to reach a model of maximum financial or technical prosperity.

If you want a deep level of decentralization, the project needs to identify which dimensions are worth governing and how to do it. That includes:

  • the parameters to govern (protocol fees, code redeployment, dividends and bounty rewards, governance model, treasury economy) to keep the dapp useful and voters motivated,
  • a platform as a governance forum (custom or pre-built, such as Snapshot, Aragon, or XDAO) compatible with the blockchain the utility token runs on,
  • proposal rules and templates, and the conditions to pass,
  • voting delegation for token holders who care about the protocol's future but do not follow the technical details of proposals.

Like DAO and want to dive deeper? Look at:

  • DAO model of a decentralized city
  • Governance of Venice in DAO
  • Index Coop DAO model for DeFi indices

C. Web3 use cases

Not everything is meant to be decentralized. The architecture of blockchain platforms adds new options to web development that only make sense alongside traditional web servers and databases, and sometimes not even then.

It helps to understand what blockchain does differently:

  1. It supplies computing resources with no significant maintenance and no administrative costs. Business runs by the laws of code.
  2. It is a transparent environment. Smart contracts deployed in the past are accessible and reusable for anyone. The industry's open-source mentality speeds up its learning curve and evolution.
  3. It provides neutral ground for groups with different interests pursuing similar goals. It can only be misused through gaps in the design of the deployed applications.
  4. A secure ledger is built into every blockchain by its architecture. It cannot be broken cryptographically and needs no accountant to fix incorrectly calculated balances.
  5. There is an element of anticipation (hype), fueled by media, investors, and financial incentives. The narrative is that blockchain offers an exciting concept of tokenization and rewards for ordinary day-to-day stuff.

Today's Web3 application market (roughly $80b–$100b) gained traction in two main areas, DeFi and NFTs:

Decentralized finance (DeFi), with more than 90% of the market value, aims to offer alternatives to traditional fintech. It rests on a few key pillars:

  • Decentralized exchanges (Dexes) handle trades of one cryptocurrency for another within seconds and offer perpetual trades without regulatory restrictions.
  • Lending protocols give token holders a source of interest when they provide liquidity to the system, and give borrowers possible income when they use that liquidity for advanced concepts like leverage trading or arbitrage trading.
  • Stablecoins are tokenized national currencies (mostly USD) that connect the blockchain economy to traditional valuation and let value move between both worlds.

The NFT (non-fungible token) phenomenon took the second largest market share thanks to the 2021 mania, after the entertainment industry got involved and celebrities drew a wave of retail users. Most of them were looking for fun in these categories:

  • NFT "art": digital pictures and videos with creative stories behind them, traded on NFT marketplaces like OpenSea or Solana's Magic Eden,
  • Metaverses: virtual alternatives to physical life with their own rules given by code instead of laws. The leading design, from the Sandbox game, lets users buy virtual land, build games, challenges, or stores inside it or rent them, and create a "real-world-like" economy,
  • NFT gaming: mobile and video games that let you mint in-game assets onto the blockchain while you play, and trade those assets on NFT marketplaces with other players for cryptocurrencies with real value.

One less visible and less successful on-chain application is the decentralized social platform, a censorship-resistant, fee-free alternative to popular networks like Facebook or Twitter. Setting aside their lower service quality and weak market demand, a few examples stand out:

  • Theta (a decentralized Twitch),
  • Mirror (a decentralized article publishing platform),
  • Aioz (a decentralized YouTube).

D. Downsides

This financially heavy ground is unfortunately overshadowed by problems: an immature industry, a lack of best practices in program design, and greed among some of the players.

With every DeFi or NFT innovation, where millions flow daily, another door opens for hackers and impostors looking to steal someone's life savings and exploit weak spots.

Designing good DeFi carries great responsibility, not only for code quality but also for the community of users. Those users are regularly hit by clever phishing techniques and attacks, often without proper education, and the application UX is poor because it was pushed to production before testing could finish.

Another lively debate is how decentralized blockchains and dapps really are, even though they are widely sold as 100% censorship-proof. In reality, some networks still run on just a couple of computers, the dapps' censorship resistance was never truly battle-tested, some networks suffer outages, and they still need centralized care to operate.

The golden age of decentralization will arrive when creators "steal" world-class entertainment brands like Marvel, Star Wars, or Pokemon, use them, and run their own business publicly on-chain through a DAO, with no one in the world able to stop it. That is not where we are right now:

  • So far only Bitcoin and Ethereum have reached a comfortable level of decentralization, with node networks in the tens to hundreds of thousands.
  • 99% of Web3 frontends run on centralized infrastructure like AWS, Netlify, Vercel, or Google.
  • Most Web3 dapps are governed and developed by one specific team or company. Development by a true DAO is still rare, and beautiful to see.

Am I scared about the future of Web3 in today's market, full of skepticism and gloom? Not at all. The cryptocurrency market is still roughly 3x larger than two years ago and 10x larger than five years ago. This trend will continue as the industry attracts top technical minds willing to share everything they know and push the boundaries further. That leads to steady improvements and the current trends of:

  • High-scale transaction processing with cryptographic methods called rollups, which push blockchain performance up to 10k TPS (transactions per second) and beyond,
  • cross-chain interoperability with new TCP/IP-like protocols that connect individual platforms into a single user experience,
  • better developer tooling that lets anyone enter Web3 development with an easy-to-use environment and best practices provided for free.

This pace of improvement will allow early use of blockchain computing resources as a replacement for application servers and databases in the traditional IT industry, all for pennies on the dollar. That will boost the network effect of some smart contract platforms past the point where anyone can stop it.

Less successful platforms are destined to die. Technically unattractive or less adaptive chains will become obsolete in this competitive battle of billion-dollar protocols. As with the dot-com bubble, it simply does not make sense for everyone in this field to prosper, despite the technological potential and the possibly huge impact on the modern web.

Sources

[1] https://www.weforum.org/agenda/2022/02/web3-transform-the-internet/

[2] https://itnext.io/top-3-web-3-0-architecture-layers-explained-frontend-backend-and-data-e10200f7fc76

[3] https://www.euromoney.com/learning/blockchain-explained/how-transactions-get-into-the-blockchain

[4] https://docs.uniswap.org/protocol/V2/concepts/protocol-overview/how-uniswap-works

[5] https://tokenomicsdao.substack.com/p/tokenomics-101-dydx

[6] https://threadreaderapp.com/thread/1534553671203139584.html

[7] https://blocksize-capital.com/from-defi-to-dao

Want to stay one step ahead?

Don't miss our best insights. No spam, just practical analyses, invitations to exclusive events, and podcast summaries delivered straight to your inbox.