Railgun
A zk-SNARK privacy system deployed as smart contracts directly on Ethereum and other EVM chains, letting users shield balances and interact privately with DeFi, with 'Private Proofs of Innocence' added to keep criminal funds out of the anonymity set.
▶ Run interactive simulation animated mechanism with editable parameters
How it works onchain
Summary
Railgun is an on-chain privacy system for EVM chains, launched in mid-2021 by a mixed pseudonymous/public contributor group (a founder using the pen name "Emmanuel Goldstein"; the best-known public face is co-founder/contributor Alan Scott). Unlike privacy chains (Zcash, Monero) or simple mixers (Tornado Cash), Railgun is a set of smart contracts deployed directly on Ethereum, Polygon, BNB Chain, and Arbitrum. Users "shield" tokens into a shared zk-SNARK pool, receive a private 0zk balance, and can transfer, swap, and interact with DeFi from inside the shielded pool — sender, recipient, token, and amount all hidden. Governance runs through the RAIL token and RAILGUN DAO (token launched on Uniswap in July 2021, followed by an airdrop and on-chain governance deployment). Its most influential design contribution came after the Tornado Cash sanctions: "Private Proofs of Innocence" (PPOI), zero-knowledge exclusion proofs showing shielded funds do not originate from known-bad deposits, which in early 2025 stopped the zkLend exploiter from laundering through the pool and drew public praise from Vitalik Buterin — himself a repeat Railgun user.
Design (Mechanism)
- Shielded UTXO pool on top of an account-based chain. Depositing ("shielding") a token creates note commitments in a Merkle tree managed by the RailgunSmartWallet contract; spends are authorized by Groth16 zk-SNARK proofs (per official docs and third-party analyses, dozens of circuits cover different input/output combinations). Balances live at
0zkaddresses that only the key-holder can decrypt. All users share one anonymity set per chain rather than fixed-denomination pools. - Private DeFi composability. A "Relay Adapt" contract lets shielded funds call external contracts (swaps, LPing) atomically — unshield, act, reshield — so privacy extends to DeFi interactions, not just transfers.
- Broadcasters (relayers) for gas privacy. Third-party broadcasters submit transactions and are paid fees from inside the shielded pool, so the gas-paying address never links to the user.
- Fee-funded treasury. A 0.25% fee on shielding/unshielding flows to the DAO treasury, giving the protocol organic revenue rather than token-emission subsidies.
- Private Proofs of Innocence (added 2023). Before shielded funds become spendable, the user's wallet generates a ZK proof that the shielding deposit is not in aggregated blocklists (e.g., known exploit proceeds), after a delay window. Funds that cannot prove innocence can only exit back to their origin. This is enforced without any snooping, admin backdoor, or identity disclosure.
- Governance. RAIL stakers vote in the RAILGUN DAO; RAIL is explicitly a governance token, not required for protocol use.
Outcome
Ongoing and growing. Railgun operated quietly through the 2022–2023 privacy chill, then inflected: all-time shielded volume passed ~$2B in October 2024 (roughly $1.7B from 2024 alone), with reported cumulative volume around $4B by 2025 and TVL climbing from ~$3M in early 2023 to roughly $90–113M by late 2024/2025 (Messari, DefiLlama, project reports). Vitalik Buterin used the protocol repeatedly (his April 2024 "privacy is normal" transfer was widely covered) and in February 2025 publicly credited PPOI for preventing the zkLend attacker from laundering stolen funds — a rare instance of a privacy tool visibly rejecting criminal flows. Crucially, Railgun has continued operating without facing the sanctions Tornado Cash did. No protocol-level exploit of the shielded pool is known as of last verification. Caveats: RAIL remains a small-cap governance token and anonymity sets are still modest relative to transparent DeFi.
Why it worked
- Compliance-by-cryptography instead of compliance-by-backdoor. PPOI gave regulators and exchanges a credible answer ("criminal funds can't stay in the pool") without keys, KYC, or admin control — a genuine mechanism-design innovation that Tornado Cash lacked.
- Privacy as a smart-contract layer, not a separate chain, preserved composability with existing DeFi liquidity and required no new trust assumptions beyond the host chain plus circuit soundness.
- A shared, multi-asset shielded pool compounds: every user's activity strengthens everyone else's anonymity set, creating a lindy/network effect the team explicitly cultivated.
- Fee-based treasury revenue (0.25% of a growing volume base) made the DAO self-sustaining rather than dependent on token inflation.
- Timing and endorsement. Post-Tornado-Cash, demand for "legitimate privacy" concentrated on the one protocol with a compliance story; Vitalik's repeated usage and public praise were powerful credibility subsidies.
Limitations and criticisms
Real risks remain despite the project's success: anonymity depends on set size, and Railgun's user base is still niche, so sophisticated adversaries with timing/amount heuristics can degrade practical privacy for large or unusual transactions. PPOI blocklists introduce a governance question — who curates the lists, and could that pressure point expand from "exploit proceeds" to broader censorship? The pseudonymous founder and comparatively small audit/formal-verification footprint (relative to the value shielded) leave tail risk in circuit or contract bugs. And RAIL token value accrual is weak relative to protocol usage, a common governance-token disconnect.
Lessons
- Privacy systems survive politically when they can prove a negative. ZK exclusion proofs (PPOI) show that "not serving criminals" and "no surveillance" are compatible design goals — this is the template Vitalik's Privacy Pools line of work generalizes.
- A single shared shielded pool beats fixed-denomination mixers on both UX and anonymity: arbitrary amounts, multi-asset support, and a compounding anonymity set.
- Deploying privacy as contracts on the liquidity-rich chain (rather than a sovereign privacy chain) captures composability and avoids the cold-start problem privacy L1s face.
- Fee revenue tied to organic usage is a more durable DAO treasury model than emissions; Railgun's 2024 fees alone rivaled its entire 2021 TVL.
- Separating gas payment from identity (relayers/broadcasters) is mandatory, not optional — metadata leaks at the transaction-submission layer defeat on-chain cryptography.
Redesign (EDITORIAL — hypothesis, not fact)
This section is editorial hypothesis, not established fact. Three changes seem highest-leverage. First, decentralize the PPOI blocklist layer: today the credibility of "innocence" rests on list curation that is a soft governance chokepoint; a redesign could let wallets prove exclusion against multiple independently curated lists and let counterparties choose which lists they require, turning compliance into a market rather than a protocol constant. Second, attack the anonymity-set problem directly with cross-chain set unification — proving membership in one aggregated commitment tree across all deployed chains (via storage proofs or a shared settlement layer) so Polygon users strengthen Ethereum users' privacy and vice versa. Third, fix RAIL's value disconnect by routing a governed share of the 0.25% fee to staked governance participants who underwrite a circuit-bug insurance backstop, aligning token holders with protocol safety instead of pure speculation. The main risk of this redesign is that fee-sharing and insurance move the protocol away from being a neutral, unowned piece of infrastructure, which is a large part of why it has succeeded so far.
Sources
- RAILGUN official site — primary (docs)
- RAILGUN documentation wiki — primary (docs)
- Railgun-Community GitHub organization — primary (contract)
- Etherscan — Railgun labeled contracts (Relay/SmartWallet proxy) — primary (contract)
- Vitalik Buterin praises Railgun for blocking zkLend attacker via Private Proofs of Innocence (news)
- Why Railgun Project co-founder talked to the feds (DL News) (news)
- Messari — RAILGUN: Privacy Infrastructure for DeFi (analysis)
- DefiLlama — Railgun TVL, fees & revenue (analysis)
- PRNewswire launch announcement (2021) (news)
Related experiments
Last verified: 2026-07-26 · Spot an error? Suggest a correction