DEV Community

Cover image for What is WEB3 and Why Is It gaining so much of a Traction ?
Pramit Marattha for Aviyel Inc

Posted on • Originally published at aviyel.com

What is WEB3 and Why Is It gaining so much of a Traction ?

Everything began with web 1.0, an information transit hub of documents connected by Hyperlinks. The mechanism worked well until 2004, but when we saw the beginnings of web 2.0, things changed, with more people participating in the web through platforms such as Google, YouTube, Facebook, Twitter, resulting in massive centralized tech conglomerates that controlled the flow of information and money on the internet.

Tech corpo

We live in fascinating times because we've arrived at the critical juncture of web 3.0, a decentralized yet secure internet in which people may exchange money and information without the need for a middleman such as a bank or a tech company. This blog article serves as a comprehensive introduction to the wild world of web 3.0. It's humbling to get into it because it causes you to feel like you know nothing whatsoever.

Let's dive into its ecosystem from a critical perspective and try to answer questions that the whole world has been asking about web3.0. Get ready to know- "is web 3 bs" or "should I even bother getting into it?" I believe the answer to both is yes. There's obviously a lot of hype around web3, but not everyone is buying it, even Elon Musk said β€œWeb3 sounds like bs” just a few days ago on Twitter.

Tweet

The very harsh reality of web 3 is that venture capitalists and silicon valley insiders control many of the companies and the cryptocurrencies they issue. This isn't always the case, but much of the industry is bolstered up by Fear Of Missing Out, and there are a lot of scams and shady stuff to be aware of but there are actually genuine smart people out there making a very good argument about how web 3 lacks the computing power, bandwidth, and storage to scale on any practical level. The scammers and tricksters will tell you that crypto is growing faster than the internet was in the 1990s, but that's a ridiculous argument because crypto is built on top of the internet itself.

Crypto Internet

Crypto will never be as revolutionary as the internet, but that doesn't mean it won't be significant. Here's how we should think about it: let's assume it's 1990, and things are just getting started. The best-case scenario is that web 3.0 will continue to grow for another 10 years, completely revolutionizing the way the world works; on the other hand, the worst-case scenario is that the cryptocurrency bubble has already burst, and as it crashes, it will take web 3.0 down with it. For comparison, when the dot-com bubble burst, Amazon's stock fell by a whopping 90%. Source

Amazon Stock

However, they were one of the fortunate enterprises that managed to survive. Imagine what will happen to web3.0 if Ethereum plummets down by 90%, but the next question is whether we even need cryptocurrencies to construct decentralized apps. Decentralized technology has been around for a long time, such as peer-to-peer file sharing with Napster in the 1990s or BitTorrent, which has a hundred million to Two Hundred million monthly active users. That said, cryptocurrency is still kind of essential because you need some form of payment to build up a creator economy, and banks are not an acceptable solution. It also provides the incentive for people to provide the computing infrastructure that makes it all possible.

Let's use the Ethereum blockchain as an example of how a decentralized app or DAPs on the blockchain works.

Ethereum

Although there are a variety of alternative cryptocurrencies available, Ethereum is similar to a large network of computers in which all participants agree on the same state of the data throughout the network. Ether is the cryptocurrency used on the Ethereum network to create transactions that change the state of the data.

Ethereum Transaction

When you broadcast a transaction, you also offer a small amount of ether as a reward for another computer in the network to complete the transaction. This is known as a gas fee, and it works similarly to how you pay for cloud computing resources on GCP(Google Cloud Platform), AWS(Amazon Web Services), and Azure. If you want things done faster, you pay more gas. Normally, when you build a web application, you write some back-end code and then deploy it to a centralized server like GCP, AWS, or Azure, but with a decentralized app on the blockchain, your backend code is contained in a smart contract, which is an application that lives on the blockchain that can govern the behavior of multiple accounts and is usually written in the solidity language.

Ethereum

A decentralized app also requires a front end that can be developed similarly to a traditional website, with the exception that user identification is handled differently. So, how does user identity function in a decentralized app? The end-user owns all of their data, so there's no need for the developer to collect a username and password. Instead, the end-user has a public wallet address that can receive payments and a private key that can sign transactions to send payments to someone else. The user can then connect their wallet to a browser plugin like metamask, and your front-end application, such as a vue, react, and nextjs app, can then interact with that user's wallet to do something interesting in the UI for example purchasing the NFTs (Non-Fungible Tokens).

NFT

So, what the hell is an NFT? To begin, we must first grasp the basic understanding of "what is a token?"

Tokens

