This is How Blockchains Work in Web3
Web3 is the new era of internet. When previously users have needed to rely on third parties to use the internet effectively, Web3 introduces a decentralized way to navigate around the vast sea that is the world wide web. Right now, to find information from the internet, an intermediary is needed. Here is an example of how Web3 predecessor, Web2, works in practice: A user presses a search engine icon on their smartphone. They are thrown on a page that shows blank space, a keyboard, and a small magnifying glass icon. User can type in a prompt, hit the magnifier icon, browse different options, and find information. This all happened within seconds, and the search for information was successful.
The intermediary that was used to execute the action, is more than often a world-dominating company, Google. Google’s feet are placed so firmly on the foundation of the internet, that users often do not even realize they are utilizing a service from a privately-owned company. When an intermediary, like Google, is utilized as much as in today’s world, an unbreakable codependency in formed. Therefore, the innovation of Web3 is its decentralized attribute. This means that users do not have to rely on individual entities, like Google, Amazon or Meta and give out data in order to successfully use the internet. What is a blockchain and what role does it play in Web3? Web3 is built on a blockchain technology. This means that every transaction happening in Web3 is documented in a record of transactions, which allows a transparent and public operating system. The decentralization of the blockchain is made possible via a network of computers – nodes - that all have their own copy of the blockchain. Because tampering something that is documented within the blockchain is difficult, the technology adds trust between peers, that do not know each other in real life. Here is a simplified e
xample on how the blockchain tech works, provided by ChatGPT-4: “Imagine each transaction in a blockchain as a puzzle piece. Miners or validators collect these pieces and try to fit them together to form a complete picture (block). Once the picture is complete, it is added to the ever-growing puzzle (blockchain). Each piece is unique and fits perfectly into the puzzle, ensuring the integrity of the overall picture.” Like mentioned previously, the ‘puzzle’ is visible for outside-the-transaction inspectors, resulting in transparency and trustworthiness in the blockchain. There are many attributes to enable blockchains’ working. Decentralization - no need for intermediaries - is the most important one as it determines the nature of Web3 itself. On top of that, for blockchain technology to work, the following attributes are also needed: Transactions that work as building blocks, consensus mechanisms for maintaining the integrity of a blockchain, block validation to check if the block will make it into the blockchain, smart contracts for the success of peer-to-peer transactions and lastly, decentralized applications. Let’s break down each part:
Transactions Transactions are the building blocks of a blockchain. Basically, anything that moves in Web3 and is transferred from a recipient to another, is considered a transaction. The most common transaction is selling and buying cryptocurrencies, but one can also interact with smart contracts or, for example, transfer NFTs. These transactions are documented as blocks and added to the blockchain. Initially, a potential block needs to pass the block validation phase in order to make it to the blockchain. Block validation Before a block is added to the blockchain, it needs to be checked for integrity and correctness. Nodes that verify blocks are called “validators” or “miners”. They do it to make sure each block complies with the rules of the blockchain. Whenever a transaction is issued, it makes it to the validation queue. Depending on the value of the transaction and especially the transaction fees, they are either added to the blockchain after the check or they stay pending in the queue. Transaction fees are an incentive for validators and therefore, transactions including higher fees usually are checked and added as blocks more quickly. Consensus mechanism How do validators come in agreement on which transaction makes it to the blockchain and which does not? Consensus mechanisms are protocols and algorithms that make sure that agreement is reached. There are many consensus mechanisms, of which Proof or Work (PoW) and Proof of Stake (PoS) are the most common ones. The following metaphors used to describe PoW and PoS are created by ChatGPT-4. - Proof of Work: Imagine a race where participants must solve a series of challenging math problems to progress. In this metaphor the race means mining and math problems are cryptographic puzzles. The first participant to solve a problem and cross the finish line is rewarded. The rewards are cryptocurrencies or transaction fees for the miner who solved the math problem first. PoW is used by Bitcoin and due to the complexity of the puzzles, it is secure. - Proof of Stake: Imagine a voting system where participants have voting power proportional to the number of tokens they hold. They use their voting power to decide on proposals and the more tokens they have, the stronger their influence. Decisions are made based on the majority stake, and participants who hold a significant stake are more likely to be chosen as decision-makers. Ethereum blockchain, for example, uses PoS to validate transactions.
Smart contracts are agreements, that already include the execution of the transaction. They are lines of code that obey prompts “if…then…” to make sure that peer-to-peer transactions can be trusted. Smart contracts cannot be altered easily, which make it easier for transaction to stay secure and deliver what was promised. Smart contracts are aWeb3 as they enable automation for transaction without needing to rely on intermediaries, for example banks when trading crypto.
Decentralized applications (dApps) are software programs that usually run on a blockchain. In Web2, applications are centralized. A good example of a centralized application is Facebook. It is a company that has access to the platform’s functionalities and data, without an outside hand being able to touch the servers. In Web3, however, the data and control of the app is spread across multiple nodes, excluding the possibility of a single entity having the power over the server. This, again, allows users to interact peer-to-peer, without a third party.
Overall, blockchain technology is the key element of the next generation’s internet. It decreases – or removes - the demand to rely on intermediaries when using the web. World-dominating companies hold so much power in Web2, that Web3 will be a drastic switch to more user-centric internet, where greedy and possessive third-parties are not anymore needed.