คลังคำศัพท์

Peer-to-Peer (P2P)

Easy

The decentralized interactions between parties in a distributed network, partitioning tasks or workloads between peers.

What Is Peer-to-Peer (P2P)?

Peer-to-peer (P2P) refers to a distributed network where “computer systems” communicate with each other to share data or tasks. This means that two or more parties arranging and agreeing to deal with each other are sufficient for the whole process to occur. Furthermore, a central server isn’t required to facilitate and manage such communication. 
All peers are considered equal and enjoy the same privileges. The only requirement to access a P2P system is an internet connection and a copy of the software (or protocol) used. Peers or nodes generally make all or some parts of their resources available to the network in the absence of a central server processing request and managing resources/tasks. 
P2P has special significance in the context of cryptocurrencies and blockchain. For instance, Bitcoin’s whitepaper defines its protocol as “A Peer-to-Peer Electronic Cash System” — a reference to the mutually beneficial and equal involvement of all participants without the need for any intermediaries. All peers or nodes of a blockchain typically have the same copy of records of accounts and transactions history, although miners (and other “full nodes”) who contribute processing power to the network in lieu of block subsidies and transaction fees have a more complete copy of the records. 
Bitcoin is a true peer-to-peer protocol that doesn’t rely on any third party with centralized control, but P2P doesn’t always have to be blockchain-based. BitTorrent was originally not blockchain-based (before Tron acquisition), yet it is considered one of the largest decentralized peer-to-peer systems.
In 1999, the peer-to-peer structure became more widely used with the launch of file-sharing systems, like Napster, offering digital audio file sharing without needing a central server. Since then, different types of P2P networks have been created, like BitTorrent, for file-sharing, Tor, an anonymous communication software, and Bitcoin, a decentralized cryptocurrency protocol.

How Do Peer-to-Peer Blockchain Networks Work?

In traditional finance, banks are responsible for storing and transferring funds and verifying and recording transactions in their ledgers. They have access to their own servers for recordkeeping, which aren’t available to the public. With banks, “the math is based on trust.” 

P2P blockchain networks, in contrast, allow anyone to send, receive and verify data in a decentralized and cryptographic manner, thus “the trust is based on math.” In such a P2P network, each singular peer is also called a node which keeps the network up and running by acting as a client and server. This means that all peers do the same job: receiving, processing, and broadcasting digital data.
Cryptocurrency transactions from one crypto wallet to another rely upon blockchains that use consensus algorithms to determine the validity of transactions, verify legitimate transactions, and prevent double-spending. Blockchains are essentially a way to ensure that various types of data (including cryptocurrency transactions) can’t be counterfeited or manipulated. Every user receives a copy of the ledger, which has all the information about each transaction.  

Peer-to-Peer Decentralized Exchanges and Bridges

Within crypto, technologies such as peer-to-peer decentralized exchanges (P2P DEXs) and P2P bridges are used to successfully facilitate trades between two parties. P2P trading platforms match buyers and sellers via decentralized order books. The platform usually takes a small fee for each trade completed and requires users to store their funds in a separate digital wallet within the platform during the trade. Users have the freedom to pick the best rate and payment method, which usually results in lower costs, and a higher level of security as no intermediary is involved.
P2P DEXs and bridges are powered by cross-chain atomic swaps. They facilitate the exchange of assets for two parties across separate chains without having to rely on centralized third parties. They are described as “atomic” because the mechanism will either finalize the whole transaction or not initiate it at all. For each swap, trades are either completed in which case the two users exchange funds or they’re not completed and the original funds are distributed back to the two users making them “trustless”. This is what makes atomic swaps a safe option for cross-chain transactions. 
With P2P DEXs and bridges, any user can trade anywhere in the world safely and securely. Many centralized crypto exchanges need a user’s identity proof like a full name and email address, but P2P DEXs and bridges remain completely either pseudonymous or anonymous, providing convenient ways to transact without involving a third party. The user has complete control over their transactions. 

P2P DEXs and bridges offer a high level of security since all transactions are direct so there is no risk of fraud or hacks. Other types of bridges and DEXs such as AMMs deposit funds in liquidity pools of centralized third parties where the funds can be vulnerable to hacks. Scalability is also a big advantage when using P2P as it can handle far more transactions at any given time than traditional exchanges.

Benefits of P2P 

Because P2P is decentralized, it is more resistant to cyber-attacks and more scalable. As more users join the network, the more resilient and scalable it becomes. P2P crypto transactions also boast fast transaction speeds. Depending on the network being used, data transfers between two parties may only take a few seconds or minutes. 



Author: Kadan Stadelmann, CTO of Komodo, a leader in blockchain interoperability and atomic swap technology. 

Kadan Stadelmann is a blockchain developer, operations security expert, and Chief Technology Officer of Komodo, an open-source technology provider that offers all-in-one blockchain solutions for developers and businesses. Komodo works closely with organizations that want to launch their own custom decentralized exchanges, DeFi platforms, and independent blockchains. Its flagship technology and end-user application is AtomicDEX - a mobile and web-compatible non-custodial multi-coin wallet and atomic swap-powered DEX rolled into one dApp. 

Kadan strongly identifies with Komodo’s open-source vision and ideology. His dedication to the Komodo project is founded on an unwavering desire to make the world a better place. In addition to cryptography, blockchain technology, and development, Kadan is interested in literature, mathematics, astrophysics, and traveling.

Related Articles