mercy-wallet

byKing David

Good catch—those are exactly the gaps that break real products. Here’s a re-built, deeper blueprint with identity, registration, supernode economics, and swap monetization fully defined. --- 🚀 PRODUCT: GhostLink Mesh Wallet (v2 Blueprint) > Private P2P communication + self-custody wallet + revenue-generating network Built on libp2p --- 🧠 1. IDENTITY + REGISTRATION SYSTEM (NO PHONE / EMAIL) 🔑 Core Principle User identity = cryptographic identity, not account --- 🧱 Identity Stack Each user has: Master Seed (12/24 words) ↓ Identity Keypair (for chat) ↓ Wallet Keypairs (multi-chain) --- 📛 User ID Design You need 3 layers of identity: 1. Peer ID (network identity) PeerID = hash(public_key) Used internally in network Not human-friendly --- 2. Username (human-readable) Optional but important Example: @rahul.trade --- 3. Wallet Address Used for transactions --- 📝 Registration Flow (Phase 1 onboarding) Install app ↓ Generate seed phrase ↓ Derive: - PeerID - Wallet addresses ↓ User sets username (optional) ↓ Ready --- 🔐 Username System (important decision) Option A (recommended early): Lightweight central mapping server username → PeerID Option B (later scale): Store mapping on DHT (libp2p) --- 🔒 Recovery System Must include: Seed phrase backup Optional: social recovery encrypted cloud backup (paid) --- 🌐 2. NETWORK + SUPERNODE SYSTEM (DEEP) 🧱 Node Types Type Role Normal Node basic messaging Supernode routing + caching Core Node bootstrap + fallback --- ⚡ Supernode Activation User enables: Settings → Enable Supernode Mode --- 📊 Supernode Scoring Engine score = (uptime × 0.35) + (bandwidth × 0.25) + (success_rate × 0.25) + (latency × 0.15) --- 🏆 Promotion Threshold if score > 75: eligible for supernode --- 🔄 Traffic Routing Logic Direct P2P ↓ Supernode relay ↓ Core relay (last fallback) --- 📦 Supernode Responsibilities 1. Message Relay Forward encrypted packets 2. Store & Forward Cache messages (TTL: 24–48h) 3. File Distribution Host file chunks temporarily 4. DHT Boosting Faster peer discovery --- 🔐 Security Model Zero access to plaintext Multi-path routing (avoid single point) Reputation penalties --- 💰 3. SUPERNODE ECONOMICS (VERY IMPORTANT) 🧠 Goal Incentivize without overpaying --- 💸 Earnings Formula earnings = (GB_relayed × rate_per_GB) + (uptime_bonus) + (reliability_bonus) --- 📊 Example Rates Metric Value Per GB relay ₹2 – ₹10 Uptime bonus ₹50–₹300/month Reliability bonus dynamic --- 🧾 Payment Source Comes from: swap fees premium users network usage fees --- 🎮 Additional Incentives Priority routing Premium badge Higher transaction speed --- ⚠️ Cost Control (critical) max_payout_per_user < revenue_per_user --- 💸 4. YOUR REVENUE MODEL (DEEP) 🥇 1. Swap Fees (primary) How it works: You integrate: 1inch Uniswap --- 🔄 Swap Flow (technical) User selects token pair ↓ App requests route from aggregator ↓ Aggregator returns best path ↓ You add fee layer ↓ User signs transaction ↓ Transaction sent to blockchain --- 💰 Fee Injection Methods Method A: Spread Fee Slightly adjust output amount --- Method B: Explicit Fee User sees: Swap fee = 0.5% --- Recommended: 0.3% – 0.8% --- 📊 Revenue Example Users Avg swaps/day Fee Monthly Revenue 10K 1 0.5% ₹5L–₹20L --- ⚡ 2. Network Premium Users pay for: faster routing better supernode access --- 🏢 3. Private Mesh Networks Paid private communities Subscription model --- 📡 4. Supernode Commission Take: 10% – 20% cut from supernode earnings --- 🔄 5. SWAP ENGINE (DEEP TECH) 🔗 Aggregator Role Platforms like 1inch: Find best price across DEXs Reduce slippage --- ⚙️ Execution Steps 1. Fetch quote 2. Build transaction 3. Inject fee 4. Sign locally 5. Broadcast --- ⛽ Gas Handling Options: User pays gas Or: gas abstraction (future feature) --- 🔐 Security No custody All swaps signed by user --- 📱 6. USER FLOW (END-TO-END) New User Install app ↓ Generate wallet + PeerID ↓ Set username ↓ Start chatting --- Daily Usage Chat (P2P) Send crypto Swap tokens --- Power User Enable supernode Earn rewards --- 🏗️ 7. INFRASTRUCTURE (COST-OPTIMIZED) You run: Bootstrap Nodes (2–5) discovery only --- Core Relays (3–10) fallback --- Notification Bridge minimal --- Cost Strategy Shift 70–90% traffic → supernodes --- 🔐 8. RISK MANAGEMENT Biggest Risks 1. Key loss → Solution: recovery system --- 2. Low liquidity (swaps) → Solution: aggregator integration --- 3. Supernode abuse → Solution: scoring + penalties --- 4. UX complexity → Solution: simplify flows --- 📈 9. SCALING MODEL Phase 1 (0–10K users) infra-heavy no supernode reliance --- Phase 2 (10K–100K) introduce supernodes reduce cost --- Phase 3 (100K+) self-sustaining network profit scaling --- 🧠 FINAL CLARITY This system works because: Chat = user acquisition Wallet = user ownership Swap = revenue engine Supernodes = cost reducer --- 🚀 If you want next level I can go even deeper into: 👉 Exact swap fee injection code logic 👉 Supernode reward math simulation (profit safe) 👉 Full database schema + APIs 👉 UX flow that makes this beginner-friendly Just say: “Simulate profit model with real numbers” or “Design backend APIs + schema”

