Main Info(Basics here)
What is Railgun?
RAILGUN is a collection of smart contracts that verify zero-knowledge proofs, allowing users to make, send or receive transactions anonymously (without revealing any assets, amounts, or identities).
Goal / Mission
What is the company’s mission? RAILGUN keeps your actions secret, protecting your privacy, and allows you to keep your identity secret - thus giving you anonymity. Comments from Enzo【I think it is decentralized anonymity.】 Users’ painpoints
Every bit of your on-chain activity is available for the whole world.
Who is the target audience? Large-scale adoption by individuals, NGOs and even corporations. Eveyone who needs privacy in the blockchain world. Basiacally, privacy: Everyone might knows how much you have in your bank account, how much you get paid, and where else you have been spending your money. What is current solution, which needs to be improved? Many users have to use centralized solutions — which track all kinds of personal data, need to trust a third party — relatively better than sharing trading history with the entire world. RAILGUN’s solution
The first time users can maintain privacy while interacting with DeFi smart contracts on Ethereum - without any trade-off from the full security of Ethereum hash. If you ever need to be transparent, RAILGUN can generate a verifiable report of your actions and balances (for an auditor or compliance officer, for example), with a privacy preserving Zero Knowledge method.【Hidden info from the public, but providing evidence of the sources to the recipient】 Features
Fully private store of your cryptocurrency assets Trade and participate in DeFi platforms with complete privacy & the full security of the blockchain Swap tokens privately with other users, without an on-chain activity trace Produce a proof of your source of assets - Ex: for compliance purposes They are also planning to release a DEX Why choosing RAILGUN?(Advantages)
Increases the size and noise of the anonymity pool. Which means depositing into RAILGUN are able to achieve privacy and anonymity faster. Keep assets with original token in the RAILGUN system【anonymity in both transaction & storage】, offering a much better level of privacy and anonymity. How does railgun work?
ADD (Not private)
Deposite assets into RAILGUN(keep original assets) → Create a zk note → Note added to the live pool
SPLIT (Transfering funds done by zk)
Split one or more zk notes into 2 zk notes:
Input notes → dead pool
Output notes → live pool
User proves that they own the input notes & not used without revealing the notes themselves(by zk不公开票据内容或自己身份的前提下)
Using Zero-knowledge = Public inputs + private inputs New cretated notes(set a different owner)
REMOVE (Done by zk)
Destroy notes → Transfer assets from RAILGUN【by zk不公开票据内容或自己身份的前提下】 → Received outside of RAILGUN system【not private, receiver’s address&amount is public, but sender is anonymous(only knows it comes from RAILGUN)】
Since privacy and anonymity have different levels,users could choose based on their needs and reduce the gas fee. Ex: they could batch mutiple actions into one zk proof
Tech Parts (More info here)
Protocal
Using JoinSplit transaction,which is based on (U)TXO Aztech explains JoinSplit transaction
Using Nullifiers to eliminate any potential for double spends Using Zero-knowledge = Public inputs + private inputs, to insure the public inputs exist as a part of the sufficient information to prove that the private inputs were what the verifier expected, and are not forged values. The Merkle tree root of our UTXO set ensures very efficiently that the prover is not able to make a fraud claim. RAILGUN zero-knowledge program
RAILGUN zero-knowledge program illustrated by Enzo
The zero-knowledge program verifies(With inputs above)
Deposit amount + input amounts = withdrawal amount + output amounts, so no one can create tokens out of thin air Input notes exist in the Merkle tree by using Merkle root and Merkle proofs of membership The spending keys are valid for the input notes since only the private key of the notes can spend them Nullifiers are correctly calculated The contract checks to make sure:
The zk proof for the transaction is valid Eliminating any double spends Prevent users from making up UTXOs Adapt Modules
Adapt is a smart contract extension, which helps facilitate features such
as private trades and NFTs, etc.
Extra functions but without bloating the code
Adapt module example(collapsed, too long)
Alice wants to sell 100 USDC for 100 USDT, so she generates a note for 100 USDT spendable by herself (let’s call this note A) Bob wants to sell 100 USDT for 100 USDC, so he generates a note for 100 USDC spendable by himself(call this note B) Alice sends note A, to Bob and Bob sends note B, to Alice Alice creates a proof that spends to note B with the hash of commitment A as the Adapt ID (call this proof A) Bob creates a proof that spends to note A with the hash of commitment B as the Adapt ID (call this proof B) Bob sends his proof to Alice. Alice sends her proof to Bob. Either Alice or Bob send both proofs to a common Relayer. In this example Alice will send both Alice submits both proofs to the Swap module (via a Relayer). The Swap module checks that the Adapt ID of proof A is equal to one of the note’s hash of proof B and the Adapt ID of proof B is equal to one of the note’s hash of proof A. If so, both proofs are submitted to the RAILGUN system as an atomic transaction. Entire transaction reverts, if either proof fails Swap Transactions
Swap transactions make use of the Adapt ID interface. Any swaps are performed in an atomic and trustless manner - only pairs of transactions with outputs matching each other’s requests are valid and will get executed
Relayer Network
Anyone can be a Relayer. The Relayer then responds with a fee to be paid (to cover the Relayer’s ETH gas cost). This prevents the user’s internal
RAILGUN transactions from being associated with their ETH address. (Privacy)
Governance
Everything comes from the RAILGUN DAO
RAILGUN smart contract code is only deployed or updated after a DAO governance vote.
RAIL Token & Voting
One staked token = One Vote
Unstaking period is 30 days, then the user could vote
Distribution(check the website for more info)
25% allocatedwaht to Airdrop 25% allocated to the Foundation 50% allocated to RAILGUN DAO 50 million circulating RAIL tokens, Maximum 100 million tokens supply
First week launch proposal - Economics
More info, check the white paper
That app looks like it is still in the early stage
Bibliography: