The History of P2P Trading
Since the invention of cryptocurrency, early adopters have been seeking alternatives to on‐exchange trading. It has always been viewed as contradictory to the peer‐to‐peer nature of Bitcoin to have a central authority, like an exchange, keep record of customer balances and identities in a database, and facilitate transfers of local currency to cryptocurrency and vice versa.
Over the counter trading, which is where two parties exchange with one another directly without the supervision of an exchange, has therefore been an popular in cryptocurrency since Bitcoin's beginnings. OTC trading grants superior flexibility and security, as there are no restrictions on what you can swap for cryptocurrency, and person‐to‐person transactions don't involve a financial intermediary.
However, exchanging cryptocurrency with strangers online and in person carries a major risk: how do we ensure that both parties are going to hold up their end of the bargain, and not vanish as soon as money or cryptocurrency hits their account? This exposure is what's known as counter‐party risk.
One of the first innovations in early Bitcoin OTC trading was an online “web of trust” platform. The platform known as #bitcoin‐otc is a simple system where traders can leave other traders a public rating, and a website will calculate the cumulative trust received for each user. If a user has a higher rating, they're more reputable and less likely to run away. This system worked most of the time, but it wasn't flawless: people with high ratings would “cash in” on their reputation and pull off bigger heists, and scammers would create bogus accounts to manipulate the ratings.
The next evolution was an escrow system by LocalBitcoins in 2012. Instead of exchanging directly with each other, sellers of Bitcoin could now transfer BTC to LocalBitcoins first, then release the Bitcoin from escrow once confirming payment from the buyer.
If the buyer didn't send money, the seller could ask LocalBitcoins to intervene and return the coins. Similarly, if the buyer claimed to have sent money but the seller won't release the escrow, they could ask LocalBitcoins to review their proof of payment and force the seller to release the Bitcoins. The escrow system combined with a robust reputation system worked well.
But there was a huge problem: by offering an escrow service, LocalBitcoins made itself the new intermediary. If LocalBitcoins were hacked, went offline, or its founders decided to run away, all of the Bitcoins in escrow could be lost.
There is a tremendous amount of trust placed in this new centralized escrow system. With the escrow system, users no longer held the keys to their Bitcoin; instead, they're trusting LocalBitcoins to hold Bitcoins for them, like a bank or an exchange.
The escrow system didn't fix counter‐party risk—it only moved it somewhere else.
The launch of Ethereum introduced programmable money, which meant that many ideas not possible on the Bitcoin blockchain could now be achieved with Ethereum smart contracts.
Building on the ideas of a web of trust and an escrow system, LocalEthereum created a peer‐to‐peer OTC trading platform that kept users in control of their cryptocurrency at all times.
With the use of an Ethereum escrow smart contract, LocalEthereum invented an escrow system that never took custody of ETH in escrow. The platform's unusual escrow mechanism didn't involve an intermediary, as financial services involving trusted middlemen are widely considered antithetical to cryptocurrency.
The open source Ethereum escrow smart contract allowed the safe passage of ETH from a seller to a buyer. If there was a payment dispute, an arbitrator could be asked to step in to help, however its privileges were extremely narrow in scope: the arbitrator only had the ability to allow the ETH to be reclaimed by either party of the transaction. The smart contract code didn't allow the arbitrator to gain access to the ETH for themselves.
That meant that even in the event of a hack or a rogue arbitrator, the ETH in escrow would safely remain in control of the users at all times. It also meant that both parties always had the technical ability to settle the escrow outside of the LocalCryptos web interface, as long as they had the technical knowledge and willpower to do so.
In 2019, LocalEthereum made a major change and announced it was bringing its ideas to other cryptocurrency communities. On 18 November 2019, LocalEthereum relaunched as LocalCryptos and supported two cryptos at launch: Ethereum and Bitcoin.
The new LocalCryptos P2P trading platform was the first to implement P2P trading on Bitcoin using a decentralized non-custodial escrow system. It functioned very similarly to the Ethereum escrow smart contract described earlier, however it had to be designed using different building blocks as Bitcoin is vastly different to Ethereum.
Unlike the LocalEthereum escrow smart contract, the LocalCryptos non-custodial Bitcoin escrow script was developed using Bitcoin Script and utilizes a cryptographic commit-and-reveal scheme.
Future of P2P Trading
As cryptocurrency adoption grows, it is inevitable that the number of people who will be burned by centralized exchanges will too. Similar to those before them, an alternative that is safe, easy-to-use, and doesn't require immense trust in a centralized authority, will be sought out.
Especially as non-custodial P2P trading platforms become more user-friendly and functional, and the general knowledge about cryptocurrency security improves, self-custodial P2P trading will likely become common among all those interested in cryptocurrency.