Overview
KayakNet is built as a layered system, with each layer providing specific functionality.
High-Level Architecture
┌─────────────────────────────────────────────────────────────┐
│ User Applications │
│ (Browser, CLI, Android App) │
├─────────────────────────────────────────────────────────────┤
│ HTTP/SOCKS Proxy │
├──────────────┬──────────────┬──────────────┬────────────────┤
│ Chat │ Marketplace │ Domains │ Escrow │
├──────────────┴──────────────┴──────────────┴────────────────┤
│ PubSub Layer │
├─────────────────────────────────────────────────────────────┤
│ Onion Routing Layer │
├─────────────────────────────────────────────────────────────┤
│ DHT & Peer Discovery │
├─────────────────────────────────────────────────────────────┤
│ Security Layer │
│ (PoW, Rate Limiting, Peer Scoring) │
├─────────────────────────────────────────────────────────────┤
│ Transport Layer │
│ (TCP/QUIC with TLS 1.3) │
└─────────────────────────────────────────────────────────────┘Core Components
1. Transport Layer
Encrypted connections between peers
Support for TCP and QUIC protocols
TLS 1.3 with certificate pinning
2. Security Layer
Proof-of-Work for Sybil resistance
Rate limiting to prevent abuse
Peer scoring and ban lists
Nonce tracking for replay protection
3. DHT (Distributed Hash Table)
Kademlia-based peer discovery
Decentralized data storage
Self-healing network topology
4. Onion Routing
3-hop encrypted circuits
Traffic analysis resistance
Padding and timing obfuscation
5. PubSub Layer
Topic-based message routing
Efficient multicast delivery
Message deduplication
6. Application Services
Chat: E2E encrypted messaging
Marketplace: Listings and orders
Domains: .kyk naming system
Escrow: Cryptocurrency payments
Data Flow
Sending a Message
Network Discovery
Key Design Decisions
Why Go?
Single binary deployment
Cross-platform compilation
Excellent concurrency model
Strong standard library
Why Not Tor?
Full control over privacy features
Integrated services (chat, marketplace)
Simpler deployment
Custom traffic analysis resistance
Why Monero/Zcash?
Privacy by default
Shielded transactions
No blockchain analysis possible
Community trust
Component Interaction
Persistence
All data is persisted locally:
Identity keys (never leave device)
Chat history (encrypted)
Marketplace data
Escrow records
Domain registrations
Scalability
Horizontal: Add more nodes
Vertical: Increase per-node capacity
DHT: Scales logarithmically with nodes
PubSub: Efficient multicast reduces load
Last updated

