Skip to content

IFM Protocol Documentation ​

Internet Frequency Modulation — An open, decentralized communication protocol for peer-to-peer broadcast over a distributed mesh network.


SectionDescription
ArchitectureSystem architecture, layer model, and design principles
Protocol SpecificationWire protocol, packet formats, and message types
Station Discovery & Relay ProtocolStation/relay discovery, signed records, presence, relay selection
Frequency ModelFrequency naming, types, and resolution
Packet FormatBinary packet structure, payload types, and serialization
Identity & CryptoEd25519 identity, encryption, and authentication
Transport & DiscoveryQUIC, WebRTC, Kademlia DHT, and peer discovery
RendezvousHeadless peer-discovery service — build, run, deploy
Audio & VoiceModular audio pipeline architecture, Opus codec, streaming, and voice
Plugin SystemPlugin architecture and JavaScript SDK integration
SDK ReferenceJavaScript/TypeScript SDK API
CLI ReferenceCommand-line interface commands
DeploymentRunning nodes, bootstrap peers, and production setup
DemosPublic demos: Station System, Relay Station, Radio Listener
Developer ToolsNode UI (TUI), CLI, SDK — for developers and operators
Future DevelopmentLong-term economic vision, relay tiers, phased rollout
DistributionPackaging, release channels, and build pipeline for all IFM products

Vision ​

IFM (Internet Frequency Modulation) creates virtual broadcast frequencies over a distributed mesh network. Inspired by FM radio:

  • Anyone can transmit — no central authority
  • Anyone can listen — open participation
  • Nobody owns the spectrum — decentralized by design
  • Communication is peer-to-peer — no servers required
  • The network has no central authority — resilient and censorship-resistant

Instead of Connect(server), users simply Tune(91.700).


Design Principles ​

  1. No Central Servers — Every participant is a peer; network survives mass peer loss
  2. Open Protocol — Public spec, no patents, no vendor lock-in
  3. Portable — Runs on Raspberry Pi, laptop, phone, USB stick, IoT, browser (WASM)
  4. Stateless Communication — No accounts, emails, or passwords; identity is cryptographic
  5. Radio Metaphor — Intuitive frequency tuning replaces connection-oriented paradigms

Architecture Overview ​


Repository Structure ​

ifm/
├── Cargo.toml
├── package.json
├── crates/
│   ├── core/          # Main API (Node, tune, broadcast)
│   ├── protocol/      # Packet, Frequency, Header, Serialization
│   ├── crypto/        # Ed25519, Noise, AES-GCM, ChaCha20, BLAKE3
│   ├── packet/        # Packet encoding/decoding
│   ├── frequency/     # Frequency model, resolution, types
│   ├── discovery/     # Kademlia, Bootstrap, Peer Discovery
│   ├── gossip/        # Packet cache, TTL, Duplicate removal, Forwarding
│   ├── transport/     # QUIC, WebRTC, TCP fallback
│   ├── audio/         # Opus, Microphone, Playback, Streaming
│   ├── storage/       # Identity, Config, Cache, Logs, Plugins
│   ├── node/          # High-level node orchestration
│   └── ffi/           # N-API / WASM bindings
├── packages/
│   ├── sdk/           # @ifm/sdk JavaScript/TypeScript package
│   ├── cli/           # ifm CLI tool
│   └── examples/      # Three demo apps: station/, relay/, listener/
└── docs/              # This documentation

Quick Start ​

JavaScript/TypeScript ​

typescript
import { IFM } from "@ifm/sdk"

const radio = await IFM.create()
await radio.tune("91.700")

radio.on("message", console.log)
await radio.broadcast("Hello, IFM!")

Rust ​

rust
let node = Node::new();
node.connect()?;
node.tune("91.700")?;
node.broadcast("Hello, IFM!")?;

CLI ​

bash
ifm init
ifm connect
ifm tune 91.700
ifm broadcast "Hello, IFM!"

Frequency Examples ​

Human FrequencyTypeDescription
91.700PublicOpen broadcast frequency
chat.generalPublicText chat channel
music.lofiPublicMusic streaming
private.teamProtectedEncrypted, shared key required
team.alphaHiddenNot advertised, invitation only
sensor.temperaturePublicIoT telemetry

Performance Goals ​

MetricTarget
Startup< 500 ms
Memory (idle)< 64 MB
Voice Latency< 100 ms
Connections100–500 peers
Binary Size (optimized)< 30 MB

