Holepunch, backed by Tether with significant funding, is building something that challenges fundamental assumptions about how we build internet applications. Their Pear Runtime enables fully peer-to-peer applications with zero centralized infrastructure — no servers, no cloud providers, no single points of failure. CEO Mathias Buus claims “P2P apps will be essential in transitioning from Web 2.” Having spent time digging into their stack, I think this deserves a serious technical analysis.
The Pear Runtime Architecture
At its core, Pear Runtime is a desktop and mobile runtime for P2P applications. Think of it as Electron but for decentralized apps. Instead of bundling a web app with a Chromium instance that talks to servers, Pear bundles a web app with networking primitives that talk directly to other peers.
Hole-Punching: The Core Innovation
The “hole” in Holepunch refers to NAT hole-punching — a technique for establishing direct connections between two devices that are both behind NAT (Network Address Translation) routers. Here’s the simplified version of how it works:
- Both peers register with a lightweight coordination service (not a relay — just a matchmaker)
- The coordination service tells each peer the other’s external IP and port mapping
- Both peers simultaneously send packets to each other’s external addresses
- The NAT routers, seeing outgoing packets to those addresses, create temporary port mappings
- When the return packets arrive, the NAT routers forward them through the newly created holes
- A direct P2P connection is established, with data flowing peer-to-peer without any intermediary
This works for the majority of NAT configurations (UDP hole-punching succeeds roughly 80-85% of the time across typical consumer networks). For the remaining cases where symmetric NATs block hole-punching, Holepunch uses TURN-style relay fallbacks — but the architecture is designed to minimize reliance on these.
DHT for Peer Discovery
Holepunch uses a Distributed Hash Table (based on Kademlia) for peer discovery. When you want to find another peer:
- Your identifier (public key) maps to a location in the DHT’s key space
- Nearby nodes in the DHT store your connection information
- Other peers query the DHT to find your current network address
- The DHT itself is maintained by participating peers — no central directory
This is similar to how BitTorrent’s mainline DHT works, but optimized for real-time application use cases rather than file sharing.
Hypercore for Data Replication
The data layer uses Hypercore, an append-only log structure that enables efficient data replication between peers. Key properties:
- Merkle tree verification: Every entry in the log is cryptographically verified, so you can trust data from any peer
- Sparse replication: You don’t need the full log — request only the entries you need
- Multi-writer support through Autobase: Multiple peers can write to shared data structures with automatic conflict resolution
- Efficient sync: Only new entries are transferred when peers reconnect
Built on top of Hypercore, Hyperbee provides a B-tree key-value store, and Hyperdrive provides a POSIX-like filesystem — both fully P2P and replicated.
The Developer Experience
This is where Holepunch gets interesting from a practical standpoint. Their stack includes over 1,500 public npm modules providing networking, data transfer, and collaboration primitives. The developer experience is deliberately designed to feel familiar:
const Hyperswarm = require('hyperswarm')
const Hypercore = require('hypercore')
// Create a P2P data feed
const core = new Hypercore('./my-data')
await core.ready()
// Join a swarm to find peers interested in this feed
const swarm = new Hyperswarm()
swarm.join(core.discoveryKey)
// Handle new peer connections
swarm.on('connection', (socket) => {
core.replicate(socket)
})
That’s remarkably simple for establishing a P2P data replication channel. The npm-native approach means developers can use familiar tooling (npm install, require/import, standard Node.js patterns) to build decentralized applications.
Pear Runtime itself provides:
- A desktop application shell (similar to Electron) for P2P apps
- Built-in key management for peer identity
- Automatic hole-punching and connection management
- A development workflow with hot reloading
Real Applications on the Stack
Keet
Keet is Holepunch’s flagship messaging application — think WhatsApp or Signal but fully P2P. Messages, calls, and file transfers happen directly between peers with end-to-end encryption. There’s no server storing your messages, no metadata collection, no service to subpoena. If both peers go offline, the conversation simply pauses until they reconnect.
Keet supports:
- Text messaging with E2E encryption
- Voice and video calls (P2P WebRTC)
- File sharing (arbitrary size, streamed P2P)
- Group chats with multi-writer Hypercore
- Room-based collaboration
Pear Credit
A payment system built on the P2P stack, though details are limited. The Tether backing suggests this is part of a larger financial infrastructure play — enabling P2P payments without centralized payment processors.
The Technical Challenges
NAT Traversal Reliability
This is the elephant in the room. NAT traversal success rates vary dramatically:
- Full Cone NAT: ~95% success rate (most consumer routers)
- Address-Restricted Cone: ~85% success rate
- Port-Restricted Cone: ~75% success rate
- Symmetric NAT: ~30% success rate (common in corporate/mobile networks)
When you average across real-world network distributions, you get roughly 60-95% success depending on the user population. For enterprise or mobile-heavy use cases, that reliability gap is significant.
Peer Availability
In a client-server model, the server is always on. In P2P, when a peer goes offline, their unique data becomes unavailable unless replicated. Solutions include:
- Super peers: Always-on nodes that maintain replicas (but this starts to look like servers)
- Erasure coding: Distribute data fragments across many peers so any subset can reconstruct the full data
- Incentivized replication: Pay peers to store your data (Filecoin model)
Holepunch acknowledges this challenge but their current answer — “replicate across enough peers” — works for social apps but not for applications requiring guaranteed availability.
Data Consistency
Distributed systems are hard. CAP theorem doesn’t care whether your nodes are servers or peers. Autobase provides eventual consistency for multi-writer scenarios, but:
- Conflict resolution is application-specific
- Ordering guarantees are weaker than centralized databases
- Complex queries across distributed data are challenging
- There’s no equivalent of a database transaction spanning multiple peers
Is P2P Ready for Mainstream?
Holepunch’s technical execution is impressive. The developer experience is genuinely good — better than any previous P2P framework I’ve used. The npm-native approach lowers the barrier to entry significantly.
But “unstoppable” is a strong claim. P2P applications are unstoppable in the sense that there’s no server to shut down, but they’re also unstoppable in the sense that there’s no server to ensure they work reliably. The tradeoff between decentralization and reliability remains the fundamental challenge.
The Tether backing adds both credibility (real funding) and questions (why does a stablecoin issuer want “unstoppable” infrastructure?). The charitable interpretation is that Tether wants censorship-resistant payment rails. The skeptical interpretation is that “unstoppable” infrastructure serves interests that benefit from being outside regulatory reach.
What I find most compelling is the modular approach. You don’t have to go fully P2P. You can use Hypercore for data replication while maintaining some centralized coordination. You can use hole-punching for media streams while keeping metadata on servers. The stack is composable enough to support hybrid architectures.
For developers interested in P2P, Holepunch’s stack is currently the most practical option available. Whether the mainstream is ready for P2P — or whether P2P is ready for the mainstream — is still an open question.