So a token is just a digital asset, similar to ether, the currency of Ethereum, that you can trade with other people. But the cool thing is that developers can create their own tokens in the form of smart contracts. A token is basically just a number in a smart contract mapped to a wallet address. In fact, if we wanted to create our own cryptocurrency, we could do so by writing a smart contract that gives an initial balance of 1 trillion tokens. It's conceivable to sell it to other individuals for 10 dollars, and then they sell it to their friends for 20 dollars and snowball it to 30 dollars. In that process, we might become super-rich. To be honest, that seems like a Ponzi scheme with extra steps.

Ponzi

But if you look closely everything is a Ponzi scheme, with the physical currency that we use on a daily basis, so there's no need to be concerned about ethics or anything about cryptocurrencies.

Crypto

So, what does it mean by fungible tokens? It simply means that one token has the same value as another token of the same size, or in other words, one coin is always worth the same as another coin. However, tokens can also represent assets that are not identical, such as Pokemon cards, digital artwork, house rents, and other items. Because each token is unique and represents a separate object, its actual market value may alter when exchanged for another type of currency.

Open seas

There is a large non-fungible token (NFT) frenzy on the market, with entire marketplaces like open seas springing up to sell digital artwork as non-fungible tokens, which is actually a perfect example of a highly polished web 3 app so let's speak about Web3 technology. What does a web3 application's front end look like? For the most part, it's not much different from a regular web app. You'll probably utilize a UI library like react, vue, or next, as well as all of your other front-end tools. When it comes to user authentication, things change because, as previously said, the end-user utilizes a plugin such as metamask to make their public wallet details available to a decentralized app. Now the question is how do we as developers connect to metamask.

Metamask

It's actually quite simple because metamask creates a global object on the browser window that we can use to access wallet details. Figuring out what to do with this data is a little more difficult, but luckily there are libraries to help us out. The two most popular options are web3.js and ethers.js

Web3 and ether

These libraries provide a javascript-based API that makes interacting with users and smart contracts on the blockchain much easier.

The front end of a web3 application is fairly standard and straightforward, but let's look at the back end of a web3 application. Instead of a server and database like node, PHP, and MySQL, you'll be working with smart contracts. There are frameworks available to help with development; two of the most popular options are hardhat and truffle.

Hardhat and truffle

These frameworks will give you a place to develop a smart contract in Solidity. It's essentially an object-oriented language designed specifically for writing smart contracts on the blockchain. While this may sound intimidating, there's a project called openzeppelin that provides templates for writing smart contracts that adhere to industry standards, making it extremely simple to implement reliable code right out of the box.

open zepplin

Another thing that a development toolchain will do for you is to provide a script to deploy your smart contract to the blockchain. It's just a simple node script that signs a contract with your credentials and deploys it to an address on the blockchain. Now you might be wondering how do I test this code before I deploy it because I have no idea if it actually works. That's something that hardhat and truffle can help you with. They can set up a testing network as well on localhost and produce a lot of fake crypto wallet addresses to use for testing in the browser. so people can then connect Metamask to their testing network instead of the real Ethereum network.

Furthermore, if you're working on a serious project, you should think about writing automated tests for it, and there's a library called Waffle that can help you with that.

waffle

But there's one more question: "Do I put all of my data on the blockchain?" The answer is no, storing anything on the blockchain is inefficient and unnecessary, which is where off-chain storage comes in.

In some cases, data may be too large to store on the blockchain, or it may need to be modified or deleted, which is not possible in a blockchain where all data is read-only. The most common solution is the interplanetary file system, or IPFS, which is a decentralized way to share files similar to how BitTorrent works. There are also databases built on top of IPFS, such as orbitdb and threaddb, which are similar to a peer-to-peer version MongoDB database.

Orbit and thread db

Conclusion

Web 3.0 is a refinement of Web 2.0, which is a service-oriented web that promotes and facilitates user collaboration and communication. Despite the lack of agreement on the specific traits that characterize Web 3.0, many experts agree that semantic technologies and customization techniques play a very important role in it.

From this perspective, Web 3.0 might be viewed as a semantic and personalized variation of Web 2.0. Tons of features of Web 3.0 are currently available; others will appear in the future, and stunning modern technology will continue to amaze us. Web 3.0's ultimate global information architecture will boost network activity and internet traffic, open up new markets for unique content.

Main article available here => https://aviyel.com/post/1513

Follow @aviyelHQ or sign-up on Aviyel for early access if you are a project maintainer, contributor, or just an Open Source enthusiast.

Join Aviyel's Discord => Aviyel's world

Twitter =>[https://twitter.com/AviyelHq]

Top comments (1)

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ • Edited

I'm with Elon on this one. This web3 stuff really doesn't seem like a good future... particularly if it involves blockchain - which is extremely wasteful of resources and still looks in most cases like a solution looking for a problem.