> For the complete documentation index, see [llms.txt](https://docs.libertyswap.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.libertyswap.finance/liberty-shield/core-architecture.md).

# Core Architecture

Liberty SHIELD is a unified privacy and routing layer designed for dApps across any blockchain to integrate and use.

{% hint style="info" %}
LibertySwap is one of the applications that leverages Liberty Shield to facilitate private swaps. See [Liberty Shield vs Liberty Swap](https://docs.libertyswap.finance/general-information/introduction/liberty-shield-vs-liberty-swap.md)
{% endhint %}

Liberty SHIELD enables users to move assets into and out of Railgun and other privacy protocols with RAILGUN-based privacy features and less cross-chain complexity.

Liberty Shield abstracts away gas management, relayers, and liquidity fragmentation, allowing users to focus on outcomes rather than infrastructure.

<div><figure><img src="https://1528550342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqaQp0E2p9WUSJko6TzUr%2Fuploads%2FYCHqeJN695h87G2FOs4v%2FIMG_0496.jpeg?alt=media&amp;token=6714e32d-4f5b-4424-847b-ee68201b442c" alt=""><figcaption></figcaption></figure> <figure><img src="https://1528550342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqaQp0E2p9WUSJko6TzUr%2Fuploads%2FFaOwN1TyoIPwFdUQItaI%2FIMG_0497.jpeg?alt=media&amp;token=99784da0-9922-428b-96ee-575fd6ea6ef9" alt=""><figcaption></figcaption></figure></div>

## Functionality

*At launch, Liberty Shield supports the following flows on*&#x20;

* Shield ETH:\
  Convert public ETH on Ethereum into a private Railgun balance.
* Unshield ETH:\
  Convert ETH held in a Railgun balance back into public ETH on Ethereum.

These operations are executed directly from the Railgun system and do not rely on external liquidity pools.<br>

*In the future state:*

* Users can shield multiple assets, such as ETH and stablecoins, from many source blockchains into Railgun and other supported privacy protocols and layers.
* From a shielded balance, for example a Railgun balance, users can unshield assets to any supported destination chain.
* The destination chain does not need native Railgun or other privacy protocol or layer support.
* Liberty Shield aims to support shielding into and unshielding from more privacy protocols and layers.

## How Shielding Works

1. Users start with assets on a public blockchain.
2. Liberty Shield routes the assets into Railgun or other privacy contracts.
3. Funds appear as shielded balances inside Railgun or other privacy contract balances.
4. Balances and transfers inside the shielded pool are encrypted. The shielding transaction itself remains visible on-chain.

Private actions, such as private sends, can then be made from the shielded balance.

## How Unshielding Works

1. Users choose a destination chain and asset.
2. Liberty Shield routes funds out of Railgun or other privacy contract balances
3. Assets are delivered directly to the destination chain.
4. The user receives the funds at the destination address. The unshielding transaction is visible on-chain.

This works even if the destination chain does not natively support Railgun.

\
Fees and Execution Model
------------------------

Liberty Shield uses a simple fixed fee model:

0.5% total fee, covering:

* Blockchain gas fees
* Railgun fees
* Relayer fees
* Cross chain execution costs

The fee shown in the quote when you confirm is the fee that applies. Execution time and availability depend on network and liquidity conditions.

**Fee changes.** All fees, rates and fee structures applicable to Liberty products and ZKX Wallet, including those described on this page, are subject to change at any time, with or without prior notice. Any such changes will be published exclusively in this documentation, which is updated on an ongoing basis and constitutes the sole official source of current fee information. Fee information provided through any other channel, including social media, community channels, direct messages or third-party websites, is not authoritative and should not be relied upon. The fees applicable to a particular transaction are those displayed in the quote or transaction summary at the time that transaction is confirmed.
