What Is Peer-To-Peer (P2P)?

What Is Peer-To-Peer (P2P)?

Peer-to-peer technologies remove the middlemen from online platforms, enabling the creation of decentralised services that operate with no single points of failure.

Conventional online services are centralised: they are run by a company or organisation that has a high degree of control over the servers on which the platform is hosted. Whether the service is a search engine, social media network, or a bank or other payment processing service, that has implications for users.

As well as having access to user information, the ability to determine how the service is used, and the power to prevent certain parties from interacting with it, these centralised managers can also charge whatever fees they want – whether in money or data.

Peer-to-peer services operate without any middlemen. Users interact more-or-less directly with one another. This removes the gatekeepers and single points of failure inherent in regular ‘Web2’ platforms, and enables the creation of decentralised, secure, open applications that anyone can use but that no one can control or shut down.

P2P networks

Peer-to-peer networks are the foundation of P2P online services. When messages are sent over a regular Web2 service, they are processed by centralised servers. The message may be passed on to its intended recipient, but it may be deleted, delayed, altered, or corrupted by the server or the middlemen who run it.

P2P networks work differently, relaying messages from user to user with no central server, until they reach the recipient. P2P networks arose in the 1980s but were popularised in 1999 with the creation of the file-sharing service Napster.

Napster was largely used for illegal music sharing, and was shut down in 2001. This was only possible because Napster was not truly decentralised: it relied on a central index to point users to the right location for the file they wanted.

In the years following Napster, new models of P2P network were developed that enabled communication and file sharing without any central parties at all. These networks are run solely by their users, and cannot easily be shut down – removing any user, or group of users, does not prevent the rest of the network from communicating effectively.

Today, P2P networks underpin a range of online services, since they are robust and resistant to interference. P2P networks are one of the foundations of blockchain technology, which powers P2P currencies and decentralised financial services.

P2P Currencies

Announced in 2008 in Satoshi Nakamoto’s white paper, Bitcoin is described as a ‘Peer-to-Peer Electronic Cash System’. That is, it is a form of online money that operates with no middlemen at all, doing away with banks and traditional payment processors.

Bitcoin and other P2P currencies are built on blockchains – decentralised ledgers that are not managed by any single party. Users communicate over a P2P network, so there are no gatekeepers, and the ledger is stored on thousands of computers distributed all around the world. There is no single organisation or company tasked with keeping accounts, as there is in the case of a bank. If any given copy of the ledger is corrupted or deleted, there are many others that can be used to establish consensus about the true and accurate balance for each user.

Bitcoin and first-generation digital currencies simply allow funds to be transferred peer-to-peer. More complex and far-ranging blockchain platforms were launched in the years following Bitcoin, enabling sophisticated applications to be run without any third parties. Smart contracts, or code that runs on the blockchain, allowed the launch of a new generation of decentralised financial services.

Decentralised Exchanges (DEXs)

Some of the first decentralised finance (DeFi) applications were decentralised exchanges, or DEXs. Conventional centralised crypto exchanges have proven to be insecure, with billions of dollars lost or stolen through hacks, incompetence, and insider scams.

Just as P2P networks allow users to communicate directly, and P2P currencies like bitcoin allow them to transfer value with no third parties, decentralised exchanges enable users to swap funds from one currency or token to another, without relying on a central company or platform.

The first decentralised exchanges sought to replicate the user experience for conventional exchanges, with order books and bid/asks, but these proved to be difficult to implement well on the blockchain. Soon, a new generation of DeFi-native exchange was developed: the Automated Market Maker (AMM), which allows users to trade trustlessly against a pool of funds provided by users and controlled by a smart contract. Traders are quoted a single price for their buy or sell, and are guaranteed there will be liquidity. Meanwhile those who deposit the funds to trade against, the liquidity providers, receive trading fees and sometimes additional tokens as rewards.

Decentralised Finance (DeFi) Services

DEXs are only one of many DeFi products now available. Other applications enable users to conduct a wide range of financial services to which they would not otherwise have access through the mainstream financial sector. These include borrowing and lending one crypto using another as collateral (e.g. Aave and Compound); generating stablecoins against crypto collateral (MakerDAO and Dai); trading synthetic assets (Synthetix); margin trading (dYdX) and many more.

These decentralised financial services are built on the blockchain, ensuring that their infrastructure is distributed around the world and, unlike traditional financial services, cannot be shut down. However, they are generally also managed by a decentralised governance community. Instead of having a board or a CEO responsible for running the project, decisions are taken collectively by a large number of token holders. Community members put forward proposals, which can then be debated, before a vote is held. The outcome may even be executed automatically on the blockchain.

This means there is no single point of failure in the governance process either – no individual or group of people who can unilaterally decide to add or remove functionality, block users, increase or decrease rewards, and so on. Instead, the project is run entirely by its users, for its users. The combination of a DeFi protocol that is run by a decentralised governance community is known as a Decentralised Autonomous Organisation, or DAO.