An Introduction To Terminologies And Layers In Web3

An Introduction To Terminologies And Layers In Web3

The article is a part of a series of articles that talks about blockchain, web3, smart contracts-based projects, and terminologies around it.

Ruchika Gupta's photo
Ruchika Gupta
·May 9, 2022·

8 min read

Play this article

Table of contents

  • What is Web3?
  • How is Web3 different?
  • How does Web3 work?
  • Technical Terminologies Around Web3
  • Layers Of The Web 3.0 Architecture
  • Conclusion
  • What's next?

What is Web3?

The history of web is as old as the history of the internet itself. Web3, web3.0, or web3 is the latest buzzword that has taken over the internet. It's an idea of a utopian world made famous by giant tech companies and returned to us folks. It is essentially an idea of democratization of the internet rather than the corporatization that we see today. Here is an image showing how the web has evolved over the years:

Screenshot 2022-03-09 at 12.01.58 PM.png

How is Web3 different?

Web3.0 is decentralized, and that's what set it apart from its predecessors but however, it is still interactive like web2.0. The idea of web3.0 is that external parties will have a lot less control, or we get rid of them altogether. However, this is also where the functioning starts to get pretty complicated. Blockchain101

How does Web3 work?

The technology at the core of web3 is blockchain. Blockchain is the underlying tech of the entire ecosystem that underpins web3, NFT's and cryptocurrencies. Web3 is synonymous with everything crypto these days and the majority of web3 projects are dAaps that runs on the ethereum networks.

The idea is that the data would be kept in decentralized storage instead of dedicated server farms as is the case now. This data would be registered in a digital ledger ie. the blockchain making the flow of data very transparent and this would also prevent misuse.

Advantages Of Web3

Here are some advantages that web3 offers: SECURITY: Blockchain is secure and tamper-proof, due to its usage of cryptography and strong hashing methods because of which data cannot be changed or hacked without interference being detected.

OPEN: Apps built on web3 are open-source software by an open and accessible community of developers and executed in full view of the world.

COLLABORATION: Web3 runs on a DAO (Decentralized Autonomous Organization), a new management model without boards and executives. These autonomous organizations operate according to a set of rules written in code, allowing an unlimited number of people to participate in it and collaborate towards its growth.

OWNERSHIP: Since web3 runs on decentralized networks, these are democratizing content creation and eliminating the middleman. These apps allow communities to earn tokens for community participation and activity directly and since these tokens have monetary values, it gives the user meaningful ownership of the project.

Objections To Web3

Here are some objections that have been raised against Web3:

SECRECY: In a decentralized world, secrecy would be out of question which may not be something everyone wants.

THEORETICAL: However its biggest objection is based on the fact that it is completely theoretical. ie. it predicts a utopian world that relies on technology that does not even exist currently.

SCALABILITY: Another drawback of web3 comes from a disadvantage of the blockchain itself, which is scalability. At present, decentralized networks like Ethereum can process around thirty transactions per second and with Ethereum2.0, this is expected to increase up to a hundred thousand transactions per second.

Technical Terminologies Around Web3

Here are some of the most popular terminologies revolving around Web3 that you need to know:

Smart Contract: We have discussed smart contracts in detail in our previous blogs. Read about it in detail here. In short, a smart contract is the backend code that we deploy on a Blockchain network, say Ethereum Blockchain and it is deployed in the bytecode format.

Application Binary Interface: ABI, in short, is an interface through which we allow our application to interact with the deployed smart contract using a smart contract address. For Ethereum and EVM, a smart contract is just this sequence of bytecode. To access functions defined in high-level languages, users need to translate names and arguments into byte representations for the byte code to work with. Languages that compile the EVM maintain strict conventions about these conversions but in order to perform them, one must know the precise names and types associated with the operations. The ABI documents these names and types precisely and in easily parseable formats doing translations between human-intended method calls and smart-contract operations discoverable and reliable. A typical ABI looks as shown below:

