Private Swap
Liberty Swap's Private Mode integrates the RAILGUN privacy system with intent-based execution and cross-chain routing, allowing users to trade and move liquidity with more confidentiality than most public DeFi protocols provide.
Note: Privacy tools help protect legitimate users from front-running, balance exposure, and personal safety risks. Do not use Liberty Swap to conceal the proceeds of crime or to evade sanctions. Liberty Swap applies compliance controls as described in the Terms of Service. Private Mode does not provide legal anonymity.
Built on RAILGUN
Liberty Swap builds its Private Mode on RAILGUN, an on-chain privacy system deployed as smart contracts on EVM blockchains. RAILGUN is not a separate chain.
Shielded funds are held in RAILGUN smart contracts.
Users control the keys used to generate zero-knowledge proofs.
Liberty Swap does not have access to viewing keys or private balances.
Privacy Features of Liberty Swap
Wallet-Based Access
Liberty Swap does not require user accounts. Users interact directly from their own wallets, subject to the compliance controls described in the Terms of Service.
What Private Mode Is Designed to Protect
Inside RAILGUN, the following information is encrypted on-chain:
Sender address
Recipient address
Transaction amount
Private transactions are submitted through broadcaster addresses rather than the user's public wallet. Deposits into and withdrawals from RAILGUN remain visible on-chain.
Shielded Balances and Privacy Sets
Funds deposited through Private Mode enter a shared shielded pool. Privacy generally improves as more users, value, and transactions use the pool.
Broadcasters and Gas Abstraction
Private transactions are submitted to the blockchain through broadcasters, which pay gas on behalf of users and are reimbursed from the shielded balance. Transaction details are encrypted and cannot be modified by the broadcaster. If one broadcaster is unavailable, another can be used.
Intent-Based Private Routing
Users sign a single intent describing what they want to receive, and Liberty Swap executes the required steps. This reduces the number of manual steps a user takes, but the route's on-chain entry and exit points remain visible.
Security Considerations
RAILGUN operates directly on the underlying chain, without a separate validator set. Funds kept in a shielded balance are exposed to smart contract risk and the risks of the underlying chain. Cross-chain routes add bridge, relayer, and liquidity risks.
Best Practices
Privacy can be weakened by predictable patterns. To reduce exposure to front-running and balance tracking:
Avoid predictable timing between deposits and withdrawals
Prefer common, round amounts, which are less distinctive than unusual amounts
Use different wallets for different purposes
Avoid repetitive timing or destination patterns
Last updated