The Future of Crypto Privacy with RAILGUN Lead Cryptographer Hisham Galal by@railgun123

The Future of Crypto Privacy with RAILGUN Lead Cryptographer Hisham Galal

image
RAILGUN HackerNoon profile picture

RAILGUN

RAILGUN is a smart contract system designed to protect user privacy and financial info during every DeFi transaction.

Could you introduce yourself to us?

Hi, my name is Hisham Galal, I’m a cryptographer and protocol engineer contributing to RAILGUN. I have a Ph.D. in cryptography and privacy-preserving protocols from Concordia University, and I’m an active researcher in using zero-knowledge proofs for privacy protocols.

We want to learn more about the RAILGUN
process. Can you tell us how your smart contract system works?

RAILGUN‘s smart contract essentially comprises multiple pools of different ERC20 tokens, but no one can find out what share each user has based on the transaction data. Hence, one can consider this as a private wallet smart contract where a user can add privacy to their favorite tokens.

Also, RAILGUN is designed with portability in mind, so RAILGUN users can interact with other already-deployed smart contracts like DeFi projects in a privacy-preserving manner.

So, by using RAILGUN, no one can learn your trading strategies because all transactions simply appear as if they are coming from the RAILGUN smart contract.

This means an observer cannot tell which user is actually behind a specific transaction and whether a set of transactions belong to the same user.

To achieve all these features, RAILGUN utilizes cryptographic protocols, including zkSNARKs, Merkle Trees, Poseidon hash, encryption, and signatures of knowledge to allow users to prove that they own an amount of a certain token within RAILGUN, and they can then transfer
it to a recipient without revealing any information about the transaction.

All of this happens in a private way while guaranteeing that users cannot double-spend or create tokens out of thin air.

What blockchain(s) does your project use?

Ethereum, Binance, smart chain, and Polygon. Future deployments will include Solana and Polkadot.

Can you expand a little on Project Tokenomics and its role in your project?

There is a DAO that controls all the money earned through fees on RAILGUN. This RAIL token gives voting right on how those fees will be split. Those who stake RAIL can look forward to receiving a constant distribution of fees when the DAO approves the relevant proposal.

What sets RAILGUN’s crypto privacy system apart from other privacy protocols? Why would I choose RAILGUN over a competitor?

RAILGUN brings unique features such as:

1. The ability to transfer arbitrary amounts, not fixed denominations.

2. Interaction with existing smart contracts without requiring any modifications to them. This feature, for example, allows users to hide their trading strategies when interacting with DeFi lending/borrowing protocols.

3. Having the same security guarantees of layer-1 without relying on off-chain at all, such as rollup services.

4.  Features under current development, which include private NFT auctions and a private DEX.

Zero-Knowledge Proofs seem to be central to the RAILGUN system. Can you elaborate on what those are and why they’re so important to your project?

Zero-Knowledge proofs (specifically zkSNARK) are the main cryptography protocol for adding privacy to RAILGUN. In ZKPs, there are a prover and a verifier; the prover has some secret data that he doesn’t want to reveal while still conveying its truth to the verifier.

For example, consider a situation where I want to prove that my age is above X without showing you any other details, compared to what you would do in real life by showing a piece of ID.

Every privacy feature in RAILGUN relies mainly on the zkSNARK proof behind it. My main role in RAILGUN is to design and develop these proofs in addition to protocol engineering.

What is the Adapt ID interface and why is it so valuable to the RAILGUN protocol?

To interact with a dApp like Uniswap, we need a smart contract that knows the interface of RAILGUN and Uniswap. This smart contract is called an adapter, and it relies significantly on the field AdaptID for its service.

Let's say you want to swap some of your private funds in RAILGUN via Uniswap. We need an adapter that knows how to call withdraw/deposit funds from/to RAILGUN, and knows how to call the swap function on Uniswap takes some parameters.

In order to authorize these parameters, the user sets AdaptID as their hash value. When the user generates a zkSNARK proof, the prover takes AdaptID in its account. Then, the user sends the proof along with swap parameters and AdaptID through a relayer to the adapter.

The adapter smart contract can check whether the transaction parameters are actually authorized by the prover, or if they have been modified in transit by a relayer. The adapter computes the hash on the Uniswap parameters and uses it as input to the proof verification.

If it is successful, then the adapter smart contract can proceed with the transaction submission to its destination smart contract.

The technique explained above is known in cryptography as a signature of knowledge. In other words, rather than using public and private keys as in regular transactions, it uses the prover’s knowledge of valid secrets to sign the hash of the transaction parameters.

The RAIL token is the governance token of the RAILGUN DAO. What is the current distribution/allocation of Rail?

The RAIL token is very well distributed; there was an airdrop with no locks or vesting, and over two thousand addresses have now held RAIL, with approximately one thousand of them staking the token.

Half the circulating supply is currently staked, which locks the token for a minimum of 30 days.

Tags