> For the complete documentation index, see [llms.txt](https://docs.baltex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baltex.io/whitepaper/5.-liquidity-graph-model.md).

# 5. Liquidity Graph Model

Baltex Protocol represents liquidity access as a directed weighted multigraph. Vertices represent asset states on networks (optionally decorated with venue context), and edges represent executable transformations (DEX swap, CEX trade, provider swap, withdraw/transfer, relay).

```mermaid
flowchart LR
    VS["Venue State
(Uniswap V3 Pool)"]
    A1["Asset State
(PEPE@ETH)"]
    A2["Asset State
(USDC@ETH)"]
    CM["CEX Market
(USDC/ZEC)"]
    RL["Relay Asset
(Monero L1)"]
    A3["Asset State
(ZEC@ZEC)"]

    VS -.-> A1

    A1 -- "DEX_SWAP" --> A2
    A2 -- "CEX_TRADE" --> CM
    CM -- "WITHDRAW" --> A3

    A1 -- "RELAY (private)" --> RL
    RL -- "OUTTAKE" --> A3
```

Figure 2. Simplified liquidity graph taxonomy (illustrative).<br>

#### Components

<table><thead><tr><th width="275">Component</th><th>Description</th></tr></thead><tbody><tr><td><strong>Venue State</strong> (Uniswap V3 Pool)</td><td>Liquidity venue providing the on-chain DEX swap context.</td></tr><tr><td><strong>Asset State</strong> (PEPE@ETH)</td><td>Initial asset — PEPE held on the Ethereum network.</td></tr><tr><td><strong>Asset State</strong> (USDC@ETH)</td><td>Intermediate asset after DEX swap — USDC on Ethereum.</td></tr><tr><td><strong>CEX Market</strong> (USDC/PEPE)</td><td>Centralized exchange market used to trade USDC into the withdrawal path.</td></tr><tr><td><strong>Relay Asset</strong> (RAND L1)</td><td>Private relay bridge asset on Monero L1 network, used for the off-exchange path.</td></tr><tr><td><strong>Asset State</strong> (ZEC@ZEC)</td><td>Final output asset — ZEC on the Zcash network.</td></tr></tbody></table>

***

#### Execution Paths

#### Path 1 — DEX Route

<table><thead><tr><th width="91">Step</th><th width="164">Action</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><code>DEX_SWAP</code></td><td>Swap PEPE → USDC on Uniswap V3 (Ethereum).</td></tr><tr><td>2</td><td><code>CEX_TRADE</code></td><td>Trade USDC on a CEX market (USDT/ZEC pair).</td></tr><tr><td>3</td><td><code>WITHDRAW</code></td><td>Withdraw from CEX to destination as ZEC@ZEC.</td></tr></tbody></table>

#### Path 2 — Private Relay Route

<table><thead><tr><th width="90">Step</th><th width="167">Action</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><code>RELAY (private)</code></td><td>Route PEPE@ETH through a private L1 relay bridge.</td></tr><tr><td>2</td><td><code>OUTTAKE</code></td><td>Extract the bridged value as ZEC@ZEC on the Zcash network.</td></tr></tbody></table>

***

#### Notes

* Both paths originate from **PEPE\@ETH** and terminate at **ZEC\@ZEC**.
* The **DEX route** is the public, on-chain path with higher transparency.
* The **Relay route** is a private, off-chain path optimized for privacy.
* The **Venue State** (Uniswap V3) is only relevant for the DEX path.

### 5.1 Edge attributes (normalized)

Each edge is evaluated under constraints and costs, typically including:

* limits: min/max amount supported
* fee model: venue fees + network fees (estimated)
* slippage model: for AMM edges (depth/price impact)
* latency model: expected time-to-complete distribution (p50/p90/p99)
* reliability score: historical success rate for the edge/venue


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.baltex.io/whitepaper/5.-liquidity-graph-model.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
