Docs

Technical specification for protocol implementers, engineers, and auditors. For the mission statement, see the HarmonicTruthProtocol.md

1. Data Format

TruthCertificate Schema (target format)

{
  "asset": "BTC/USD",
  "consensus_price": 67234.50,
  "sources": 5,
  "agreement": "4/5",
  "merkle_root": "0xabc...def",
  "timestamp": "2026-05-23T10:30:00Z",
  "confidence": 0.98
}

AudioParameters Schema

{
  "base_frequency": 432,
  "modulation": 12.5,
  "tempo_bpm": 120,
  "amplitude": 0.75,
  "waveform": "sine"
}

2. API Endpoints

REST Endpoints

POST /v1/truth
  → Submit market data for verification

GET  /v1/verify/:hash
  → Verify a truth certificate by hash

WS   /v1/stream
  → Real-time WebSocket audio stream

3. Verification & Data Integrity

Current Implementation

Source:        one public exchange spot feed
Normalisation: deterministic volatility index
Mapping:       same input always produces identical output
Recording:     optional, non-payable, no protocol fee

Roadmap (not yet implemented)

Majority requirement: 2/3 sources
Price deviation tolerance: 0.1%
Merkle root: SHA-256 of ordered prices
Signature: Ed25519 per source
Staleness: max 5 seconds

4. Audio Mapping

Harmonic Translation Parameters

Base frequency:  configurable (default 432 Hz; supports 440 Hz, adaptive)
Frequency range: 200 – 800 Hz
Mapping:         f = base_freq + (volatility_index * scale_factor)
Tempo range:     60 – 180 BPM  →  tempo_bpm = 60 + (momentum * 40)
Amplitude:       0.0 – 1.0     →  amplitude = normalized_volume * gain
Deterministic:   same input always produces identical output

Market State → Sensory Mapping

Volatility  → Frequency modulation
Momentum    → Tempo (BPM)
Volume      → Amplitude
Risk        → Dissonance level
Health      → Haptic intensity

5. Avalanche Integration

Smart Contract

contract HONESTVerifier {
  event MomentRecorded(
    string timestampHash,
    string colorHex,
    string blochCoords
  );

  function recordMoment(
    string _timestampHash,
    string _colorHex,
    string _blochCoords
  ) external;  // non-payable
}

Cost

recordMoment():  network gas only (no protocol fee)
Chain:           Avalanche C-Chain mainnet (chainId 43114)
Recording:       optional — one transaction per Market Moment
base44
Edit with Base44