# RAILGUN Private Mode

Private Mode is LibertySwap’s privacy preserving execution path for cross chain asset transfers across Ethereum, PulseChain, and other supported blockchains, including both EVM and non EVM networks. It uses zero knowledge based shielding infrastructure to prevent on chain linkage between source and destination transactions, while fully preserving non custodial control and user autonomy.

In its current implementation, Private Mode supports **ETH (Ethereum) ⇄ WETH (PulseChain)** routes and operates through a unified intent-based workflow. Users submit a single instruction (“intent”), and Liberty Swap coordinates the necessary settlement steps across chains without exposing sender identity, recipient identity, or transaction amounts on public ledgers.

Private Mode is optional and distinct from Liberty Swap’s standard execution mode. Users explicitly choose when to enter or exit privacy.

## Architectural Design

### Privacy-Preserving Routing

Private Mode establishes a bidirectional, privacy-preserving route:

```
Ethereum ⇄ Railgun ⇄ PulseChain
```

Under this design:

* Assets entering PulseChain from Ethereum are routed through Railgun and arrive in a shielded state.
* Assets exiting PulseChain to Ethereum are likewise routed through Railgun before settlement.
* No direct on-chain linkage between source and destination addresses is created on public ledgers.

This architecture allows users to selectively enter or exit privacy without forcing continuous participation in shielded pools.

### Key Properties

* **User-Controlled Privacy**\
  Users retain full discretion over timing, amounts, and duration of shielded balances. Assets may be transferred immediately through the route or held privately for any period.
* **Intent-Based Execution**\
  Users submit a single signed intent. All intermediate steps are executed by Liberty Swap relayers requiring minimal user intervention.
* **Non-Custodial Operation**\
  At no point does Liberty Swap assume custody or discretionary control over user assets.
* **Gas abstraction**\
  Private Mode leverages gas abstraction where supported, allowing users to initiate intents without maintaining native gas balances on each participating blockchain. Required execution fees are handled within the protocol’s settlement process.
* **On-Chain Verifiability**\
  Settlement occurs entirely on-chain via smart contracts. Liberty Swap does not maintain off-chain transaction records.

### Supported Routes (Current)

* **Ethereum → PulseChain**\
  ETH/USDC (Railgun) → ETH/USDC (PulseChain)
* **PulseChain → Ethereum**\
  ETH/USDC (PulseChain) → ETH/USDC (Railgun)

Private Mode routes are currently subject to conservative transaction limits during early deployment. These limits may be adjusted as liquidity and system capacity mature.

### Railgun Balance Model

Railgun maintains chain-specific shielded balances:

* A user’s shielded balance on Ethereum is distinct from their shielded balance on PulseChain.
* Each network operates its own Railgun smart contracts and Merkle tree.
* Assets remain local to a chain unless explicitly transferred via a bridge or intent route.

Liberty Swap’s private routing connects these isolated shielded environments through an intent-driven settlement process, enabling cross-chain movement without exposing transactional linkage.

### Transaction Tracking and Privacy

Each Private Mode transaction is assigned a temporary Order ID for user-side status tracking. The Order ID:

* Exists solely to communicate execution state to the user.
* Automatically expires after 24 hours.
* Is not stored alongside wallet addresses or transaction hashes.

Liberty Swap does **not** retain transaction hashes, wallet identifiers, or user metadata. Users who wish to independently verify execution may do so using their own wallet addresses and on-chain explorers. Privacy guarantees remain intact regardless of whether verification is performed.

### Status Visibility and UX Considerations

Due to the multi-layered nature of zero-knowledge execution and cross-chain settlement, private transactions may involve longer confirmation windows than standard swaps.

Liberty Swap is actively improving UI-level status notifications to provide clearer execution feedback without compromising privacy or storing user-identifiable data.

## Important Considerations

* Private Mode is optional and user-initiated.
* Shielded transfers may incur higher fees and longer settlement times due to zero-knowledge proof generation.
* Users are responsible for understanding applicable laws and regulations in their jurisdiction when using privacy-enhancing technologies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.libertyswap.finance/liberty-swap-2.0/private-swap/railgun-private-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