LandingLoginChat
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

Mercy-Wallet System Requirements Document

1. Introduction

The Mercy-Wallet project aims to create a secure, private, and self-custody wallet system that integrates a revenue-generating network. This document outlines the system requirements for the Mercy-Wallet, incorporating the GhostLink Mesh Wallet v2 blueprint, which includes a cryptographic identity/registration system, supernode architecture with scoring/economics, a swap engine with fee injection, and a phased scaling model with a full revenue framework.

2. System Overview

Mercy-Wallet is designed to provide users with a private peer-to-peer communication platform combined with a self-custody wallet. The system is built on libp2p, ensuring secure and decentralized communication. Key features include a cryptographic identity system, supernode architecture for efficient network management, a swap engine for token exchanges, and a comprehensive revenue model to sustain the network.

Page 2 of 5

3. Functional Requirements

  • As a User, I should be able to register using a cryptographic identity without phone or email.
  • As a User, I should be able to generate a master seed phrase for identity and wallet keypairs.
  • As a User, I should be able to set an optional username for human-readable identification.
  • As a User, I should be able to enable supernode mode for enhanced network participation.
  • As a User, I should be able to perform token swaps with integrated fee injection.
  • As a User, I should be able to recover my account using a seed phrase backup or optional social recovery.
  • As a Supernode, I should be able to relay messages, cache data, and boost peer discovery.
  • As an Admin, I should be able to manage supernode scoring and economics to incentivize network participation.

4. User Personas

  • User: Regular users who utilize the wallet for transactions and communication.
  • Supernode: Advanced users who enable supernode mode to support network operations and earn rewards.
  • Admin: System administrators who manage network operations, supernode scoring, and economic incentives.
Page 3 of 5

5. Visuals Colors and Theme

  • primary: #1A237E (Deep Indigo)
  • primary_light: #534BAE (Light Indigo)
  • secondary: #FF7043 (Coral)
  • accent: #FFEB3B (Vibrant Yellow)
  • highlight: #FFC107 (Amber)
  • bg: #F5F5F5 (Light Gray)
  • surface: rgba(255, 255, 255, 0.8) (White)
  • text: #212121 (Dark Gray)
  • text_muted: #757575 (Muted Gray)
  • border: rgba(0, 0, 0, 0.1) (Subtle Black)

6. Signature Design Concept

The Mercy-Wallet homepage will feature an interactive galaxy map where each star represents a feature or section of the wallet. Users can click on a star to open a task card, drag to rotate the cluster, and hover to highlight connections between features. This concept will be brought to life using @react-three/fiber for 3D rendering and gsap for smooth animations and transitions. The galaxy map will provide an engaging and intuitive way for users to explore the wallet's capabilities.

Page 4 of 5

7. Interaction Model & Motion Direction

The landing page will utilize a "parallax" interaction model, creating a layered depth effect as users scroll. Decorative layers, such as atmospheric blobs and distant shapes, will translate at different speeds, while real content scrolls naturally. This approach is ideal for creating a visually rich first impression and storytelling experience. Internal pages, such as the dashboard and settings, will adopt a "static" model for clarity and readability.

8. Non-Functional Requirements

  • The system must ensure data privacy and security through cryptographic methods.
  • The network should maintain high availability and reliability, with minimal downtime.
  • The user interface should be intuitive and responsive across devices.
  • The system should support scalability to accommodate growing user numbers.

9. Tech Stack

  • Frontend: React for Web
  • Backend: Python, FastAPI
  • Database: MySQL or MariaDB, with alembic for migrations
  • AI Models: GPT 5.4 for user-friendly responses
  • AI Tools: Litellm for LLM Routing
  • Local Orchestration: Docker, docker-compose
  • Server-side Orchestration: Kubernetes
Page 5 of 5

10. Assumptions and Constraints

  • The system assumes users have basic knowledge of cryptocurrency and wallet operations.
  • The network relies on supernodes for efficient operation and cost reduction.
  • The system must comply with local regulations regarding cryptocurrency transactions.

11. Glossary

  • Cryptographic Identity: A digital identity verified through cryptographic methods.
  • Supernode: A node with enhanced capabilities for network support and management.
  • Swap Engine: A system component that facilitates token exchanges with fee injection.
  • Libp2p: A modular network stack for peer-to-peer applications.

This document provides a comprehensive overview of the Mercy-Wallet project, incorporating the GhostLink Mesh Wallet v2 blueprint to ensure a robust, secure, and scalable system.

Landing design preview
Landing: View Galaxy Map
Login: Sign In
Admin Dashboard: View Network Stats
Supernodes: View All Nodes
Supernodes: Manage Scoring
Supernodes: Adjust Thresholds
Economics: View Revenue
Economics: Configure Fee Rates
Economics: Manage Payouts
Users: View Registrations
Users: Monitor Activity
Network: View Routing Logs
Network: Manage Core Nodes