Railgun 백서

Railgun

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 5쪽

UN Project. Anyone can see Private POI in action at [ppoi.info](https://ppoi.info) by entering a RAILGUN transaction hash. Private Proofs of Innocence List Providers: * [Elliptic](https://www.elliptic.co/) * [ScamSniffer](https://www.scamsniffer.io/) * [PureFi](https://purefi.io/) * [SlowMist](https://www.slowmist.com/) * [Chainalysis Sanctions Oracle](https://go.chainalysis.com/chainalysis-oracle-docs.html) Private Proofs of Innocence is a tool that monitors tokens entering the RAILGUN smart contract to verify that they are not from a known list of transactions or actors deemed to be illegitimate. Upon a shield, a ZK proof is automatically created that proves that the tokens are not a part of a pre-set list of interactions and wallets. This process is end-to-end encrypted and enables decentralized and private assurance of tokens, without compromising user privacy. Private Proofs of Innocence sits alongside (but is separate from) the RAILGUN smart contracts, and is also open-source infrastructure that can be used by other protocols. Private Proofs of Innocence uses only publicly available data and does not reveal anything else about RAILGUN users or their balances and activity, nor does it give any third party any access into the RAILGUN privacy system. It also does not erode the privacy of using RAILGUN nor does it change how the underlying smart contracts’ spending system works; all interactions from 0zk addresses are and always will be impossible to be made public by anyone. Because of this, Private Proofs of Innocence is a superior detection tool to previously existing methods, and is an advancement in both ZK and privacy technology. Legacy bad actor detection tools requires users to give up some personal data like identity documents to a centralized middleman or firm stored in a centralized data lake, exposing personal information to potential vulnerabilities. Private Proofs of Innocence achieves similar aims to a similar level of effectiveness whilst only using public on-chain data, all whilst requiring no personal information. Private Proofs of Innocence protects all RAILGUN users in the following ways: * Users can feel comfortable that they are not sharing a privacy system with known bad actors, which reduces risks for every single RAILGUN user. * Exchanges or other external participants can gain confidence on interactions that they receive from RAILGUN users, ensuring smoother processing and a reduction of wait times. * Users can be sure that private sends they receive from other RAILGUN users are safe and not from known suspicious activity. * Flexible input data which can be adjusted to the user’s risk profile and local jurisdiction, i.e., European users can pick lists relevant to the European Union or United States users can pick lists relevant to the USA etc. ### How it works <figure><img src="https://4189133001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgpI5FGDnzf3cR6tzx7%2Fuploads%2FbquX783aE4MvMOjLK4d2%2Fimage.png?alt=media&#x26;token=b480e4b9-0786-4188-b7b4-7815e1336cd4" alt=""><figcaption><p>Private Proofs of Innocence Architecture</p></figcaption></figure> Private Proofs of Innocence checks begin when tokens enter the RAILGUN privacy system after a shield interaction. Broadly, the steps are as follows: 1. List Providers input public, non-personal, and on-chain data of bad transactions 2. User performs a shield interaction, and waits for the Unshield-Only Standby Period 3. A blinded proof is auto-generated stating that the tokens in the shield are not a part of the List Provider dataset 4. Private Proofs of Innocence checks are then carried forward for any subsequent interactions involving the checked tokens 5. If those tokens are sent to an external exchange, that exchange (or any independent party) can see the valid Private POI proof without seeing anything else about the user like their 0zk address, balances, or history. This helps external actors gain confidence on tokens they receive from a RAILGUN address without affecting user privacy in any way. #### Unshield-Only Standby Period With Private Proofs of Innocence, there is an Unshield-Only Standby Period, during which the only available action will be an unshield interaction to return tokens back to the original wallet. This Unshield-Only Standby Period is to give List Providers enough time to update their data such that bad actors are unable to hop addresses quickly to outrun data updates. As always, during this Unshield-Only Standby Period, users retain full control and custody over their tokens and can be unshielded back to the shielding address if needed urgently. To begin with, in the wallet applications that support Private Proofs of Innocence, this Unshield-Only Standby Period will be 1 hour, meaning tokens in new shields will have to wait 1 hour before they can be used in further interactions other than reverting out without privacy back to the original address.&#x20; #### Transaction Level Checks Private Proofs of Innocence works at the balance and transaction level. Meaning, Private Proofs of Innocence proofs are generated after the initial shield transaction and apply to the tokens that are a part of that interaction. They are then carried forward for every following transaction within RAILGUN involving those tokens. For example: 1. Alice sends 100 USDC into a 0zk address and generates a Private POI proof which applies to that 100 USDC. In this example, she is using AliceWallet; one wallet option of many that features RAILGUN privacy options and Private POI. 2. She then sends that 100 USDC to Bob, who can use Alice’s existing Private POI proof to show that the funds he received from Alice are not a part of the list of illicit activity. 3. Bob then sends that 100 USDC to a 0x wallet owned by Carl. All Carl knows is that the 100 USDC he received has a valid Private POI proof. As it is a RAILGUN interaction, he does not know anything else about Alice and Bob’s on-chain activity other than what they choose to tell him personally. He would not even know that the tokens were from Bob’s 0zk address is not revealed unless Bob chooses to tell him. 4. Alice then sends an additional 50 USDC which generates another Private POI proof that applies to that shield of 50 USDC. #### List Providers Private Proofs of Innocence starts with a List Provider, a dataset of transactions and addresses through an API (Application Programming Interface) of which to prove against (i.e., a list of bad actor activity for users to ZK prove that they are not a part of). Anyone can choose to publish their own lists and be a List Provider. Users and wallets are free to use whatever combination of List Providers they please, although some wallet providers will require a default List Provider. The ZK-cryptography generates an independent proof per Private Proofs of Innocence List Provider, which is verified and made available for further usage, without revealing any of the encrypted details of the interaction or the user. **Note: List Providers only look at publicly available data and gain no special insight into transactions. Private Proofs of Innocence does not affect privacy levels in the RAILGUN privacy system. All data relating to 0zk addresses (including balances, history, and addresses) are and always will be encrypted to everyone.** List Providers are a read-only data source. Wallets do not send any data from Private POI or proofs to List Providers, and they cannot log IP addresses. **Private Proofs of Innocence Nodes** Private Proofs of Innocence Nodes sync proof data and make it available for anyone interested in verifying Private Proofs of Innocence checks. To prevent spam from being submitted, proof data is synced in a manner similar to the Interplanetary File System (IPFS), a decentralized data storage network. Wallets create proofs with encrypted data and update a shared list through Private Proofs of Innocence Nodes. Only the sending and receiving parties can decrypt this data, so no other party gets any information about what interactions they are linked to or what interactions are proved, ensuring complete privacy. Since unshield interactions have a public recipient, anyone can check if an unshield interaction is proved (and thereby knowing that it has a series of private proofs to a shield that is not on the bad transaction list), but they cannot see into the transaction other than that it was validly proved to not be from a publicly known set of bad transactions. This enables RAILGUN-integrated wallets, centralized exchanges, or anyone needing to verify that a shield has a Private Proofs of Innocence. Again, there is no special insight for Private Proofs of Innocence nodes. Like IPFS, anyone can run a Private Proofs of Innocence node. This ensures decentralized verification of Private Proofs of Innocence data such that every participant in the system can check proof validity for themselves rather than relying on a centralized actor. #### Broadcasters As 0zk addresses cannot broadcast transactions or submit gas to Ethereum nodes they need a broadcasting wallet. Public Broadcasters broadcast interactions to the network and submit the necessary gas. They receive a RAILGUN private send at the same time to recover their costs, which is done in a private transaction. Before Broadcasters can do this with any given set of tokens, those tokens must have a completed Private Proofs of Innocence check. Broadcasters have Private Proofs of Innocence nodes which sync and verifies proof data. In cases where there is an incomplete Private Proofs of Innocence check for a series of tokens (such as during the Unshield-Only Standby Period), users can Self-Broadcast a transaction to return tokens back to the original shielder. **Full Transaction Private Proofs of Innocence Flow** The following is an example of how RAILGUN private transactions flow following completed Private Proofs of Innocence after an initial shield: 1. Bob's tokens begin with a Private POI, either from a shield or a 0zk-0zk transfer. This will be generated automatically by the sender's wallet, designating Bob's funds as "Spendable." In the case of a shield, the Private POI proof will be automatically generated by each List based on public on-chain data. 2. Bob proves a transaction to send DAI to Alice through a Broadcaster. As part of the proof, Bob generates a special Proof of Spendability, which verifies the Private Proofs of Innocence proof for the Broadcaster, and guarantees that the received premium will be verified and spendable. 3. Bob sends the transaction through the Broadcaster and waits for it to be forwarded and confirmed by the blockchain. 4. Once confirmed, Bob's wallet automatically generates a Private POI proof for a blinded hash of the UTXO commitment that he sent to Alice. The POI data is validated by POI nodes, which make the blinded data available publicly. 5. Alice's wallet inherits the Private Proof of Innocence, based on the blinded commitment that only her viewing key could decrypt. This automatically designates her tokens as Spendable, for transfers, unshields or swaps & DeFi dApps, without her needing to generate her own Privte POI proof. This ensures that the Private Proofs of Innocence system is efficient, as proofs need to only occur once within the RAILGUN system for each shield interaction, even if those tokens are then spent by the initial shielding user. The only case where an additional Private Proofs of Innocence proof is needed is if the tokens are sent out of a 0zk address and the user reuses them in RAILGUN.&#x20; ### ZK Cryptography Private Proofs of Innocence works with existing RAILGUN ZK cryptographic systems. Each RAILGUN 0zk balance is comprised of a set of encrypted [UTXOs](https://docs.railgun.org/wiki/learn/using-shielded-tokens#utxos-and-nullifiers) organized via a private [Merkle Tree](https://docs.railgun.org/wiki/learn/shielding-tokens#private-pools-and-merkle-trees). Every RAILGUN transaction, such as a Private Send, generates a ZK proof (through [cryptographic circuits](https://docs.railgun.org/wiki/learn/privacy-system/zero-knowledge-cryptography#what-is-a-circuit)) verifying that the sender has sufficient UTXOs in their balance to send the transaction. If the balance is enough for the transaction, then it is valid and the Merkle Tree updates with the new change in balance and state. This is how RAILGUN internal balances are maintained. As Private Proofs of Innocence sits alongside the RAILGUN smart contracts, it does not affect this Merkle Tree-based spending system in any way. Instead, it enables users to generate an additional recursive proof, which is a proof that the underlying proofs of a user’s balance are not a part of the bad transaction list. As RAILGUN allows for intermediate 0zk balance transfers between shield and unshield interactions and each of these interactions is itself a proof, Private Proofs of Innocence has a recursion mechanism to assert further statements about these existing proofs. Recursive SNARKs can prove the entire flow of funds from the initial shield interaction satisfies the conditions of the Merkle proof of non-inclusion. Private Proofs of Innocence will compute proofs for every leaf in the regular Merkle Tree that apply to a balance of UTXOs and account for intermediate interactions between shield and unshield interactions. This is done through recursive SNARKs which tie the whole proving system together. # RAILGUN Assurance Suite RAILGUN has 3 main tools for auditability and assurance:&#x20; * [Viewing Keys](/wiki/learn/wallets-and-keys#viewing-keys): Shareable read-only private key for auditability or investigatory purposes * [Private proofs of Innocence (PPOI)](/wiki/assurance/private-proofs-of-innocence): a Zero-Knowledge assurance tool that checks that tokens moving through RAILGUN do not originate from a known list of malicious activity. This is achieved via the use of cryptographic proofs, which keeps RAILGUN users’ data private. * [Koinly Tax Exports](/wiki/assurance/koinly-tax-exports): Easy file exports for use in the Koinly tax software # Koinly Tax Exports RAILGUN users can also easily export their interaction history for use in the [Koinly](https://koinly.io) tax software. This optional tool might be useful if users want to calculate their tax obligations of their private interactions using Koinly. Koinly also supports multiple tax jurisdictions. Partner project Railway Wallet have produced a [quick guide](https://help.railway.xyz/customize/koinly-tax-reports) on how to access Koinly tax reports on their wallet. # RAIL Token Overview What the RAIL token is for (security staking and protocol requests) and isn't (gas fees, buybacks, burns). RAIL is the RAILGUN Protocol's security token. Holding RAIL is not necessary to use the privacy system nor does holding RAIL provide privacy. RAIL is a standard ERC-20 token deployed to Ethereum. RAIL liquidity can be found on Sushiswap and Uniswap, with aggregated routing available through [Matcha.](https://matcha.xyz/) [Stake RAIL](https://stakerail.fi) to secure the protocol and collect security rewards. stakerail.fi is a security staking portal run by a third party, not the RAILGUN protocol team. See [Helpful Links](/wiki/learn/helpful-links) to verify contract addresses directly, or interact with the staking contracts yourself. RAILGUN on Polygon and BSC have their own independent security-staking systems & tokens which are separate from the system on Ethereum. RAILGUN on Arbitrum is secured by staked RAIL on Ethereum. **Note:** RAIL is never used to pay transaction or gas fees. Those are paid in the token being transacted, or in the chain's native gas. There is no "RAIL guardian" role, and no buy-back-or-burn mechanism. RAIL, RAILPOLY, and RAILBSC are fixed-supply ERC-20s. ### Contract Addresses **Ethereum - RAIL**: 0xe76c6c83af64e4c60245d8c7de953df673a7a33d **BNB Smart Chain - RAILBSC:** 0x3F847b01d4d498a293e3197B186356039eCd737F **Polygon - RAILPOLY:** 0x92A9C92C215092720C731c96D4Ff508c831a714f # RAIL Security Rewards RAIL stakers provide security to the RAILGUN Protocol. By signaling their support or non-support of potential code changes, stakers ensure that only beneficial changes can be made to: * The core privacy smart contracts * The on-chain treasuries * Any other on-chain component of the RAILGUN Protocol. For their work in securing the RAILGUN Protocol, stakers receive a regular reward to incentivize active engagement with the code change process.&#x20; To receive these rewards, stakers must:&#x20; 1. Have some RAIL locked.&#x20; 2. View the protocol requests submitted to the smart contracts and evaluate the requests. 3. Submit gas to claim rewards. 4. Not delegate their vote to a different address. If votes are delegated, the address that is delegated to will receive the allocation. RAIL stakers receive a portion of protocol [deductions](https://docs.railgun.org/wiki/learn/railgun-fees) as an incentive for participation in code changes. This is because anyone can propose any code changes to the protocol at any time. Widespread participation in the code change process protects the integrity of the RAILGUN Protocol. **4.2% of the treasury tokens are allocated to the claiming mechanism every 2 weeks.**&#x20; Tokens are allocated in WETH (or WBNB/WMATIC for other chains), RAIL, and DAI. RAIL stakers can claim their tokens (a transaction which requires gas) on whichever chain their RAIL is locked.&#x20; RAIL stakers receive an allocation proportionate to the amount of RAIL they have locked in the governance contract. For example, if a user's locked share of RAIL is 1% of all staked RAIL, then the user can collect 1% of the 4.2% biweekly allocation.&#x20; # RAIL Tokenomics **Maximum Supply** * 100,000,000 (RAIL on Ethereum) * 44,546,789 (RAILBSC on BNB Smart Chain) * 55,000,000 (RAILPOLY on Polygon) **RAILPOLY & RAILBSC** RAILGUN on Polygon and BSC have their own separate protocol request systems and therefore have their own chain-specific tokens. RAIL (on Ethereum), RAILPOLY and RAILBSC are different as they evaluate changes to the RAILGUN deployment on their respective chains. RAILPOLY and RAILBSC were distributed via airdrops to RAIL stakers and RAIL liquidity providers. * [RAILPOLY Airdrop Details](https://medium.com/@Railgun_Project/railpoly-launch-and-token-airdrop-fded511a0ce2) * [RAILBSC Airdrop Details](https://medium.com/@Railgun_Project/snapshots-and-airdrops-6b87572a957e) # How to Lock RAIL Steps to lock RAIL for security staking rewards and protocol request evaluation via stakerail.fi, a third-party portal. Lock RAIL in the security staking contract to collect security staking rewards, evaluate the content of protocol requests and decide whether they should be executed, or delegate that decision-making power to another wallet. Once locked, there is a 30 day unlock period, during which there is no ability to evaluate protocol requests, nor the ability to collect rewards. Steps to lock RAIL: 1. Purchase/hold RAIL in a self-custodial EVM/Ethereum wallet 2. Head to [stakerail.fi](https://stakerail.fi), a security staking portal run by a third party, not the RAILGUN protocol team. It reads directly from the on-chain staking contracts. You can verify any balance or reward it shows against [Helpful Links](/wiki/learn/helpful-links), or interact with the contracts directly, or run your own portal via IPFS. 3. Connect your wallet 4. Enter the amount you wish to lock and press "Stake" 5. Once locked, use the portal's request tab to evaluate the content of active protocol requests and decide whether they should be executed, or press "Delegate" to delegate that decision-making power to another wallet. # Decentralized Protocol Requests How RAILGUN's on-chain protocol request process and treasury distribution work, including why treasury funds never
프로젝트로 돌아가기