▸ Architecture

Data Flow

Overview

This document maps the data flows through the INCOG AI protocol system — what information is created, where it flows, who observes it at each point, and what privacy properties are maintained at each stage. Understanding data flows is essential for evaluating the system's privacy claims, identifying residual leakage, and reasoning about the effects of component failures.


Browsing Session Data Flow

Session Initialization

User opens INCOG Browser
    │
    ▼
Browser generates session-scoped fingerprint normalization seed
  [Seed is random, not derived from any persistent identifier]
  [Seed is stored in volatile memory only]
    │
    ▼
Browser initializes isolated storage context for session
  [No persistent state carried from prior sessions]
  [No shared state with other active tabs]
    │
    ▼
Relay client connects to relay network
  [Fetches relay directory update if stale]
  [Directory fetch routed through privacy-preserving channel]
    │
    ▼
Pre-builds relay circuits (3-hop) for immediate use
  [Circuit construction visible to: E (entry node), M (middle), X (exit)]
  [Entry sees: client IP, M's address]
  [Middle sees: E, X addresses]
  [Exit sees: M's address]
  [No node sees full path]
    │
    ▼
Session ready for user interaction

Page Load Data Flow

User navigates to URL
    │
    ▼
Browser DNS resolution
  [DNS query sent via DoH to configured resolver]
  [ISP does not observe DNS query]
  [DoH resolver observes query: destination domain]
    │
    ▼
Browser requests resource through relay circuit
  [Request encrypted in 3 layers before leaving browser]
  [Entry node: decrypts outer layer → sees encrypted request + M address]
  [Middle node: decrypts middle layer → sees encrypted request + X address]
  [Exit node: decrypts inner layer → sees HTTP/S request + destination]
  [Exit node connects to destination on behalf of client]
    │
    ▼
Destination server receives HTTP/S request
  [Sees: exit node IP address, request headers (normalized)]
  [Does not see: client real IP]
    │
    ▼
Response returned through relay path
  [Encrypted by exit, middle, entry nodes before delivery to browser]
    │
    ▼
Browser receives response
    │
    ▼
JavaScript execution environment initialized for origin
  [Canvas/WebGL APIs return normalized values]
  [navigator.* APIs return normalized values]
  [Storage APIs scoped to isolated context]
    │
    ▼
Telemetry requests intercepted
  [Analytics, tracking, advertising requests identified and dropped]
  [No telemetry data leaves browser]
    │
    ▼
Page renders in isolated context

Session Termination Data Flow

User closes browser or ends session
    │
    ▼
Browser volatile state erased
  [Cookies cleared]
  [sessionStorage cleared]
  [In-memory session objects dereferenced and garbage collected]
  [Fingerprint normalization seed zeroed and regenerated]
    │
    ▼
Relay circuits gracefully torn down
  [DESTROY cells sent to entry nodes]
  [Circuit state cleared at all relay nodes]
    │
    ▼
Session keys zeroed at relay nodes
  [Forward secrecy guaranteed: no session data recoverable from future key compromise]
    │
    ▼
Next session starts from clean state

Relay Network Data Flow

Circuit Construction Flow

Browser Client
  │
  ├─── Selects entry node E from relay directory
  ├─── Selects middle node M (different AS from E)
  ├─── Selects exit node X (different AS from M, E)
  │
  ▼
Authenticated key exchange with E
  Client → E: ClientHello (client ephemeral public key)
  E → Client: ServerHello (E identity cert + E ephemeral public key)
  Client verifies E cert against directory
  Client derives K_E
  │
  ▼
EXTEND request to E
  Client → E: Encrypted(K_E, EXTEND{M_address, client_ephemeral_M})
  E → M: CREATE{client_ephemeral_M}
  M → E: CREATED{M_ephemeral_public_key}
  E → Client: Encrypted(K_E, EXTENDED{M_ephemeral_public_key})
  Client derives K_M
  │
  ▼
EXTEND2 request through circuit
  Client → E: Encrypted(K_E, Encrypted(K_M, EXTEND2{X_address, client_ephemeral_X}))
  E → M: Encrypted(K_M, EXTEND2{X_address, client_ephemeral_X})
  M → X: CREATE2{client_ephemeral_X}
  X → M: CREATED2{X_ephemeral_public_key}
  M → E: Encrypted(K_M, EXTENDED2{X_ephemeral_public_key})
  E → Client: Encrypted(K_E, Encrypted(K_M, EXTENDED2{X_ephemeral_public_key}))
  Client derives K_X
  │
  ▼
Circuit complete. Information known to each party:
  Client: K_E, K_M, K_X, full path
  E: Client IP, M address (not X or destination)
  M: E address, X address (not client or destination)
  X: M address (not E, client, or destination initially)

Traffic Flow Through Circuit

Client:
  Creates payload P for destination D
  Computes: C = Encrypt(K_E, Encrypt(K_M, Encrypt(K_X, P || relay_header{D})))
  Sends C to E in RELAY cells

Entry Node E:
  Receives RELAY cells from client
  Decrypts outer layer: C' = Decrypt(K_E, C) = Encrypt(K_M, Encrypt(K_X, P || relay_header))
  Validates auth tag for E's layer
  Determines next hop from relay_header (sees M address, not final destination)
  Forwards C' to M in RELAY cells

Middle Node M:
  Receives RELAY cells from E
  Decrypts middle layer: C'' = Decrypt(K_M, C') = Encrypt(K_X, P || relay_header)
  Validates auth tag for M's layer
  Determines next hop from relay_header (sees X address, not final destination)
  Forwards C'' to X in RELAY cells

Exit Node X:
  Receives RELAY cells from M
  Decrypts final layer: P_and_header = Decrypt(K_X, C'') = P || relay_header{D}
  Validates auth tag for X's layer
  Opens TCP connection to destination D
  Sends payload P to D

What each node observes in steady state:
  E: {client_IP, M_address, ciphertext, timing, volume}
  M: {E_address, X_address, ciphertext, timing, volume}
  X: {M_address, destination D, plaintext_payload, timing, volume}
  Destination D: {X_IP, request content}

Reward Verification Data Flow

Node N accumulates monthly relay activity
  │
  ▼
N's relay software generates attestation records:
  For each circuit interaction in period:
    AttestationRecord {
      node_id: N.public_key
      period: YYYY-MM
      peer_node_id: adjacent node's public key
      bytes_exchanged: u64
      circuit_count: u32
      timestamp: u64
      signature: Sign(N.private_key, above)
    }
  │
  ▼
N assembles monthly attestation bundle
  Includes own throughput attestation
  Includes references to peer attestations (obtained through peer exchange)
  Signs bundle with N.private_key
  │
  ▼
N submits attestation bundle to reward contract
  Contract verifies N.signature against registered N.public_key
  Contract checks peer attestation references for corroboration
  Contract calculates N's verified_throughput = min(self_reported, peer_corroborated)
  │
  ▼
Contract accumulates all nodes' verified_throughput for the period
  Calculates total_network_throughput
  Applies uptime_multiplier, geographic_multiplier, class_weight
  Calculates each node's reward_share
  │
  ▼
N claims reward
  Contract releases N's reward from relay incentive pool
  Transfer recorded on-chain

Wallet Transaction Data Flow

User initiates transaction in INCOG Wallet
  │
  ▼
Wallet derives fresh address for transaction
  HD derivation: m / purpose' / coin' / account' / context' / new_index
  address = derive(HD_path, master_seed)
  index incremented in wallet state
  │
  ▼
Transaction constructed locally
  Inputs selected from UTXO set (respecting context isolation)
  Change output directed to freshly derived change address
  Fee estimated from local block data
  Transaction serialized in memory
  │
  ▼
Transaction signed locally
  Private key derived for each input address: ephemeral, used once
  Signing performed in browser sandbox (key not accessible to web content)
  Signed transaction serialized
  │
  ▼
Signed transaction routed through relay for broadcast
  Relay circuit established (if not already active)
  Signed transaction transmitted through relay to blockchain peer
  Peer receives transaction — sees exit node IP, not user IP
  Transaction broadcast to blockchain network
  │
  ▼
Transaction confirmed on-chain
  Browser monitors for confirmation via relay-routed RPC queries
  Wallet state updated with confirmed transaction
  Used address marked spent in UTXO set

Information Minimization Summary

The following table summarizes what information is observable at each system boundary:

ObserverWhat They SeeWhat They Don't See
ISPEncrypted traffic to relay entry nodeDestinations, content, DNS queries
Entry relay nodeClient IP, encrypted payload, timingDestination, content, full path
Middle relay nodeAdjacent IPs, encrypted payloadClient IP, destination, content
Exit relay nodeDestination, decrypted payloadClient IP, full routing path
Destination serverExit IP, request contentClient IP
DNS resolver (DoH)Domain being resolvedClient behavior beyond query
Relay directoryIPs of directory-querying clientsWhich nodes are being queried
Reward contractSigned attestation bundlesTraffic content, routing details
INCOG AI (operator)Relay directory statistics, aggregate network healthIndividual user traffic, identities
Incog SwapIncog Swap

Incog Swap is a non-custodial aggregation platform. Users maintain full control of their assets at all times. Incog Swap does not hold funds, store private keys, or require seed phrases.

Product

  • Swap
  • Status
  • Architecture
  • Docs
  • Help Center

Privacy

  • No KYC
  • No Account
  • Zero Custody
  • No Seed Phrase

Providers

  • LetsExchange
  • FixedFloat
  • SideShift
  • + 4 more

© 2026 Incog Swap · incogswap.org · Private Routes. Better Rates.

support@incogswap.org · ▸ session encrypted