In January 2023, the FBI alleged that the North Korean Lazarus Group used Railgun, a smart contract-based privacy protocol, to launder over $60 million (41,000 ETH) in Ethereum stolen during the 2022 Harmony Horizon Bridge heist. AnChain.AI served as the official primary incident responder. At the time of writing, the laundered funds are valued at approximately $120 million USD.
Since its inception in 2022, Railgun has facilitated over $2 billion in cryptocurrency transactions, with Wrapped Ethereum (WETH) accounting for 76% of the total transaction volume. This activity highlights Railgun’s growing role in blockchain privacy.
Railgun poses unique challenges for cryptocurrency investigation, particularly in tracing illicit activities. This blog will dive deeper into the fundamentals and inner workings of Railgun, its innovative privacy mechanisms, and how cutting-edge solutions trusted by leading global regulators can more effectively combat money laundering.
Railgun, leveraging smart contracts and Zero Knowledge Proof (ZKP) technology, emerged in the blockchain privacy landscape as a modern alternative to traditional cryptocurrency mixers. Unlike mixers that obscure transactions by pooling funds off-chain, Railgun directly integrates privacy features into on-chain transactions, aiming to redefine how users maintain anonymity in decentralized finance (DeFi).
Railgun operates on Ethereum and other EVM-compatible networks, employing zero-knowledge proofs (zk-SNARKs) to facilitate private, on-chain transactions. zk-SNARKs enable users to prove the validity of a transaction without revealing any sensitive information. This approach eliminates the need for third-party layers or bridges often associated with privacy risks and operational complexity, offering seamless integration with decentralized finance (DeFi) applications.
How does Railgun make your transactions anonymous? According to Railgun, it only takes 4 simple steps:
However, while these steps seem simple enough, the challenge presented by Railgun comes into sharper focus when we more closely examine its inner workings.
Railgun, at its core, is a smart contract DApp that uses Zero Knowledge Proofs (ZKPs), specifically zk-SNARK, to ensure transaction privacy.
ZKPs are cryptographic techniques that allow one party (the prover) to convince another party (the verifier) that they know a form of information, without revealing the actual value. This is done through cryptographic evidence, keeping both the proof and the data hidden. zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) are a specific form of ZKP that are non-interactive, meaning no back-and-forth is required between the prover and verifier.
In Railgun’s privacy system, zk-SNARKs allow smart contracts to act as verifiers. When a user wants to make a transaction, zk-SNARKs enable the user to prove that their action (i.e. transferring tokens or interacting with a DeFi protocol) follows the rules without revealing any sensitive details, such as addresses or transaction amounts.
The technical flow involves several key components:
The magic of zk-SNARKs lies in their efficiency - producing small, easily verifiable proofs ideal for blockchains where speed and privacy are crucial. This allows Railgun’s system to leverage cryptographic circuits to process different transaction types, each defined by specific numbers of inputs (UTXOs) and outputs. The circuits manage everything from multi-sends to private NFT shielding. With 54 distinct circuits, Railgun can handle many combinations and the system automatically routes transactions to optimize for gas and cost savings. This flexible design supports a variety of token standards, including ERC-20, ERC-721, and ERC-1155, enabling Railgun to handle diverse transaction types efficiently.
Smart contracts and the rise of Railgun have fundamentally redefined how cryptocurrencies are traced. The challenge is twofold:
For serious crypto investigators, understanding smart contract mechanics is no longer optional—it’s become an essential skill.
Railgun operates through a network of specialized smart contracts. It operates through two primary smart contracts on the Ethereum mainnet:
Note: While these addresses are specific to Ethereum, Railgun also operates on other networks like Binance Smart Chain (BSC), Polygon, and Arbitrum, each with distinct contract addresses.
Railgun’s Relay Contract, analyzed using AnChain.AI’s SCREEN smart contract evaluation platform, is broadly categorized as a Pausable Upgradeable Proxy. This architecture offers flexibility and security by allowing upgrades while maintaining operational control.
The real-world implications of this design are best understood through a case study involving sophisticated money laundering activities.
In January 2023, a wallet associated with the infamous Harmony Bridge hack laundered 897 ETH (approximately $2.7 million) through Railgun. While the transaction (as highlighted above) appeared straightforward, it was underpinned by 31 distinct smart contract events, many of which escaped detection by conventional investigative tools. This complexity highlights the sophistication of Railgun’s privacy mechanisms and their ability to obscure the true flow of funds.
Traditional blockchain explorers fail to capture the granular details of Railgun’s privacy-preserving transactions. To address this challenge, SCREEN’s advanced transaction graphing and simulation capabilities help investigators break down Railgun’s internal processes, uncovering hidden flows and patterns.
For instance, the internal transaction timeline in SCREEN, as shown above, can reveal the complex patterns of fund movement, including the back-and-forth transfers, as part of Railgun’s Zero Knowledge Proof (ZKP) privacy system.
Railgun’s privacy-focused design and use of ZKP technology have created significant hurdles for cryptocurrency investigators but not impossible.
Successful investigations rely heavily on contextual factors, such as external interactions with exchanges, deposit and withdrawal activity patterns, and potential associations identified through behavioral or clustering analysis.
Based on AnChain.AI’s extensive investigative experience, the following heuristics have been developed to probabilistically trace and analyze transactions through Railgun. Each approach targets specific aspects of Railgun’s functionality to infer potential links between deposit and withdrawal events:
The challenges presented by Railgun raise a compelling question about the modern state of cryptocurrency investigations. How can investigators even begin to trace illicit funds when widely available privacy protocols thwart their most-used tools? In today’s digital asset ecosystem, understanding smart contracts is more than simply a suggestion, but a necessity. Protocols like Railgun challenge conventional approaches to blockchain tracing, highlighting the need for continued innovation in forensic technology and investigative strategies.
AnChain.AI is committed to solving this problem through technology and continues to equip leading global regulators with the technology to penetrate the smart contract layer and completely redefine the world’s cryptocurrency investigation capabilities.