RAILGUN is a privacy system built directly on the Ethereum, BSC, Polygon and Arbitrum chains. It uses zero-knowledge (ZK) cryptography to enable smart contracts and DeFi privacy without sacrificing the security of users’ preferred chains.
RAILGUN simply refers to a set of smart contracts that support backend privacy infrastructure. Wallet providers can choose to integrate the RAILGUN protocol.
Because RAILGUN is just on-chain smart contract logic, achieving privacy without the need for a separate L2 validator set or a vulnerable bridge has two major advantages:
The user experience is similar to using a public wallet like MetaMask to interact with the Ethereum/EVM chain for liquidity and DeFi, except with the added ability to trade privately.
RAILGUN mainly consists of two major components:
Complex DeFi transactions help make RAILGUN more private than other protocols with similar anonymity. All transfers, exchanges, loans and dApp calls add interactive changes in RAILGUN.
Compared to other privacy systems, RAILGUN achieves better privacy protection with less liquidity and shorter time frames. dApp interaction within the RAILGUN privacy system also incentivizes users to hold assets in RAILGUN longer, as there is no reason to move funds out of RAILGUN.
Potential use cases are:
RAILGUN is a revolutionary toolkit and is objectively the most uncompromising and complete privacy solution for DeFi. Private DeFi will enable new business possibilities for the cryptocurrency industry not possible on public blockchains. All other privacy solutions have some trade-offs, such as requiring users to trust custodial bridges or trade with fragmented/non-existent liquidity.
Other security solutions often require dedicated infrastructure to operate and are known as L2 solutions. L2 solutions do not have direct access to DeFi protocols and rely on bridging technology that has quite a few security holes. Since L2 solutions use their own nodes, they do not have the full security or liquidity of the main blockchain.
Other solutions, such as mixers, lack functionality and ease of use. For example, mixers typically do not support internally shielded transactions or interactions with smart contracts. They may also require users to send and receive a fixed amount, such as 1 or 10 ETH. Mixers cannot use the protocol simply and efficiently while protecting privacy. They also don’t allow users to keep their balances private in their wallets. However, RAILGUN makes users’ privacy safe and worry-free, and users’ privacy will be maintained even if no transactions occur.
Previous generation privacy protocols cannot match the convenience, flexibility and privacy that RAILGUN ensures.
RAILGUN is permissionless. By default, all standard ERC-20 tokens can be used in the RAILGUN privacy system.
Some ERC-20 tokens are non-standard, such as rebasing tokens and lottery tokens. These tokens are currently incompatible with the RAILGUN privacy system and should not be stored.
Although it is not fully ERC-20 compliant, Tether (USDT) can be used in the RAILGUN privacy system.
RAILGUN is very easy to use through front-ends such as web apps. The technology can also be easily integrated into existing protocols.
Although the code is very complex, using the RAILGUN privacy system is easy. Wallet apps that contain RAILGUN smart contracts (such as RAILWAY) have very intuitive user interfaces.
RAILGUN wallet consists of two keys: Spending Key and Viewing Key: The RAILGUN wallet address (also known as the 0zk address) is the corresponding public key of two - the spending public key and the viewing public key.
Therefore, if user A (Alice) knows the RAILGUN address of user B (Bob), she can initiate a transaction.
Alice does this by creating a note that contains what is called a commitment in cryptography. The commitment contains information about the tokens and the amount of tokens to be transferred. These commitment values are encrypted using information from Bob’s public key.
Next, Alice creates a zk-SNARK proof showing that her spending did not exceed her deposit. This also shows that she didn’t double-spend—she spent the tokens elsewhere.
Finally, Alice sends the proof, commitment, and ciphertext to the RAILGUN smart contract. This smart contract verifies the proof, accumulates the commitment and emits the ciphertext as an event. This means that it checks that everything is correct and enables Bob to interact with the transaction.
Only Bob can use his view key to decrypt the ciphertext and obtain the private information. With this information and his spending key, Bob can spend the note - meaning he can transfer or withdraw the tokens.
This article is reproduced from [goldFinance], the original title is “6 Questions to Understand the Privacy Agreement RAILGUN Used and Liked by Vitalik”, the copyright belongs to the original author [Golden Finance xiaozou], if you have any objection to the reprint, please contact Gate Learn Team, the team will handle it as soon as possible according to relevant procedures.
Disclaimer: The views and opinions expressed in this article represent only the author’s personal views and do not constitute any investment advice.
Other language versions of the article are translated by the Gate Learn team, not mentioned in Gate.io, the translated article may not be reproduced, distributed or plagiarized.
RAILGUN is a privacy system built directly on the Ethereum, BSC, Polygon and Arbitrum chains. It uses zero-knowledge (ZK) cryptography to enable smart contracts and DeFi privacy without sacrificing the security of users’ preferred chains.
RAILGUN simply refers to a set of smart contracts that support backend privacy infrastructure. Wallet providers can choose to integrate the RAILGUN protocol.
Because RAILGUN is just on-chain smart contract logic, achieving privacy without the need for a separate L2 validator set or a vulnerable bridge has two major advantages:
The user experience is similar to using a public wallet like MetaMask to interact with the Ethereum/EVM chain for liquidity and DeFi, except with the added ability to trade privately.
RAILGUN mainly consists of two major components:
Complex DeFi transactions help make RAILGUN more private than other protocols with similar anonymity. All transfers, exchanges, loans and dApp calls add interactive changes in RAILGUN.
Compared to other privacy systems, RAILGUN achieves better privacy protection with less liquidity and shorter time frames. dApp interaction within the RAILGUN privacy system also incentivizes users to hold assets in RAILGUN longer, as there is no reason to move funds out of RAILGUN.
Potential use cases are:
RAILGUN is a revolutionary toolkit and is objectively the most uncompromising and complete privacy solution for DeFi. Private DeFi will enable new business possibilities for the cryptocurrency industry not possible on public blockchains. All other privacy solutions have some trade-offs, such as requiring users to trust custodial bridges or trade with fragmented/non-existent liquidity.
Other security solutions often require dedicated infrastructure to operate and are known as L2 solutions. L2 solutions do not have direct access to DeFi protocols and rely on bridging technology that has quite a few security holes. Since L2 solutions use their own nodes, they do not have the full security or liquidity of the main blockchain.
Other solutions, such as mixers, lack functionality and ease of use. For example, mixers typically do not support internally shielded transactions or interactions with smart contracts. They may also require users to send and receive a fixed amount, such as 1 or 10 ETH. Mixers cannot use the protocol simply and efficiently while protecting privacy. They also don’t allow users to keep their balances private in their wallets. However, RAILGUN makes users’ privacy safe and worry-free, and users’ privacy will be maintained even if no transactions occur.
Previous generation privacy protocols cannot match the convenience, flexibility and privacy that RAILGUN ensures.
RAILGUN is permissionless. By default, all standard ERC-20 tokens can be used in the RAILGUN privacy system.
Some ERC-20 tokens are non-standard, such as rebasing tokens and lottery tokens. These tokens are currently incompatible with the RAILGUN privacy system and should not be stored.
Although it is not fully ERC-20 compliant, Tether (USDT) can be used in the RAILGUN privacy system.
RAILGUN is very easy to use through front-ends such as web apps. The technology can also be easily integrated into existing protocols.
Although the code is very complex, using the RAILGUN privacy system is easy. Wallet apps that contain RAILGUN smart contracts (such as RAILWAY) have very intuitive user interfaces.
RAILGUN wallet consists of two keys: Spending Key and Viewing Key: The RAILGUN wallet address (also known as the 0zk address) is the corresponding public key of two - the spending public key and the viewing public key.
Therefore, if user A (Alice) knows the RAILGUN address of user B (Bob), she can initiate a transaction.
Alice does this by creating a note that contains what is called a commitment in cryptography. The commitment contains information about the tokens and the amount of tokens to be transferred. These commitment values are encrypted using information from Bob’s public key.
Next, Alice creates a zk-SNARK proof showing that her spending did not exceed her deposit. This also shows that she didn’t double-spend—she spent the tokens elsewhere.
Finally, Alice sends the proof, commitment, and ciphertext to the RAILGUN smart contract. This smart contract verifies the proof, accumulates the commitment and emits the ciphertext as an event. This means that it checks that everything is correct and enables Bob to interact with the transaction.
Only Bob can use his view key to decrypt the ciphertext and obtain the private information. With this information and his spending key, Bob can spend the note - meaning he can transfer or withdraw the tokens.
This article is reproduced from [goldFinance], the original title is “6 Questions to Understand the Privacy Agreement RAILGUN Used and Liked by Vitalik”, the copyright belongs to the original author [Golden Finance xiaozou], if you have any objection to the reprint, please contact Gate Learn Team, the team will handle it as soon as possible according to relevant procedures.
Disclaimer: The views and opinions expressed in this article represent only the author’s personal views and do not constitute any investment advice.
Other language versions of the article are translated by the Gate Learn team, not mentioned in Gate.io, the translated article may not be reproduced, distributed or plagiarized.