Web3 High-level Overview
What Web3 is about and what it brings to the table
Blockchain became a popular destination for geeks who had a vision that 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 there were skeptics who noticed signs of immaturity, large-scale protocol attacks, drained millions of $$$, network outages and a limited amount of use case scenarios of blockchain applications in daily life.
Another party still protects itself from crypto influence; they acknowledged there is something called Bitcoin and noticed the NFT art bubble but they have not delved deep enough yet to explore how blockchain technology works.
For any of these or other groups, allow me to walk you through a high-level overview of what Web3 is about, how it is structured and how building Web3 dapps is different in comparison to 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 multitude of various interpretations, some of which list blockchain as one of the puzzle pieces to complement people-driven shared economy next to industries like Artificial Intelligence or Internet of Things.
This article will purely focus on blockchain-related concepts behind decentralized smart contract platforms, the building ground for decentralized web applications (dapps), with key values representing:
- Decentralization of service ownership
- Permissionless territory where everyone has equal opportunity to participate in the decision process
- Trustless environment following rules given by the code
Full stack decentralized web applications following all three concepts still remain in the domain of client-server architecture, with two key differences how the server part operates and how the whole full-stack has to be maintained:
1. Presentation layer
As mentioned, client architecture in the world of Web3 remains consistent with traditional web experience. The main purpose of dapp frontend is to:
- Interact with the user's blockchain wallet via a browser extension or a desktop/mobile application. The blockchain wallet holds all the keys and signatures needed for secure communication between frontend and the blockchain platform.
- Read and Write operations into the blockchain (server) in order to interact with it. JSON-RPC interface is used for communication instead of standard API. Remote procedure call (RPC) redirects dapp to a specific blockchain node to share state updates across all the blockchain network.
From the perspective of choosing the right stack, React/Next became #1 thanks to its maturity and compatibility with a large ecosystem of libraries.
React knowledge together with TypeScript is a usual combination to chase a career as a Web3 frontend developer.
2. Persistence layer
Blockchain architecture records data on its own and does not comply with traditional database systems like SQL or noSQL. It is designed to share and update its state rather than to store a large amount of data in order to allow thousands of individual nodes to join the network without substantial data space requirements.
With its limited blocksize (1MB for Ethereum), dapps have to find different ways to store persistent data like images or media. One solution is to use specialized P2P networks similar to BitTorrent with the ability to reference between dapp and P2P network, for example:
Note that this workaround only allows the dapp to access static data references, often immutable. Processing dynamic data (outside blockchain) from client through API is not recommended as the outside of the decentralized world and output could be tampered with; this situation is often referred to as the Oracle problem.
To overcome the Oracle challenge and securely retrieve data like exchange rates, sporting events or even a random number, the application has to connect with a data provider with the ability to serve data in a trustless manner which leaves us with yet another decentralized network in the stack. Chainlink by far leads the oracle market with its robust solution to connecting data providers and motivating them to behave correctly with defined rules of penalties and rewards.
3. Business logic layer
Up to this point, architectural layers used more or less the same concepts but in an extra form tailored for Web3. The server part takes care of both transaction processing and updating its state, as shown in the example block generation process below:
Instead of running one’s own server instance, dozens of blockchain networks publicly open for interaction have already been established. They can be categorized into three groups based on their functionality:
- 1st generation (Bitcoin) has the ability to send a certain amount of cryptocurrency from account A to account B and to update its ledger securely without 3rd party involvement.
- 2nd generation (Ethereum, Tezos) introduced the concept of Smart contracts, self-executing programs deployable into the chain’s state. This means that anyone is able to define their own set of conditional functions into a shared space where anyone can interact and use them.
- 3rd generation of blockchains (Polygon, Avalanche, Binance chain) offers additional concepts to largely improve blockchain scalability and overall experience for both developers and users.
The most used smart contract function is a swap. It’s a trade function used for decentralized exchange of cryptocurrencies processed without the need of an institution in the middle, with a programmatically given:
- Reward for the liquidity provider of the swapping pair in “liquidity pools”, where anyone can contribute a liquidity pair (f.e. ETH/BTC)
- Weighted Price reaction after the swap (trade) via an algorithm called Automated Market Maker (AMM) to ensure that buying pressure and lower liquidity of a pair item leads to an increase in price and vice versa.
Functions written this way that only have hundreds of rows of code have already handled billions of dollars transferred securely through the Uniswap decentralized exchange.
Current #1 programming language to write smart contracts in, Solidity, was created specifically as a developer-friendly tool to simplify byte-code execution on Ethereum. Over time, it has evolved into the industry standard because:
- Many other blockchains derived their architecture from Ethereum (also called EVM compatible chains)
- It was the first to come with a large community effort to support it with development tooling including debugging, security analysis and transaction monitoring
note: The most-used smart contract languages to write smart contracts on blockchain in:
- Solidity: to this date, smart contracts hold~$70b in value locked in its applications
- Vyper ~$6.5b (Python-based alternative to Solidity)
- Rust ~$2.5b (used for smart contracts on Solana, Near, Terra Luna)
4. Which blockchain to pick
One of the many paralyzing aspects of deploying a dapp is the choice of network. Instead of one “internet”, there are dozens of independent blockchains often lacking an effective way to communicate with each other.
Projects financially pressured by venture investments (in return for utility tokens) cannot afford to split across all the networks due to the damaging economic impacts on project tokenomics — seeing as the price of assets with lower liquidity could be easily manipulated by whales and trading robots. This means that many projects only have one shot to pick the best environment available to start their business.
As you might guess, there is no ultimate right choice and it is impossible to say which tech will rule the market in the upcoming years and which one will perform poorly and eventually die. Due diligence increases the probability of project success.
During the project analysis phase it’s everyone’s responsibility to find the correct match by asking questions such as the following:
- Decentralization: To what extent should the dapp be censorship-proof?
- Security: What impact would it have if the blockchain’s potential vulnerabilities were exploited?
- 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 why I should think of a different language than Solidity?
- Development & Monitoring tooling: Do I need to monitor blockchain data for my use case? Is there an available provider for easily consumed indexed transactions?
- Cross-chain ability: Is it reasonable to operate on multiple chains? Should the app be able to communicate between those chains?
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 leverage the marketing strategy and communication done by the team behind the blockchain?
- The ecosystem of applications: Are there ways in which pre-existing projects on the chain could help my dapp shine or would it be more profitable to make everything on my own?
note: More about blockchain decision strategies in my Medium article.
One-time deployment of self-governed, decentralized or semi-decentralized applications represents a whole new challenge not yet seen in web development.
Projects need to evolve in time, adjust to market trends or keep up with competitors. The concept of DAO (Decentralized autonomous organization) provides tooling to sustain project goals long-term if meticulously designed.
1. Deal the cards (Tokenomics)
Utility tokens serve as an engine from the investment phase through the phase of continuous maintenance to keep it healthy. No matter which kind of application is built, each one has to adapt some of the token strategies with a heavy impact on the project’s business with questions like:
- 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 a healthy price movement on the market?
- Could the token sustain the inflation effects of the token distribution mechanism without damaging stakeholders?
Answering questions like this will help design:
- Vesting lockup to test team commitment to the project
- Token launch method to ensure enough liquidity for the start: Lockdrop, Liquidity bootstrap, IDO, Launchpad, Dutch auctions
- Initial supply and allocation to team, investors, community, and other stakeholders
- Revenue split between users, service providers, and protocol
- Treasury size, structure, and intended uses
- Coin governance including voting, escrow, stake-weighting, vesting, and gauges
At the point where the project is fully developed and transforms into the “decentralized” mode where everyone rules, updates and protocol optimizations are usually done by governance voting, where holders of utility tokens try to come up with proposals and reach a model of maximal financial or technical prosperity.
If a deep level of decentralization is desirable, the project needs to identify dimensions reasonable to govern and to create a strategy on how to achieve that, which includes:
- Parameters to be governed (protocol fees, code redeployment, dividends and bounties rewards, governance model, treasury economy) to keep the dapp useful and the governance participants motivated to vote.
- Platform as a governance forum (custom or pre-built, e.g. Snapshot, Aragon, XDAO) compatible with the blockchain the utility token is deployed on.
- Proposal rules & templates, conditions to pass
- Voting delegation in case token holders care about the protocol’s future but don’t understand technicalities of proposals.
Like DAO and want to dive deeper? Look at:
C. Web3 use cases
However, not everything is meant to be decentralized; the architecture of blockchain platforms provides new aspects in web development which only makes sense in combination with traditional web servers and databases and sometimes not even then.
It is essential to understand what blockchain does differently:
- It supplies computing resources without significant maintenance costs and no administrative costs. Business is thus executed by laws of code.
- It represents a transparent environment. Historically deployed smart contracts are accessible and reusable for anyone else. Open-source mentality of the industry expands the speed of its learning curve and evolution.
- It provides neutral ground for groups with different interests achieving similar goals. It can only be misused by means of potential gaps in the design of deployed applications.
- Secure ledger is an inbuilt property of any blockchain given by its architecture, which cannot be broken cryptographically and which needs no accountant intervention in order to fix incorrectly calculated balances.
- There is an element of anticipation (hype) boosted by media, investors and financial incentives. The narrative is that blockchain presents an exciting concept of tokenization and reward for doing regular day-to-day stuff.
Today’s Web3 market of applications (~$80b–$100b) found traction in two main areas, DeFi and NFTs:
Decentralized finance (DeFi) with more than 90% market value aims to provide alternatives to traditional fintech and it is built on these key pillars:
- Decentralized exchanges (Dexes) serve for trades of one cryptocurrency to another that can happen within seconds and they offer perpetual trades without regulatory restrictions.
- Lending protocols provide a source of interest for token holders who provide liquidity into the system, and a source of possible income for borrowers using the liquidity for advanced concepts like leverage trading or arbitrage trading.
- Stablecoins, tokenized national currencies (mostly USD) whose purpose is to connect blockchain economy to traditional valuation and exchange value between both worlds.
The NFT (non-fungible token) phenomenon took the second largest market share due to the 2021 mania after the entertainment industry got involved and celebrities were followed by a wave of retail users, mostly looking for fun in categories of:
- NFT “art”, digital pictures and videos with creative stories behind them, trading in NFT marketplaces like OpenSea or Solana’s Magic Eden
- Metaverses, as virtual alternatives of physical life with their own rules given by code instead of laws. The leading design made by the Sandbox game enables users to buy virtual lands, build games, challenges or stores inside or rent them and create a “real-world-like” economy
- NFT gaming, integration of mobile/video games with the option to mint in-game assets into the blockchain while playing a game and trading these assets on NFT marketplaces with other players for cryptocurrencies with real value
One of the less visible and less successful on-chain applications, decentralized social platforms, have properties of censorship-resistant, fee-free alternatives to popular social platforms like Facebook or Twitter. Setting aside lower service quality and poor market need of such platforms, there are some examples visible more than others:
- Theta (Decentralized Twitch)
- Mirror (Decentralized article publishment platform)
- Aioz (Decentralized YouTube)
Adoption of such financial heavy ground is unfortunately followed and often overshadowed by issues caused by immaturity of the industry, lack of best practices in program design and greediness of some of the players around.
With each innovation in DeFi or NFT where millions flow on a daily basis, yet another door is unlocked for hackers or impostors looking for an opportunity to steal someone’s lifetime treasure and to exploit vulnerable situations.
Designing good DeFi carries a great responsibility not just from a code quality perspective but also with the community of users in mind, seeing as they are regularly exposed to innovative phishing techniques and attacks, often without proper education and poor application UX that was pushed to production before proper testing could be completed.
Another source of lively discussions is how decentralized blockchains and dapps truly are, even if they are widely presented as 100% censorship-proof. In reality, some of the blockchain networks are still operated by just a couple of computers, censorship resistance of the dapps were not truly battle-tested, some of the networks experience outages and still need centralized care to operate.
The golden age of decentralization will come when creators “steal” world-class entertainment brands like Marvel, Star Wars or Pokemon, use them and run their own business publicly on-chain through DAO, and no one in the world will be able to effectively stop it. That, however, is not the situation we are in, right now:
- So far only Bitcoin and Ethereum have reached a comfort level of decentralization with networks of nodes counting tens to hundreds of thousands.
- 99% of Web3 frontends are deployed on centralized infrastructures like AWS, Netlify, Vercel or Google.
- The majority of Web3 dapps are governed and developed by one specific team or company. Development by a true DAO is still something rare… and beautiful to see.
Am I scared about the future of Web3 in the current market situation full of skepticism and depression? Not at all; the cryptocurrency market is still roughly 3x larger than 2 years ago, 10x larger than 5 years ago…and this trend will continue as the industry attracts top technological minds willing to share everything they know to push the boundaries further and further, leading to continuous improvements and current trends of:
- High scale transaction processing with cryptographical methods called rollups to heavily improve blockchain performance up to 10k TPS (transactions per second) and further.
- Cross-chain interoperability with new TCP/IP-like protocols connecting all individual platforms together into a single user experience.
- Improved developer tooling to let anyone enter Web3 development with an easy-to-use environment and the best practices provided for free.
Such high improvement speed is going to allow an early use of blockchain computing resources as replacement of application servers and databases in the traditional IT industry, all for pennies on the dollar. This will boost the network effect of some of the smart contract platforms past the point where it can be stopped.
And 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 was the case with the dot-com bubble, it just does not make sense for everyone in this field to prosper, despite the technological potential and possibly huge impact on the modern web.