Overview
Railgun is an onchain privacy system that lives as smart contracts on Ethereum, Arbitrum, Polygon and BNB Chain. It is not a separate chain and has no bridge. Users shield tokens from a normal public 0x address into a private 0zk address, and from then on balances, transfers, swaps and other contract calls run inside the shielded pool.
There is no official Railgun app. The protocol is integrated by independent wallets and frontends, listed on the Railgun site: Railway (desktop), Anon (browser extension), Terminal Wallet (CLI), TokenShielder and Faceless (web). Developers can add the same features to any EVM wallet with the Railgun Wallet SDK.
What is private: the sender, recipient, amount and token of transactions between 0zk addresses. What is public: the shield and unshield transactions themselves, which link a public 0x address to the pool on the way in and on the way out.
Key features
- 0zk addresses — a private address type whose balances and history do not appear on Etherscan or similar explorers.
- Private DeFi — shielded tokens can be swapped and used in supported DeFi apps through Railgun’s Adapt Modules without unshielding first.
- Broadcasters — a peer-to-peer network of relayers, reached over Waku, submits transactions and pays gas so the user’s public address never appears.
- Viewing keys — a read-only key that can be shared with an auditor or accountant to reveal a wallet’s history.
- Private Proofs of Innocence (PPOI) — an optional system that proves shielded funds are not from known bad sources without revealing which funds they are.
How the privacy works
Railgun represents balances as encrypted notes committed to a Merkle tree in the contract. Spending a note requires a Groth16 zk-SNARK proving ownership and value conservation without revealing which notes were spent. The circuits use a trusted setup built on the Perpetual Powers of Tau ceremony, which is secure as long as one participant destroyed their secret contribution. Because swaps and DeFi calls also happen inside the pool, every interaction adds noise for other users.
Transactions sent through a Broadcaster appear to come from the Broadcaster’s address. The payload is encrypted to the Broadcaster, who can read only the fee note addressed to it.
Trade-offs and things to know
- Shielding and unshielding each carry a 0.25% protocol fee, sent to the treasury and distributed to RAIL stakers. Broadcasters add a gas premium, typically about 10% of gas.
- After shielding there is a short standby period during which funds can only be unshielded, while the PPOI check runs. PPOI list providers include Elliptic, ScamSniffer, PureFi, SlowMist and the Chainalysis sanctions oracle.
- Privacy depends on hygiene: shielding and quickly unshielding the same amount to a related address can be matched by timing and amount.
- Circuit upgrades require new trusted-setup ceremonies.
Getting started
- Hold the chain’s gas token (ETH, POL or BNB) and the assets you want to shield in a self-custodial EVM wallet.
- Pick a Railgun-integrated wallet from the list on railgun.org, for example Railway for desktop.
- Create a 0zk address, shield tokens, and wait out the standby period before transacting privately.
Developers should start with the Railgun Wallet SDK and the developer guide in the docs.