Photo by Joe Gadd on Unsplash

DeFi, Privacy, & Railgun

“Privacy in an open society requires anonymous transaction systems… An anonymous system empowers individuals to reveal their identity when desired and only when desired; this is the essence of privacy.” Eric Hughs, A Cypherpunk’s Manifesto

Over the past few years there has been an explosion of financial innovation and economic activity occurring on open and transparent smart-contract blockchains like Ethereum. The novel decentralised finance (DeFi) applications being developed on these trustless and permissionless systems offer an opportunity for this generation of entrepreneurs to reconstruct the global financial system from the ground up, using the architecture of the Internet. In so doing, the opaque and unjust power structures that are characteristic of the legacy financial system, rather than being directly challenged, may instead be bypassed and made redundant with superior technology.

A core problem that has emerged in the DeFi ecosystem, however, is that the degree of radical openness attendant with public blockchains has proven to be a double-edged sword, in the sense that users of DeFi are subject to extensive financial surveillance. This occurs implicitly and users are rarely, if ever, informed that their financial activity is being monitored and that their data is being collected. Not only do centralised financial institutions and government agencies engage in this form of surveillance, but even other well-informed individuals are able to extract large amounts of information from the public ledgers undergirding DeFi.

The Importance of Privacy

If it were not already obvious, this is a serious concern for several reasons. Firstly, as outlined in article twelve of the United Nations Universal Declaration of Human Rights, ‘no one shall be subjected to arbitrary interference with [their] privacy.’ Meaning that privacy in all of its forms, and financial privacy in particular, is a fundamental and inalienable human right. As a result, financial privacy ought to be the default condition for everyone in society, rather than being difficult, if not impossible, to attain given the underlying properties of the economic system people are using.

Secondly, it is well established in the social sciences that individuals behave differently than they otherwise would when they know they are being monitored. While there are rare instances where this may have positive implications for society, such as dissuading individuals from committing illicit activity, there are far more occasions where this high level of surveillance will stifle the free expression and exchange among individuals in their daily life. If DeFi is going to rise to its full potential and replace the traditional financial system, then this means that, in one way or another, everyone around the world will be using public blockchains to perform financial transactions. Imagine, however, if every debit, credit, and cash transaction that you have ever made were open to inspection by anyone on the Internet. Ask yourself, does the whole world need to know that you’ve started taking a new form of medication? And would you still order that 2am pizza, or perhaps something even more taboo, knowing that everyone you know, from your close family to your colleagues, could soon know about it?

Thirdly and relatedly, in an environment where everyone’s financial balances are open for easy inspection there is a real risk of physical harm befalling those with large sums of money. This is especially the case for those living under authoritarian political regimes or in jurisdictions with high levels of corruption and poor legal systems. Unfortunately, many individuals may be subject to persecution by their own governments in an environment where they lack financial privacy, as is the status quo when using distributed public ledgers.

Undoubtedly, then, there is a clear and pressing need for a paradigm shift in DeFi that can allow participants to avail themselves of the innovation and utility of this rapidly growing economic ecosystem without sacrificing their rights to privacy. It is with this backdrop in mind that the Railgun DAO has developed a suite of products to equip DeFi users with privacy enhancing tools. Part of what distinguishes these privacy solutions from pre-existing products is the symbiotic approach to DeFi innovation that the Railgun DAO has adopted.

Former Privacy Solutions

Broadly speaking, there have been two historical approaches to on-chain privacy. The first has been to construct an entirely new blockchain with privacy conscious features built into the base layer. For instance, Monero, ZCash, and the Secret Network have all adopted this methodology. Alternatively, mixing and anonymising decentralised applications (dApps), such as Tornado Cash or Joinmarket, have been built on public blockchains allowing users to obfuscate the size and location of their balances to outside observers.

The problem with both approaches, however, is that liquidity is necessarily fractured between the applications and/or blockchains that individuals want to use and the privacy solutions being offered. Moreover, mixing dApps often require specific denominations of deposits and withdrawals, as well as depending, crucially, on a large set of peers to ensure the anonymity of deposited funds. Put simply, these solutions are designed as orthogonal, rather than being parallel, to the growth and innovation that is occurring in DeFi.

The Railgun DAO

Railgun, in contrast, is a set of smart contracts built on top of a host of well-established layer-1 blockchains and layer-2 scaling solutions such as Etherum, Binance Smart Chain, Polygon, and Metis. These smart contracts allow users to privately interact with the full range of DeFi applications that already exist on these platforms. Meaning that under Railgun, liquidity is no longer fractured and users can directly and privately transact with any dApps, such as Curve or LooksRare, with any tokens and denominations they desire. Kieran Mesquita, Railgun’s chief scientist, emphasises the advantages that Railgun offers in a recent interview with Cointext’s Dan Ashmore:

