HomeBlog

Intro to Web3

10/7/2022

I spent a week exploring Crypto and Web3 to evaluate the current state of the ecosystem and how it might develop over the next few years. While researching, I wrote numerous smart contracts and built dApps around them, which you can check out below. *They are only deployed on the Ethereum Goerli testnet, not the mainnet. You'll have to set your network to Goerli in Metamask to transact.

This collection of apps composes a suite of tools familiar to many in the crypto space - and developing them provided useful insights into what it's like to build on Ethereum today.

Over the next few days, I'll share my thoughts on various Crypto developments and projects. The first post will be an overview of Web3 and its goals. It'll be followed by deeper dives into specific projects, topics and their utility. This is a builder's view of Web3.

What is Web3?

Web3 is a movement that aims to make the internet more secure, private and decentralised by removing intermediaries and providing users with ownership over their data, identity, security and transactions. Here is a great talk[1] by Juan Benet on the history of the Web and how the Web3 movement emerged. Network State[2] by Balaji Srinivasan (former CTO at Coinbase) is an ambitious yet illuminating exploration into how a society in which Web3 is fully developed might function.

What Makes Web3 Possible?

Smart Contracts are what make Web3's vision attainable. The first implementation of smart contracts was built on the Ethereum blockchain with the Ethereum Virtual Machine. Think of it as a shared, democratically managed world computer (or server) that validators run. We pay 'gas fees' to these validators in exchange for running computations. Apps and services (smart contracts) are distributed and made available to all users of this 'world computer'. The computer can theoretically perform any function existing computers perform, albeit at a much higher price than commodity hardware. I'll go into more detail on alternatives, pricing, scalability and so on later on.

What services are required to build apps today?

When building applications, we use existing infrastructure provided by organisations such as Amazon Web Services. The five main components are:

  1. Compute (processors/GPUs that run servers and crunch data for apps)
  2. File storage (cloud hard drives storing databases, images...)
  3. Identity (e.g Apple/Google sign on, 2FA…)
  4. Payment (SWIFT, VISA, Stripe, Mastercard, Banks..)
  5. Distribution (Windows, iOS, Web…)

All these services depend on developers entrusting their organisation's data and activity with the service. This is what Web3 wants to avoid.

What's are Web3's alternatives?

Compute:

The EVM and smart contracts provide open, decentralised and trust-less compute. Blockchain and its consensus algorithms ensure that bad actors cannot sabotage the network as long as the majority of the network is comprised of 'good' actors. Every computation must be reproducible by validators, or it is rejected. However, both executing smart contracts and storing data on the blockchain is extremely expensive. There must be compromises so only crucial applications and calculations are run on layer 1 for this to be pragmatic and affordable. I will discuss some projects aiming to solve this in another post.

File storage:

Storing 1GB of data on Ethereum costs approximately 700 ETH assuming gas fees of 7 gwei. Alternative peer-to-peer protocols aim to solve this with chains and tokens, incentivising decentralised file storage for the Web.

Peer-to-peer applications have existed for decades. BitTorrent[3] was created in 2001 and allows users to download and subsequently seed files: helping increase availability to others. You receive 'credit' in the form of priority downloads in exchange for contributing bandwidth and disk space. Why don't we use BitTorrent for file storage? Because there's no way to exchange this 'credit' for other goods and services. This incentive is the problem blockchains and token issuance solve, especially with ERC20[4].

You can now receive a token for your contribution to the file storage service and exchange it for other goods and services, making your efforts worthwhile. IPFS[5] is a decentralised file system used by many Web3 services for decentralised storage. FileCoin[6] is a protocol built on top of IPFS that adds incentives to geographically distribute files to areas in which they are more frequently requested.

IPFS is already being used to distribute web pages. Many call it 'The Decentralised Web'. Brave Browser natively supports the ipfs:// protocol. When buying an NFT, Web3 engineers suggest providers who use IPFS file for storage - not URLs that disappear when their respective website goes down. (more on NFTs in a separate post).

Identity:

Your public key is your Web3 identity to which NFTs and assets you own are linked. You can purchase an ENS domain for a human-readable name pointing to your public key. This domain can be used as a pseudo-anonymous identity.

Anonymity creates an issue of trust. How does the service know you're not a bot? Or that you have some credibility? Vitalik proposes Soulbound Tokens(STs)[7]. These are tokens which can't be transferred, only minted. A use can build a credit reputation/score as they acquire STs across various networks and DAOs. This also reduces their incentive to create 'burner' keys. See this paper[8] by Vitalik and co for possible applications of STs.

Photochromic[9] is a DAO that aims to provide an identity service for Web3, however it is not trust-less. They map your biometric data to an Ethereum name/address and hence are privy to your identity.

Payment:

Accepting payments is a matter of sharing your public key, whether it's a DAO or smart contract address. There is no barrier to entry, although care must be taken on exit to comply with increasing regulations. Transaction fees are proportional to their complexity (gas required), and gas prices, not the number of tokens exchanged. This means that a £1m payment costs the same as a £10 payment, and the costs fluctuate with network congestion. See this chart[10] for a history of Ethereum transaction fees. In times of high demand, transaction fees have reached $50. This made the network unusable for typical participants. Scaling solutions and L2s[11] , such as rollups (batching transactions off-chain before committing them) will help address this. I personally prefer ZK-rollups[12] to some of the other scaling solutions as they preserve trust, security and validity. More on transactions, faster alternative chains and scaling later.

Platform:

Today's de-facto platform for Decentralised apps is the Web, largely due to ease of access and distribution. You don't have to go through App-Store reviews to publish a website, and wallets in the form of web browser extensions such as MetaMask[13] make access and integration easy. Brave Browser[14] has a built-in wallet that can manage your keys for you. Download one of these extensions, and a popup will appear when you're on a Web3 app such as ENS[15]. It seems integration with native mobile apps is more difficult. The only option I can see for native apps is to create a wallet on your behalf, requiring that you fund it via your main wallet. There is still a lot of work to be done to increase access to Web3, and gas fees are difficult to get accustomed to for new initiates.

Conclusion:

Web3 is an ambitious vision requiring a broad set of technologies working in unison to be realised. While Crypto and L1 blockchains are the primary enabler, these alone do not provide enough utility. Just as the Web became popular when a collection of technologies and services built on top of the internet matured, Web3 will need a suitable suite of alternatives working in unison to reach critical mass. Developers are busy building Web3 and its infrastructure this Crypto winter, but it will take at least another year or two.

More to come on alternative chains, oracles, scaling, DAOs and cool Web3 apps!

References:

  1. https://www.youtube.com/watch?v=l44z35vabvA
  2. https://thenetworkstate.com/
  3. https://en.wikipedia.org/wiki/BitTorrent
  4. https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
  5. https://docs.ipfs.tech/concepts/what-is-ipfs/
  6. https://filecoin.io/
  7. https://vitalik.ca/general/2022/01/26/soulbound.html
  8. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4105763
  9. https://photochromic.io/
  10. https://messari.io/asset/ethereum/chart/txn-fee-avg
  11. https://ethereum.org/en/developers/docs/scaling/#scaling-overview
  12. https://ethereum.org/en/developers/docs/scaling/zk-rollups/
  13. https://metamask.io/
  14. https://brave.com
  15. https://ens.domains/