{"id":2476,"date":"2022-11-01T17:59:22","date_gmt":"2022-11-01T17:59:22","guid":{"rendered":"https:\/\/metaschool.so\/articles\/?p=2476"},"modified":"2023-04-15T01:10:52","modified_gmt":"2023-04-15T01:10:52","slug":"peer-to-peer-p2p","status":"publish","type":"post","link":"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/","title":{"rendered":"Peer-to-Peer (P2P)"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_56_1 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#What_is_P2P_in_crypto\" title=\"What is P2P in crypto?\">What is P2P in crypto?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#Peer-to-peer_networks_and_exchange\" title=\"Peer-to-peer networks and exchange\">Peer-to-peer networks and exchange<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#A_bit_about_how_a_peer-to-peer_blockchain_network_works\" title=\"A bit about how a peer-to-peer blockchain network works\">A bit about how a peer-to-peer blockchain network works<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#How_P2P_exchange_works\" title=\"How P2P exchange works\">How P2P exchange works<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#Types_of_P2P_networks_in_blockchain\" title=\"Types of P2P networks in blockchain\">Types of P2P networks in blockchain<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#1_Structured\" title=\"1. Structured&nbsp;\">1. Structured&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#2_Unstructured\" title=\"2. Unstructured&nbsp;\">2. Unstructured&nbsp;<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#Features_of_P2P\" title=\"Features of P2P&nbsp;\">Features of P2P&nbsp;<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#1_Decentralization\" title=\"1. Decentralization\">1. Decentralization<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#2_Security\" title=\"2. Security\">2. Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#3_Self-organization\" title=\"3. Self-organization\">3. Self-organization<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#Drawbacks_of_peer-to-peer_blockchain_networks\" title=\"Drawbacks of peer-to-peer blockchain networks\">Drawbacks of peer-to-peer blockchain networks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/metaschool.so\/articles\/peer-to-peer-p2p\/#Final_words_and_the_future_of_P2P_networks\" title=\"Final words and the future of P2P networks\">Final words and the future of P2P networks<\/a><\/li><\/ul><\/nav><\/div>\n\n<h2 class=\"wp-block-heading\" id=\"what-is-p2p-in-crypto\"><span class=\"ez-toc-section\" id=\"What_is_P2P_in_crypto\"><\/span>What is P2P in crypto?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A peer-to-peer (P2P) network in crypto is a type of decentralized network in which computers or nodes communicate with each other directly without the need for a central server or authority.&nbsp;<\/p>\n\n\n\n<p>Each node in the network can act both as a client and a server, enabling users to share resources and information directly with each other. In a peer-to-peer network, there is no need for a central server.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"peer-to-peer-networks-and-exchange\"><span class=\"ez-toc-section\" id=\"Peer-to-peer_networks_and_exchange\"><\/span>Peer-to-peer networks and exchange<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Two things are super important to know &#8211; the inception of <a href=\"https:\/\/metaschool.so\/blockchains\/bitcoin?ref=Articles&amp;utm_source=Blog_Organi\">Bitcoin<\/a> and the application of P2P architecture on the blockchain. Bitcoin came into existence in 2009. It was one of the first cryptocurrencies to operate on a this model.&nbsp;<\/p>\n\n\n\n<p>Soon, it became a platform that enabled users of crypto and Bitcoin to directly trade coins and currencies with each other. Now, P2P networks and trading are two different concepts that may overlap in some places but have varying functions and meanings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a-bit-about-how-a-peer-to-peer-blockchain-network-works\"><span class=\"ez-toc-section\" id=\"A_bit_about_how_a_peer-to-peer_blockchain_network_works\"><\/span>A bit about how a peer-to-peer blockchain network works<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Imagine a user sending a certain cryptocurrency\/coin to another user. This amount will be relayed and broadcast to every single node within the network. A <a href=\"https:\/\/metaschool.so\/articles\/what-is-an-rpc-node\/\">node<\/a> is a server that helps validate a transaction and secure the network.<\/p>\n\n\n\n<p>Because a P2P blockchain works on a decentralized system, no one entity will have control over the network. The blockchain protocol of peer-to-peer nodes will push the validated and verified transaction inside a specified block and the other user will have received the amount sent by the first user. This data will be recorded on an <a href=\"https:\/\/metaschool.so\/articles\/immutable-blockchain\/\">immutable<\/a> <a href=\"https:\/\/metaschool.so\/articles\/blockchain-ledger-meaning\/\">ledger<\/a>. Bitcoin, for example, is a peer-to-peer blockchain network that allows users to transact directly with each other without intermediaries.<\/p>\n\n\n\n<p><a href=\"https:\/\/metaschool.so\/articles\/validator-blockchain\/\"><strong>Important read: What is a validator?<\/strong><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-p2p-exchange-works\"><span class=\"ez-toc-section\" id=\"How_P2P_exchange_works\"><\/span>How P2P exchange works<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In the crypto realm, P2P exchange, as the name goes, is a type of trading or <a href=\"https:\/\/metaschool.so\/articles\/dex-decentralized-exchange\/\">decentralized exchange (DEX)<\/a> in which individuals can trade different currencies. The way it is different from a P2P blockchain network is that P2P trading is usually done on a platform that could be a <a href=\"https:\/\/metaschool.so\/articles\/building-a-dapp-guide\/\">decentralized app (dApp)<\/a> or <a href=\"https:\/\/metaschool.so\/articles\/what-is-a-smart-contract\/\">smart contract<\/a>.&nbsp;<\/p>\n\n\n\n<p>P2P trading is an application of blockchain technology that allows users to exchange value directly with each other, while what P2P blockchain networks have is more of an underlying infrastructure that enables the decentralized and secure transfer of assets.<\/p>\n\n\n\n<p>To summarize, P2P trading on blockchain and P2P blockchain network, as a whole, are two different concepts. P2P blockchain networks have existed since the early days of crypto but the P2P crypto trading platform was first launched in 2012 by the name of LocalBitcoins.<\/p>\n\n\n\n<p>Lastly, P2P blockchain technology has not just been used in trading. It has also been used in messaging, file sharing, content distribution, and computing power as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-p2p-networks-in-blockchain\"><span class=\"ez-toc-section\" id=\"Types_of_P2P_networks_in_blockchain\"><\/span>Types of P2P networks in blockchain<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This article majorly focuses on P2P networks in crypto and there are two main types of P2P networks:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-structured\"><span class=\"ez-toc-section\" id=\"1_Structured\"><\/span>1. Structured&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Structured, as the name implies, are those networks that follow a topology, and have a structure. The nodes in such a blockchain network are properly assembled, allowing them to retrieve specific data. Mostly those blockchains that support the <a href=\"https:\/\/metaschool.so\/articles\/proof-of-stake-pos-meaning\/\">Proof-of-Stake (PoS) <\/a>consensus mechanism are considered structured.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-unstructured\"><span class=\"ez-toc-section\" id=\"2_Unstructured\"><\/span>2. Unstructured&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Unstructured networks are the opposite of structured networks. They are not organized. The nodes are connected but in a jumbled-up manner. Mostly those blockchains that support the <a href=\"https:\/\/metaschool.so\/articles\/proof-of-work-meaning\/\">Proof-of-Work (PoW) <\/a>consensus mechanism are considered structured.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"features-of-p2p\"><span class=\"ez-toc-section\" id=\"Features_of_P2P\"><\/span>Features of P2P&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are multiple features of P2P networks and they are as follows:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-decentralization\"><span class=\"ez-toc-section\" id=\"1_Decentralization\"><\/span>1. <strong>Decentralization<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>As mentioned above, P2P networks in blockchain are decentralized meaning no one entity has concentrated power. The decisions are mostly made via nodes. Only the transactions that have been validated and verified are added to a <a href=\"https:\/\/metaschool.so\/articles\/block-meaning-blockchain\/\">block<\/a> and consequently recorded on a ledger.&nbsp;<\/p>\n\n\n\n<p>If a user or server\/node tries to change the data or stop a transaction midway, they won\u2019t be able to do it because there is no central authority. It is the nodes that do the work following a specific consensus mechanism.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-security\"><span class=\"ez-toc-section\" id=\"2_Security\"><\/span>2. <strong>Security<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>P2P <a href=\"https:\/\/metaschool.so\/blockchains?ref=Article&amp;utm_source=Blog_Organic\">blockchain networks<\/a> are some of the safest products of technology in the world today. Because there is no central authority, the safety measures are even stronger and stricter. Imagine this: Transactions in a blockchain are recorded on a public and private ledger. The private ledger is, of course, private and has the relevant details including the identities of the users.&nbsp;<\/p>\n\n\n\n<p>A public ledger, however, is public yet it does not necessarily have to have the identities of the users revealed. Unauthorized access is the biggest foe of P2P blockchain networks and encryption, a deal maker.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-self-organization\"><span class=\"ez-toc-section\" id=\"3_Self-organization\"><\/span>3. <strong>Self-organization<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is one of the greatest benefits of a P2P network in the blockchain. Regulation is a big hassle in the centralized world. If humans are replaced with nodes\/servers on a blockchain, and somehow one of the humans is absent, there will be chaos because there won\u2019t be networking between them.&nbsp;<\/p>\n\n\n\n<p>Nodes, however, are not humans. If one server stops working, the transaction verification process will continue accurately and in a balanced way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"drawbacks-of-peer-to-peer-blockchain-networks\"><span class=\"ez-toc-section\" id=\"Drawbacks_of_peer-to-peer_blockchain_networks\"><\/span>Drawbacks of peer-to-peer blockchain networks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The peer-to-peer protocol in a blockchain does not have many drawbacks but there are some scalability issues because as a blockchain network grows broader and bigger, it faces troubles with expansion which leads to problems like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Attacks from hackers<\/li><li>Challenges in user experience<\/li><li>Compromised security and quality&nbsp;<\/li><li>Decreased number of transactions in a second<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"final-words-and-the-future-of-p2p-networks\"><span class=\"ez-toc-section\" id=\"Final_words_and_the_future_of_P2P_networks\"><\/span>Final words and the future of P2P networks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The future of P2P networks is dependent on several factors. <a href=\"https:\/\/metaschool.so\/articles\/?s=layer+2\">Layer 2<\/a> technology is on the rise these days because the original P2P (read: <a href=\"https:\/\/metaschool.so\/articles\/layer-1-blockchain\/\">Layer 1<\/a>) cryptocurrencies are facing major scalability problems.&nbsp;<\/p>\n\n\n\n<p>However, as far as the future of P2P networks is concerned, factors like regulations by the state regarding crypto, user adoption, and market trends will have a great say and impact on the whole ecosystem.&nbsp;<\/p>\n\n\n\n<p>When it comes to adoption, the acceptance of cryptocurrencies is increasing which is a positive sign but regulatory challenges have been there since the beginning and may prove to be a hassle if proper laws and measures are not advocated for.<\/p>\n\n\n\n<p>One thing that could be predicted is that the main P2P blockchains, the OGs of the crypto world, are currently working in silos and in their own ecosystem. With time and with the evolution of technology, they may end up becoming more interoperable.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":5429,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[73],"tags":[51,74],"class_list":["post-2476","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web3-crypto-glossary","tag-blockchain","tag-web3-glossary"],"_links":{"self":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/2476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/comments?post=2476"}],"version-history":[{"count":11,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/2476\/revisions"}],"predecessor-version":[{"id":5490,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/2476\/revisions\/5490"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media\/5429"}],"wp:attachment":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media?parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/categories?post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/tags?post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}