In a recent interview, Hisham Gilal, Director of RAILGUN, takes an in-depth look at the RAILGUN smart contract system, how the RAILGUN process works, and what sets the Crypto Privacy Project apart from other privacy protocols. Gilal provides crucial insight into RAILGUN and what it means for the future of crypto transaction security.

picture
Profile picture of RAILGUN Hacker Noon

RAIL SHOTGUN

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

Can you introduce us?

Hello, my name is Hisham Galal, I am a cryptographer and protocol engineer contributing to RAILGUN. I have a doctorate. in Cryptography and Privacy Protocols at Concordia University, and I am an active researcher in the use of zero-knowledge evidence for privacy protocols.

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

RAILGUN’s smart contract basically consists of several different ERC20 token pools, but no one can know how much share each user has based on the transaction data. Hence, it can be thought of as a private wallet smart contract where a user can add privacy to their preferred tokens.

In addition, RAILGUN is designed with portability in mind, so that RAILGUN users can interact with other smart contracts already deployed, such as DeFi projects, so as to maintain privacy.

So, by using RAILGUN, no one can learn your trading strategies because all the trades just appear as if they come from the RAILGUN smart contract.

This means that 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 of these features, RAILGUN uses cryptographic protocols including zkSNARK, Merkle Trees, Poseidon hashing, encryption and knowledge signatures to allow users to prove that they own a certain amount of a certain token within RAILGUN, and they can then transfer
to a recipient without revealing any information about the transaction.

All of this happens privately while ensuring 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 develop a little Project Tokenomics and its role in your project?

There is a DAO that controls all the money earned from fees on RAILGUN. This RAIL token gives the right to vote on the distribution of these costs. Those who bet on RAIL can expect to receive a constant distribution of fees when the DAO approves the corresponding proposal.

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

RAILGUN brings unique features such as:

1. The possibility of transferring arbitrary amounts, not fixed denominations.

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

3. Have the same security guarantees as layer 1 without depending at all on the off-chain, such as stacking services.

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

Zero-Knowledge Proofs seem to be at the heart of the RAILGUN system. Can you elaborate on what these elements are and why they are so important to your project?

Zero-Knowledge Evidence (especially zkSNARK) is the primary cryptographic protocol to add privacy to RAILGUN. In ZKPs, there is a prover and a verifier; the Prover has secret data that it does not want to reveal while transmitting its truth to the verifier.

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

Every RAILGUN privacy feature relies primarily on the zkSNARK evidence behind it. My main role within RAILGUN is to design and develop this evidence in addition to protocol engineering.

What is the Adapt ID interface and why is it so valuable for 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 heavily on the AdaptID field for its service.

Suppose you want to exchange part of your private funds in RAILGUN via Uniswap. We need an adapter that knows how to call funds from / to RAILGUN, and knows how to call the swap function on Uniswap takes some parameters.

In order to allow these parameters, the user sets AdaptID as the hash value. When the user generates a zkSNARK proof, the Prover takes AdaptID in his account. Then the user sends the proof with the exchange parameters and AdaptID via a relay to the adapter.

The smart contract of the adapter can check if the transaction parameters are really allowed by the prover, or if they have been modified in transit by a relay. The adapter calculates the hash on the Uniswap parameters and uses it as input for proof checking.

If successful, the adapter smart contract can proceed to submit the transaction to its destination smart contract.

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

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

The RAIL token is very well distributed; there was a drop without a padlock or acquisition, and over two thousand addresses have now held RAIL, with about a thousand of them staking the token.

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

Profile picture of RAILGUN Hacker Noon

Key words