In my previous post, I hinted that Consolidationg CoinJoin is going peer-to-peer. This article will explore some of the technologies I’ll be incorporating to do that. If you’re a developer and want to follow along, you can view the code here. It’s just prototype code at this point, but fully-tested, proof-of-concept libraries have been successfully created to prove out all the concepts presented here. The code is also MIT licensed, so feel free to do anything you want with it.
Using a blockchain to create a distributed ledger, as Bitcoin does, was an innovative solution to prevent censorship from state actors and thereby enforce individual sovereignty. It doesn’t try to fight or enforce laws, it makes laws obsolete by giving power to individual actors.
Unfortunately, blockchains are inherently inefficient, and their advantages can not easily be applied to the conventional client-server model used in almost all web applications today. But a new suite of technology is now available to democratize power, fight censorship, and obsolete any laws that encroach on the right to free speech. And, they work within the current paradigm.
Hiding Servers with Tor
I’ve been following Bitcoin technology since 2009. One of its cultural memes that I’ve seen grow is the concept of ‘voice and exit’. It’s an important ingredient in democratizing power. People need a platform to express their voice. If their voices are not heard, they need to be able to exit, and take their power with them. Hence the diversity of coins and culture in the cryptocurrency world.
Tor, the onion router protocol, is the exit for citizens who want to escape the increasingly surveilled clearnet web. It breaks the informational link between servers and clients, allowing both to remain anonymous and difficult to trace. Anonymous servers provide a .onion domain name, allowing a tor-enabled web browser to interact with them the same way it’s done in the clearnet. These websites are often referred to as the darkweb.
As countries around the world continue to degrade into a dystopian surveillance state, I expect the darkweb to grow, and eventually eat the conventional web.
I had followed the technological progress of tor, but had not seriously used it until recently. I think many developers can say the same. When I actually started to use it, I was amazed to see how far the user experience had come. Tor is simply a service that runs on port 9050. You can point to it, just like any other service at any other port. This works well with the current server-client model used by the modern web. And additional projects like tor2web allow network traffic to easily flow between clearnet and the darkweb.
A Match Made in Heaven: IPFS + Tor
IPFS, the inter-planetary file system protocol, is a new and instrumental tool for fighting censorship and democratizing power, as Spain recently demonstrated. The way I like to describe IPFS: it’s as if GitHub and BitTorrent had a baby, and raised it on a steady diet of unix command line tools. Another amazing tool, OrbitDB, builds on top of IPFS to create a peer-to-peer database. It’s a ‘blockchain’ that doesn’t suck, is incredibly easy to customize, and adapts to a wide-range of applications. IPFS is the networking layer that OrbitDB rides on top of.
Bring the server to you with a distributed database
Having an efficient, censorship-resistant, peer-to-peer (p2p) database opens a lot of doors. And thankfully, one door it closes is the need for search engines. Consolidating CoinJoin plans to use OrbitDB to distribute a roster of active ‘servers’. Instead of needing a third-party search engine to find servers, the ‘client’ can simply download a list from another peer. This allows ‘servers’ to easily join and leave the network, especially servers hidden in the tor network, with their ephemeral and hard-to-remember .onion addresses. To put it simply: the server comes to you.
Breaking Up Roles
It is my novice understanding that a Consolidating Coinjoin server would not fall under USA money transmission laws, since the USA recognizes cryptocurrencies as assets and not currency. But there is a good chance my opinion is incorrect. In thinking about it, I came to the conclusion that the answer doesn’t matter. Something that is legal today can be illegal tomorrow. Laws are arbitrary and capricious, as historical laws governing marijuana, alcohol, and slavery demonstrate.
Software that democratizes power, increases individual sovereignty, and protects free speech needs to be future proofed from law. It’s too important to leave to the whims of politicians. It’s not about fighting the law. It’s about making bad law obsolete.
To that end, I considered carefully how the Bitcoin protocol breaks up concerns of interest between miners, full nodes, and users (exchanges). Taking that as inspiration, I am breaking up the software into three types of network activity: wallets, mirrors, and servers.
Wallets and servers are explored in the Consolidationg CoinJoin protocol gist and YouTube video demo. A mirrors only function is to help peers on the network find one another and connect. It’s primary purpose is to distribute the p2p database, which helps wallets find servers.
A machine can run both the mirror software and the server software side-by-side, or just run one. This gives servers the option of running anonymously in the tor network, or establishing themselves in the clearnet. It gives the wallet software options in terms of convenience vs privacy. Running only the mirror software presents a very different legal framework than running server code. And it will only take a handful of mirrors to run somewhere in the world to give the network robust censorship resistance.