Back to Terminal
System Architecture Map

QuantMesh x402 Architecture

Decentralized Multi-Agent Pipeline with HTTP 402 Algorand Micropayment Settlement

End-to-End System Execution Flow

01

Frontend Request

Client selects token (ALGO, BTC, ETH) and sends initial POST request to Hono orchestrator.

POST /api/v1/orchestrate
02

Pre-Execution

Orchestrator runs Workers A, B, C in parallel, then passes scores to Fusion Agent D.

Zero-Fee Guarantee
03

x402 Micropayment

Server returns HTTP 402 challenge. Lute Wallet signs $0.007 ALGO/USDC transaction.

HTTP 402 Payment Required
04

On-Chain Receipt

Payment verified on Algorand. SHA-256 Cryptographic Attestation Digest issued.

SHA-256 Attestation Digest

Central Hono Orchestrator

  • Pre-execution pipeline: Verifies all worker nodes before issuing payment challenge.
  • x402 Protocol: Native AVM scheme integration with HTTP 402 challenge negotiation.
  • Rate Limiting: In-memory window rate limiter protecting against API spam.

Sub-Agent Network

  • Worker A (Sentiment): FastAPI + FinBERT NLP scoring crypto financial text.
  • Worker B (On-Chain): CoinGecko market volume & whale net inflow heuristics.
  • Worker C (TA): RSI, SMA, EMA, MACD algorithmic indicator calculations.
  • Worker D (Fusion): Transparent weighted composite scoring algorithm.

Cryptographic Signal Attestation Digest

Every fused market signal produces a deterministic 256-bit cryptographic SHA-256 hash anchored to the Algorand Testnet payment transaction ID. The PyTeal ARC-4 smart contract (`contracts/signal_attestation.py`) is prepared for mainnet Box Storage deployment:

Key: tokenSymbol + "_" + paymentTxId
Value: compositeScore (8 bytes) + timestamp (8 bytes) + paymentTxId
Hash: SHA-256(tokenSymbol:compositeScore:verdict:paymentTxId:timestamp)