# RAILGUN Privacy System

The RAILGUN privacy system is a series of smart contracts that privatizes blockchain interactions. RAILGUN privatizes:

1. Sender&#x20;
2. Recipient
3. Token type
4. Amount&#x20;

RAILGUN protects this information by utilizing Private Balances, a confidential set of tokens and users where interactions appear to originate from. These Private Balances are known as an privacy set as, to an outside observer; transactions can be sent by anyone who has previously made a transaction.

#### How private are Private Balances?

The overall level of privacy from Private Balances is a function of:

1. Total number of unique shield interactions and users.
2. Total Value Locked in the RAILGUN smart contracts.
3. RAILGUN DeFi interaction and Private Send volume.&#x20;

Generally, the higher the total number of unique shield interactions and users, the higher the level of confidentiality as links are less likely to be drawn between depositor and token, as there are a higher number of potential depositors to try and attach interactions to. Some consideration must also be given to token type. For example, using common stables like USDC or DAI will offer greater privacy vs using some unknown meme token with very few interactions.

However, RAILGUN has additional privacy boosting capabilities due to its support of complex smart contract interactions and Private Sends. Every interaction that takes place (such as a swap on [Railway DEX](https://github.com/Railgun-Community/community-faqs/blob/main/common/broken-reference/README.md)), decreases the likelihood an interaction can be linked to a specific asset, increasing privacy for all users. As RAILGUN enables trading, you can use a small amount of crypto and theoretically trade up to a larger position privately, therefore the total size of the privacy set is less of a factor in maintaining privacy in RAILGUN.

This means that privacy in RAILGUN's Private Balances is always greater than other privacy solutions with the same amount of TVL due to increased noise from interactions like Private Sends and swaps.

For more detail on privacy in RAILGUN and some tips to further bolster privacy, check out [this article](https://medium.com/@Railgun_Project/what-is-crypto-privacy-how-railgun-can-help-7-privacy-tips-for-dank-degens-cce294c6fc70).

#### Broadcasters and UTXOs

RAILGUN users can send transactions through [Broadcasters](file:///C:/wiki/learn/privacy-system/community-relayers), which are wallets that pass information to the blockchain and submit gas on a user’s behalf. Interactions sent by users appear to originate from Broadcasters and cannot be linked to a shielding address.

RAILGUN’s transaction system uses [Unspent Transaction Outputs](https://academy.binance.com/en/glossary/unspent-transaction-output-utxo) (UTXOs), similar to Bitcoin and Zcash’s spending system. A UTXO represents the ability to spend tokens and is implemented in RAILGUN as a [Merkle Tree](https://en.m.wikipedia.org/wiki/Accumulator_\(cryptography\)) ([accumulator](https://medium.com/@aurelcode/cryptographic-accumulators-da3aa4561d77)), an organized and encrypted data tree which allows the RAILGUN smart contract to trace ownership and balances through cryptographic proofs. The difference here is that RAILGUN’s Merkle Tree is completely private and held in the smart contract.

#### RAILGUN SDK

At its core, RAILGUN is low-level infrastructure with an SDK (Software Development Kit) for protocol integrations of private smart contract interactions and a private wallet. Users have a public on-chain address, that is a 0x address and a private RAILGUN address which begins with a 0zk. Interactions sent from 0zk addresses are private and appear on blockchain scanners (like Etherscan) as originating from a Broadcaster address. Identifying details are confidential at all stages of the process by encryption using zk-SNARK proofs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.railgun.org/wiki/learn/privacy-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