“Railgun is a trustless and permissionless system on [both layer-1 and layer-2s that] has direct access to the richness and liquidity available in DeFi. Many privacy solutions for DeFi are lacking functionality, built [exclusively] on layer-2s, or can’t interact directly with DeFi. This means they not only have limited functionality but very limited privacy for users. With Railgun, users can privatize any ERC token, including NFTs. No privacy solution to date has had the versatility and utility that Railgun brings to DeFi.”

In order to assist with the functionality of the Railgun smart contracts, an accompanying DeFi wallet, the Railway wallet, has also been developed by the Railgun DAO. This wallet not only makes it trivially easy for users to toggle between privately shielded balances and public balances, but it will soon be directly integrated with the decentralised exchange aggregator, Matcha.

Moreover, Railgun provides users with the ability to derive their full transaction history so that they can reveal, if they wish, their information to third parties. Railgun has no independent ability to generate the transaction history of anyone else and, in line with the cypherpunk ethos, users are empowered to decide who they reveal their transaction data to, as opposed to necessarily revealing this information to everyone. As Kieran makes clear in the aforementioned Cointext interview, “the goal of Railgun isn’t to strip away third-party verifiability of actions taken on-chain, but rather to give users the power to choose who sees what, when, and why.”

While there is far more that can be said about the zero-knowledge technology underlying the Railgun applications, along with the tokenomics, and the investment prospects for the Railgun DAO, none of that will be addressed in detail presently. What is worth highlighting, however, is how the Railgun DAO is harnessing the economic incentives that fuel so much of the entrepreneurial development of DeFi in order to provide users with their fundamental right to financial privacy.

Privacy as a Public Good

Several scholars have argued that financial privacy is a public good, both because it protects users from a wide range of misconduct, such as price discrimination, but also because of the high degree of user inter-connectivity accompanying online financial systems. As Fairfeild and Engel write, “an individual who is careless with data exposes not only extensive information about herself, but about others as well.”¹ Unfortunately, and as is often the case with the provision of public goods, when every individual acts in their own self-interest they can collectively undermine the interests of the group, of which they are a member. This dynamic is known as a collective action problem, and they are notoriously difficult to overcome.

In relation to on-chain privacy, this has been the dominant dynamic that has existed in DeFi prior to the introduction of Railgun. Individuals motivated to gain privacy over their financial activity have had to incur significant costs in order to do so. As already highlighted, the pre-existing privacy solutions are incompatible with the burgeoning DeFi ecosystem. Meaning that users have had to decide between asserting their right to financial privacy and actively participating in the economic flywheels of DeFi.

It is unsurprising, therefore, that so many individuals have chosen to forego their right to privacy and have instead implicitly revealed large amounts of their on-chain information to everyone. Prior to Railgun this has been a rational decision for many individuals. Yet, when everyone conforms to this incentive the entire community of DeFi users are left in a sub-optimal status quo where on-chain privacy is the exception, rather than the expected norm. Opportunity cost, therefore, has been the primary barrier to provision of the public good that is financial privacy.

Railgun completely upends this paradigm and removes the opportunity costs formerly associated with asserting one’s right to financial privacy. The Railgun DAO has created a compatible and additive set of dApps that enhances the utility of DeFi while conferring privacy to users. Individuals no longer have to decide between their financial privacy and their entrepreneurial endeavours; they can now pursue both simultaneously. In this way, Railgun aligns incentives and helps to resolve the collective action problem undermining DeFi privacy in a way that no prior solution has been able to achieve.

Concluding Remarks

Because financial privacy is both a public good and a fundamental human right, equipping users with the tools to reclaim their privacy in the rapidly expanding DeFi environment is crucially important. Unlike pre-existing privacy solutions, Railgun aligns economic incentives by removing the opportunity costs associated with attaining on-chain privacy. The set of Railgun tools are not only designed to dramatically improve the freedoms and rights of every DeFi user, but they will also enhance the utility of well-established DeFi applications. Thus, Railgun embodies the early vision of the Cypherpunk’s Manifesto by harnessing economic incentives and cryptography to make financial privacy a norm in the emerging global financial system.

Disclosure: I own RAIL tokens at the time of writing.

[1]: It should be noted that Fairfeld and Engel do not argue that financial privacy is a public good via the traditional route (i.e. arguing that it is a good which is non-excludable and non-subtractive), but rather assert that a lack of financial privacy is a public bad (2015, p 423). They, therefore, conclude that financial privacy must be a public good given that it is an absence of a public bad.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
William Ridge

William Ridge

PhD student studying Ethics, Evolution, and ₿itcoin