Roadmap ​

  • Phase 1 — Core Networking (Rust workspace, libp2p, QUIC, Kademlia, GossipSub, CLI)
  • Phase 2 — SDK (N-API bindings, @ifm/sdk, Bun/Node, Event-driven API)
  • Phase 3 — Real-Time Media (Opus voice, Presence, Frequency scanning, Encrypted frequencies)
  • Phase 4 — Ecosystem (WASM, Browser, Plugin system, React, Tauri, Mobile)

Future Development & Tokenomics ​

⚠️ Future Plan — Not Implemented

This section describes a long-term economic vision for the IFM network. No token exists today. No rewards are being distributed. The protocol is and will remain free and open. This is a research direction for post-mainnet sustainability.

The Core Insight: Listeners as Infrastructure ​

Traditional broadcast: more listeners = higher cost (CDN, bandwidth, servers).

IFM inverts this: more listeners = more relays = stronger network.

Every client that tunes in can optionally become a micro-relay, forwarding packets to nearby peers. The audience becomes the distribution infrastructure — similar to how BitTorrent turns downloaders into uploaders, but for real-time radio.

Why Not "Listen-to-Earn"? ​

Paying tokens merely for listening creates a Sybil attack vector:

This pattern has broken many "X-to-Earn" models (Move-to-Earn, Watch-to-Earn, Learn-to-Earn). Listening is not scarce; bandwidth relaying is.

What Has Value: Relay Work ​

The network should reward verified contribution to packet delivery:

MetricWhy It Matters
Bytes RelayedActual bandwidth contributed
Unique Peers ServedDiversity of reach (anti-Sybil)
UptimeReliability
Geographic CoverageMesh resilience (measured via latency hints)
Latency / JitterQuality of service

A node that relays 20 GB to 400 peers earns significantly more than one relaying 200 MB to 12 peers.

Relay Tiers (Progressive Commitment) ​

All tiers run the same software — no separate binaries.

TierNameRequirementsRewards
0ListenerNoneNone (just listen)
1Community RelayOpt-in, ≤5% CPU, ≤X GB/moSmall
2Verified RelayStake + uptime SLAMedium
3Backbone RelayDatacenter/ISP, high bandwidthLarge

Users choose their tier. Default = Tier 0 (listen only).

Phased Rollout ​

PhaseFocusToken?
1Core Protocol (current)❌ No
2Relay Scoring & Metrics❌ No — observability only
3Opt-in Listener Relays❌ No — reputation scores
4Distribution Marketplace⚠️ Credits (stable, non-speculative)
5IFM Token (if needed)❓ Only if marketplace demands it

Phase 1–3 require no token. The protocol works purely on reputation and reciprocal peering (Tit-for-Tat). A token is only introduced if a genuine marketplace for bandwidth credits emerges organically.

Distribution Marketplace (Phase 4+) ​

Instead of inflationary rewards, broadcasters buy distribution credits:

  • Credits are stable (pegged to bandwidth cost, not speculative)
  • No pre-mine, no ICO — credits minted when broadcasters deposit
  • Relays cash out — credits → stablecoin / fiat via exchange

This aligns incentives: broadcasters pay for reach; relays earn for delivery. No "yield farming" on listening.

The Endgame: BitTorrent for Live Radio ​

If this works, IFM becomes a self-scaling broadcast primitive:

The network gets stronger the more popular it gets. That property — more than any token — is the economic moat.

Distribution ​

DocumentDescription
OverviewDistribution philosophy, product matrix, and release cadence
PackagingBinary formats, installers, containers, and platform packages
ChannelsRelease channels (stable/beta/nightly), versioning, and promotion
Build PipelineCI/CD, cross-compilation, signing, attestation, and publishing

Quick Start ​

bash
# Install latest stable CLI
curl -fsSL https://ifm.sh/install.sh | bash

# Or via package managers
brew install ifm              # macOS
winget install IFM.IFM        # Windows
apt install ifm               # Debian/Ubuntu (via repo)
pacman -S ifm                # Arch Linux
cargo install ifm-cli        # Rust developers
bun add @ifm/sdk             # JS/TS developers

Open protocol. No patents. No vendor lock-in. Anyone can build clients, hardware, libraries, or extend the protocol.

Released under the MIT License.