SOLAIR NOTES
Engineering notes, architectural decisions, and protocol specifications from building the first on-chain radio on Solana.
[01 // LATENCY BENCHMARKS]
Under 180ms: Overcoming WebRTC Mesh Concurrency
Standard WebRTC mesh networks degrade rapidly beyond 6 peers due to CPU starvation and N(N-1) uplink saturation. SolAir resolves this with a publisher-listener topology backed by dual STUN/TURN traversal.
Pre-Warmed ICE Candidate Pool (Size 10)
By pre-warming 10 ICE candidate pairs prior to room entry, SolAir cuts peer negotiation latency from 2,400ms down to under 180ms upon station tuning.
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun.cloudflare.com:3478' },
{ urls: 'turn:openrelay.metered.ca:443?transport=tcp' }
],
iceCandidatePoolSize: 10
};
Opus 48kHz Stereo Optimization
We enforce 48kHz sampling rates with dynamic forward error correction (FEC) and DTX (Discontinuous Transmission). When a host stops speaking, bandwidth drops to near 0 kbps automatically.
[02 // LIQUIDITY CONSOLE]
Isolating Audio Threads from High-Frequency DEX Feeds
Frequent DOM manipulation from live trading tickers often introduces audio jitter in single-threaded browser environments. SolAir decouples data polling from the Web Audio context.
Asynchronous Web Worker Polling
Liquidity pool depth, 24h volume, and Jupiter quotes are fetched inside independent Web Workers every 10 seconds. Even when processing heavy token swap state changes, audio buffers remain 100% uninterrupted.
Direct Jupiter Aggregator Integration
Transactions are constructed directly against Jupiter v6 routing APIs and broadcast via private Solana RPC nodes, ensuring ultra-low transaction landing latency without audio disconnection.
[03 // CRYPTOGRAPHIC ATTENDANCE]
Proof-of-Listen: Zero-Friction Gasless Verification
Standard smart contract transactions require 0.00025 SOL per claim. Over thousands of listeners, fee friction kills participation. SolAir uses client-side SHA-256 session proofs verified via Ed25519 wallet signing.
Client-Side Session Hashing
The browser Web Crypto API generates a SHA-256 hash using the station frequency, host public key, start timestamp, and verified elapsed listen duration.
Ed25519 Message Authentication
The listener wallet signs the session proof with Ed25519 curve signing. No transaction fee is charged to the wallet, making attendance claiming 100% gasless.
State Synchronization
Badges persist in local state (`trench_proof_of_listen_badges`) and sync asynchronously with on-chain Merkle trees, ensuring immediate UI feedback without blocking.
[04 // AUDIO PSYCHOLOGY]
Analog Skeuomorphism: 92.1–107.9 FM & Generative Lo-Fi
Why an analog FM dial for crypto? Digital dead air feels cold and broken. SolAir synthesizes analog carrier frequencies and ambient lo-fi textures during speaker silences.
Ambient Lo-Fi Carrier Waves
When hosts pause speaking or change channels, our Web Audio API engine (`ambientLoFiEngine.js`) synthesizes warm analog tube carrier hum and subtle static, maintaining room presence.
Tactile Slider Detuning Audio
Dragging the FM dial slider creates authentic analog tuner resistance and micro-frequency crackle, providing instant sensory feedback as users scan between token frequencies.