var simpletokenContract = web3.eth.contract([{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]);
var simpletoken = simpletokenContract.new(
   {
     from: web3.eth.accounts[0],
     data: "0x608060405234801561001057600080fd5b50620f42406000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061025280",
     gas: '4700000'
   }, function (e, contract){
    console.log(e, contract);
    if (typeof contract.address !== 'undefined') {
         console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
    }
 })

Block: A block is a batch of transactions written in the blockchain. Every block contains information about the previous block, thus, chaining them together.

Consensus: Consensus is referred to as a state of agreement amongst the nodes on a blockchain. Reaching consensus is necessary for new transactions to be verified and new blocks to be added to the blockchain.

Transactions: Transactions are operations that change the state of a blockchain, say Ethereum. For example, if Suresh sends Pushkar 1 ETH, Suresh's account must be debited and Pushkar's must be credited. This state-changing action takes place within a transaction.

Gas: This is a fee paid by a user to conduct a transaction or execute a smart contract on the Ethereum blockchain.

Mining: In a Proof of Work system, this is the process of verifying transactions and organizing them into blocks, and adding it to the blockchain. Participants who perform this process are called miners.

Proof of Work: This is a consensus mechanism that requires miners to complete complex mathematical puzzles in order to verify transactions and mint blocks. When a miner correctly solves a puzzle, they gain access to mint the next block and receive the corresponding block reward and transaction fees.

Proof of Stake: This is a consensus mechanism that requires nodes called validators to stake a set amount of cryptocurrency on the blockchain in order to verify transactions and mint blocks.

DAO- DAO refers to Decentralised Autonomous Organisation and it is based on open-source code and governed by its users. It's a community-led entity that is fully autonomous and transparent. These are essentially algorithms(Smart contracts) to execute the agreed-upon decisions. For example: Bitcoin can be considered a DAO, where people enter into agreements to buy and sell the cryptocurrency according to a set of terms, and everything is tracked on the Bitcoin blockchain.

DApp- These are Decentralised Applications built on open-source code that lives on the blockchain. These are applications built on a decentralized network that combines a smart contract and a frontend user interface.

There are other terminologies such as ERC(Ethereum Request for Comments), Fiat, Fungible, NFT, ICO, and so on. We will cover them in our later articles.

Layers Of The Web 3.0 Architecture

Refer to the image given below to understand the context of the explanation regarding the layers of the Web3 architecture: Blockchain101_1

  • The application layer will have the dApp browser, application hosting, dApp, and user interfaces applications that serve as the entry point for all manner of Web3 activities..
  • The second stage of layers basically goes into the technology layer. This layer covers all the important tools involved to create and run the application layer. It usually covers data feeds, off-chain computing, governance (DAOs), state channels, and side chains.
  • The protocol layer covers the different consensus algorithms, participation requirements, virtual machines and many more.
  • The network layer acts as a transportation medium and interface for the peer-to-peer network and decides how data is packetized, addressed, transmitted, routed, and received. It mainly consists of RLPx, Rolls your Own, and Trusted Execution Environments (TEE).
  • At the bottom of the stack, we have the infrastructure layer. This is made up of the underlying blockchain architecture on top of which everything else gets built.

You can refer to this link to learn more about it.

Technology Layer In Web 3.0

Refer to the image given below to gain an understanding of the technology layer of web3: Group 10.png Each technology layer in web3.0 consist of more than one protocol. Here is how the layering happens:

Layer 0 consists of the following:

  1. P2P internet overlay protocols: Devp2p, Libp2p.
  2. Platform-neutral computation description language: WASM, EVM, etc.

Layer 1 consists of the following:

  1. Data distribution protocols: IPFS.
  2. Low-trust interaction platforms: Polkadot.
  3. Low-trust interaction protocols: Ethereum, Bitcoin, etc.
  4. Transient data messaging: Whisper, Matrix.

Layer 2 consists of the following:

  1. State channels
  2. Plasma Protocols
  3. Encrypted Storage, etc.

Layer 3 consists of the following: Protocol-extensible developer APIs & languages: Web3.js, ether.js, Solidity, Rust.

Layer 4 consists of the following: Protocol-extensible user-interface cradle: Metamask.

Conclusion

If all of this is making your head spin, you’re not alone! Cobbling together all of these tools is complex and can lead to a painful developer experience.

With growing concerns over data privacy each day, web3 innovations are going to come up faster than ever. It is important that you equip yourself with a basic understanding of this space as it is going to impact the way we work.

What's next?

Most people spend months figuring out how the tooling chain works I hope this article saved you some time if you're new to building dApps.

If building Web 3.0 applications is something you are interested in, then look for our next article of the series which talks about Development platforms around web3 where you will learn about different existing services available in web3.

This article is part of Research & Development work being done by Pushkar Kumar, Suresh Konakanchi, and Ruchika Gupta. We will be covering a series of articles along with open source projects around blockchain, smart contracts, and web3 in general. Here is the list of all the articles that you can follow to start with Blockchain and write your first contract:

 
Share this