# Architecture

Pumpkin is designed so that trading events and media events are first-class citizens of the same timeline. The system is organized into three layers, but the product behaves like a single surface.

{% @mermaid/diagram content="flowchart TB
subgraph media\["Media Layer"]
M((Media))
LR\[Live Rooms]
CH\[Chat + Bullet Trading Comments]
GF\[Gifts]
RP\[Recording + Replay]
M --- LR
M --- CH
M --- GF
M --- RP
end

subgraph trading\["Trading Layer"]
T((Trading))
SA\[Spot Aggregator]
ZE\[ZK Perps Engine]
RE\[Risk Engine + Account State]
T --- SA
T --- ZE
T --- RE
end

subgraph eco\["Ecosystem Layer"]
E((Ecosystem))
SE\[Pumpkin Seeds]
BC\[Builder Code: extra user-paid add-on]
RB\[Rebates: from trading fees]
VA\[Vaults: coming soon]
E --- SE
E --- BC
E --- RB
E --- VA
end

LR -->|trade intents| T
T -->|verified events| CH
T -->|markers| RP

E --> T
E --> M
" %}

#### Wallet and onboarding

Pumpkin uses [Privy](https://www.privy.io/) for login and wallet provisioning, supporting email/social login and mainstream external wallets (e.g., MetaMask, OKX Wallet). Privy-generated addresses are secured by Privy’s wallet infrastructure.


---

# 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.pumpkin.xyz/getting-started/architecture.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.
