> 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-swap-2.0/core-architecture.md).

# Core Architecture

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqaQp0E2p9WUSJko6TzUr%2Fuploads%2Fqf9yq9CuaV4WMV0jD3cS%2F1.MP4?alt=media&token=89eb0bc3-6046-4b23-826e-a428720136d6>" %}

Liberty Swap is an intent-based cross-chain swap protocol. Users specify what they want to do (for example, "send 100 USDC from Base to PulseChain"), and the protocol determines and executes a route across chains. Users keep control of their wallets, private keys, and signing credentials. Depending on the route, execution uses smart contracts, liquidity pools, and relayers operated by Liberty Swap, or third-party protocols.

### Cross-Chain Scope and Asset Coverage

Liberty Swap focuses on moving liquidity into and out of PulseChain. Supported networks, routes, and assets are shown in the interface and in the Liberty Swap API documentation. Routes between non-PulseChain networks may be enabled when liquidity and execution reliability meet protocol requirements.

### Multi-Chain Integration

Liberty Swap integrates with supported networks through smart contracts and protocol-specific adapters. Some routes use liquidity pools operated by Liberty Swap to deliver assets on the destination chain; others use third-party protocols.

### Intent Abstraction and Execution

When a user submits a swap request, the protocol translates it into a sequence of on-chain operations. The user signs the transaction that starts the route, and relayers execute the remaining steps on-chain.

### Split Execution

Swaps may be executed in separate legs on the source and destination chains. This design is intended to reduce the information available to any single execution step. In Standard Mode, each leg is a public on-chain transaction and may be linked by timing and amount. Liberty Swap processes transaction data as described in the Privacy Policy.

### Account and Gas Abstraction

Liberty Swap supports gas abstraction so that users do not always need native gas tokens. The protocol may sponsor gas costs or allow fees to be paid in supported tokens.

### RAILGUN Integration (Private Mode)

Private Mode integrates RAILGUN, an on-chain zero-knowledge privacy system. Inside RAILGUN, transactions are designed to reduce the visibility of sender and recipient addresses, asset types, and amounts. Liberty Swap does not have access to viewing keys or private balances. Entry to and exit from RAILGUN through Liberty Swap rely on routes executed by Liberty Swap's relayers. Private Mode does not guarantee anonymity.

### Wallet Integration

Liberty Swap can be accessed as a dApp in compatible wallets, where the wallet handles signing.
