Private Balances

Overview

RAILGUN private (shielded) balances are built through a registry of UTXOs (unspent transaction outputs), similar to Bitcoin. The primary difference is that the UTXO list is encrypted with the sender and receiver’s keys, meaning that no outsider can view the contents of the UTXO.
The entire list of RAILGUN UTXOs makes up a merkle tree data structure, which is a structured list of hashes which is used to validate the balance state during transactions.
While generating the current merkle tree, each commitment (transaction) leaf must be synced and decrypted in order to build a given wallet’s private balance. This syncing process can take a few minutes. Once the sync is complete, UTXO token balances are aggregated into a user’s balance.