> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualclash.space/llms.txt
> Use this file to discover all available pages before exploring further.

# System Architecture

> How V3 contracts, Ponder, Postgres, storage, RPC, and the Next.js application divide authority.

DualClash V3 separates financial authority, public indexing, readable content, and wallet interaction so each layer has a narrow responsibility.

<Info>
  **Current scope:** Tomborg V3 on GIWA Sepolia, chain ID `91342`. Tomborg is the repository and protocol name; DualClash is the product name.
</Info>

## System context

```mermaid theme={null}
flowchart TD
    U["Wallet and browser"] -->|"Signed transactions and direct reads"| R["GIWA RPC and V3 contracts"]
    R -->|"Events"| I["Ponder indexer"]
    I --> P["Supabase Postgres"]
    W["Next.js web and API"] --> P
    W --> R
    U --> W
    W --> S["Supabase Storage"]
```

## Sources of truth

| Concern                                                            | Authority                                                         |
| ------------------------------------------------------------------ | ----------------------------------------------------------------- |
| Reserves, settlement, supply, ownership, stake, votes, and rewards | Contracts and reserve tokens                                      |
| Topic publication                                                  | `DebateTopicFactoryV3.TopicCreated`                               |
| Argument publication                                               | `TopicMarketBaseV3.PostCreated`                                   |
| Content pointer                                                    | URI stored onchain                                                |
| Readable MVP content                                               | `public.topics` and `public.comments` resolving `tomborg://` URIs |
| Public history and charts                                          | Rebuildable Ponder projections                                    |
| Current wallet-sensitive values                                    | Direct contract reads                                             |
