Definition:
Railgun is a ZK-SNARK-based privacy system deployed on Ethereum, Polygon, BNB Chain, and Arbitrum that gives users shielded accounts — balance pools where assets are held privately — and allows them to transact, trade, and interact with DeFi protocols without revealing transaction history, amounts, or wallet addresses on-chain. Unlike Tornado Cash (a mixer that anonymizes fixed-denomination deposits and withdrawals), Railgun is a complete shielded account system: users can deposit arbitrary amounts, interact with DeFi protocols through “Private Transactions,” and withdraw — with all internal activity hidden by ZK-proofs. Railgun was not sanctioned by OFAC (unlike Tornado Cash) and has positioned compliance features as a core differentiator.
How Railgun Works
Shielded pool architecture:
Railgun maintains a Merkle tree of shielded notes (encrypted commitments) on-chain. Each note represents a shielded balance commitment. The contents (owner, token, amount) are known only to the owner.
Deposit (shield):
A user sends tokens to the Railgun smart contract. A shielded note commitment is added to the Merkle tree. On-chain observers can see that some deposit was made but not the amount or destination.
Private transactions:
Within the shielded pool, users can transfer tokens to other Railgun users. ZK-proofs prove that:
- The sender owns valid notes (without revealing which notes)
- The notes sum correctly (no creation of money from nothing)
- The transaction doesn’t double-spend
Relayer network:
A network of relayers submits shielded transactions on-chain on behalf of users, accepting gas payment in shielded tokens. This means users don’t need to maintain an on-chain “gas address” that could be linked to their shielded account.
Private DeFi (Adapt Module):
Railgun’s Adapt Module allows shielded accounts to interact with DeFi protocols (Uniswap, Curve, Aave) directly from the shielded pool. Tokens leave the shielded state temporarily to execute the on-chain action, then return to the shielded pool with the result. External observers see the DeFi interaction with the Railgun contract as the actor, not the user’s wallet.
Compliance Approach
A key difference from Tornado Cash: Railgun proactively implements compliance features:
Private Proofs of Innocence (PPOI):
Users can generate a ZK-proof demonstrating that their shielded balance did not originate from addresses on a blocklist (OFAC sanctioned addresses, known exploiter wallets) — without revealing their actual transaction history. This allows users to prove “clean funds” to counterparties while maintaining privacy.
This approach — privacy with optional compliance proofs — is aligned with Vitalik Buterin’s Privacy Pools proposal (see Privacy Pools).
RAIL Token
- Ticker: RAIL
- Function: Governance and staking in the Railgun DAO
- Distribution: Community allocated; DAO treasury manages ongoing distribution
- RAIL holders vote on protocol parameters and treasury allocations
Notable Usage
Railgun gained public attention in 2023 when blockchain analysts identified that wallets associated with North Korea’s Lazarus Group had used Railgun (alongside other mixing services) to launder stolen funds. This highlighted both Railgun’s privacy properties and the compliance challenge any privacy protocol faces.
In response, the Railgun DAO emphasized its PPOI system and blocklist integration tools.
Railgun vs. Tornado Cash
| Feature | Tornado Cash | Railgun |
|---|---|---|
| Model | Fixed-denomination mixer | Shielded account system |
| Amounts | Fixed (0.1, 1, 10, 100 ETH) | Arbitrary |
| DeFi access | No | Yes (Adapt Module) |
| OFAC status | Sanctioned (Aug 2022) | Not sanctioned |
| Compliance tools | None | PPOI blocklist proofs |
| ZK system | Groth16 | Groth16 |
Related Terms
Sources
- Railgun Documentation — Technical documentation for the shielded account system.
- RAIL Token Overview — Project overview and governance documentation.
- Vitalik Buterin — Privacy Pools — Related compliance-compatible privacy proposal that influenced Railgun’s PPOI design.
- Chainalysis — Railgun Usage Analysis — On-chain analysis of Railgun usage patterns and compliance challenges.
Last updated: 2026-04