> For the complete documentation index, see [llms.txt](https://zardoz.gitbook.io/zardoz-docs-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zardoz.gitbook.io/zardoz-docs-1/how-zardoz-works.md).

# How Zardoz works

## How Zardoz works

Zardoz sits on top of Robinhood Chain DeFi: Uniswap V3 for trading and LP, multiple third-party launchpads for token creation, and a unified UI for discovery, execution, and fee management.

### Architecture at a glance

```
┌─────────────────────────────────────────────────────────────┐
│                      zardoz.fun (Next.js)                    │
│  Discover · Token pages · Launch · Farm · Portfolio · APIs │
└──────────────┬──────────────────────────────┬───────────────┘
               │                              │
     ┌─────────▼─────────┐          ┌─────────▼─────────┐
     │  On-chain (4663)   │          │  External feeds    │
     │  Instant factory   │          │  DexScreener       │
     │  LaunchFeeRouter   │          │  GeckoTerminal     │
     │  Uniswap V3        │          │  Blockscout        │
     │  External pad txs  │          │  Pad indexers      │
     └────────────────────┘          └────────────────────┘
```

### Data flow — Discover

1. **On-chain indexer** scans Instant factory `TokenCreated` logs and known external pad factories (`lib/data/zardoz-index.ts`, `lib/launchpads.ts`).
2. **Pad APIs & DEX aggregators** enrich cards with mcap, liquidity, volume, logo, and price (`lib/data/discover.ts`).
3. **Client refresh** fills gaps for newly launched Zardoz tokens while enrichment catches up (DexScreener pass on load).

Cards show **real data only** — no placeholder names, tickers, or painted metrics while loading.

### Data flow — Token page

| Panel           | Source                                                    |
| --------------- | --------------------------------------------------------- |
| Chart (Pro)     | GeckoTerminal embed — MCAP axis, resolutions including 1s |
| Chart (Lite)    | `/api/candles` + `/api/trades`                            |
| Trades tape     | `/api/trades` (pair hint optional)                        |
| Holders         | `/api/holders` (Blockscout proxy)                         |
| Trade execution | Uniswap V3 SwapRouter02 on-chain                          |
| Bundle rows     | Local vault wallets + live balance refresh                |

### Launch paths

#### Zardoz Instant

One factory call deploys:

* ERC-20 with bound metadata + logo URI
* Uniswap V3 single-sided WETH pool at chosen fee tier
* LP position NFT locked in Instant locker (not withdrawable by creator)

Trading is live from block 1. Creator claims swap fees via locker `collectAndClaim`.

#### External pads (passthrough)

Zardoz builds the transaction; the **target pad’s contracts** own authorization, bonding rules, and fee logic. All paths still pay the **0.002 ETH Zardoz platform fee** via `LaunchFeeRouter` (Klik uses a separate fee-settle tx to preserve vanity `msg.sender`).

Pads include NOXA, Flap, Bankr/Doppler, trench.today, Bags, Klik, and others listed in External launchpads.

### Fee layers

| Fee type                   | Who gets it                       | Where to claim                          |
| -------------------------- | --------------------------------- | --------------------------------------- |
| Zardoz platform launch fee | Protocol + referrer (50/50 split) | Ref dashboard / router `claim()`        |
| Uniswap V3 LP swap fees    | LP position owner                 | Farm → My Positions                     |
| Instant creator fees       | Fee recipient on token            | Portfolio / Farm → Launch fees          |
| External pad fees          | Per pad rules                     | Pad site or Portfolio launch-fees panel |

### Wallet model

Three distinct wallet concepts — see Wallets:

1. **Connected wallet** — signs main trades (browser or Google Zardoz wallet)
2. **Trading wallets** — device-local vault keys for bundles
3. **Watched wallets** — read-only tracking on `/watch`

### For builders

* **HTTP APIs:** Full reference — public read routes, no API key
* **Indexer brief:** Indexer integration — `TokenCreated` topic0, factory addresses, JSON feed
* **OpenAPI:** `zardoz-api` spec in GitBook + `docs/openapi/zardoz-api.yaml`

Next: Page map · HTTP APIs · Instant contracts


---

# 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://zardoz.gitbook.io/zardoz-docs-1/how-zardoz-works.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.
