This case study presents a novel use case of data availability and the team that is pioneering its first implementation: Midnight Network uses Celestia as the peer-to-peer layer for its Zswap offers, so counterparties can discover them and match.
DA 4️⃣ P2P
When we announced Fibre Blockspace in January, Evan Forbes, a core protocol engineer at Celestia, posted that its properties made a new use case for a data availability (DA) layer possible: its ability to replace a peer-to-peer (P2P) network.
one of the coolest properties of ZODA is that's it's so light weight that users can generate proofs!!!!!
— zkFART (@evansforbes) January 13, 2026
this is a super power as it means concretely we get way better censorship resistance out of the box!!!!
better censorship resistance unlocks a lot of use cases, ie replacing… https://t.co/KKCOYf0eJF
Hlib Kanunnikov, another core protocol engineer at Celestia and self-proclaimed former P2P apologist, posted:
p2p networks are not actually needed and can be replaced with da like constructions. You pay a little money, but you get an extremely simple interface to build on top that has guarantees better then p2p
P2P message dissemination is considered foundational to decentralised network design. However, it is a notoriously difficult architecture space with many different approaches that differ based on the size of the message being sent, whether and how many nodes in the network MUST see the message, among many other requirements.
Building, maintaining and debugging P2P networks is complex and often requires hiring several engineers that specifically focus on the networking layer of the protocol. Entire teams have been dedicated just to building out general-purpose libraries for message dissemination so that teams building decentralised networks do not need to “roll their own” (build their own P2P networking software from scratch) — the most notable of which is LibP2P (used in Celestia’s DA network).
Instead of using standard P2P architectures for message dissemination that have often large surface area for failure, nodes in a decentralised network can just post and retrieve their messages to/from their network’s namespace on Celestia.
DA and P2P solve the same problem
At their core, both P2P networks and DA layers solve the same problem: making sure data published by one participant becomes available to everyone else who needs it.
- A traditional decentralised network usually uses gossip-based P2P to disseminate blocks and transactions across the network, but that approach is best-effort with no hard guarantees that data actually reaches all nodes
- Whereas, a DA layer provides the same dissemination function but with cryptographic commitments and BFT guarantees that the data is available and retrievable, turning what was an unreliable networking problem into a verifiable service.
How does DA-as-P2P work?
A node encodes its data and uploads it to Celestia's validator set, which provides BFT-backed availability guarantees: once two-thirds of validators have signed off on a commitment, the data is guaranteed to be retrievable and reconstructable. Other nodes in the network can then either subscribe to a namespace and receive data as it arrives (optimistic path) or wait for a signed commitment and pull the data on demand (pessimistic path). This replaces the fragile, best-effort gossip layer that is typically the weakest link in decentralised systems with a resource-bounded service backed by Celestia's economic security. The result is that any decentralised network gets reliable, high-throughput data dissemination without having to solve the hard problems of P2P networking itself.
Why wasn’t it really feasible before?
The answer is quite simple: general-purpose message dissemination between nodes generates a lot of data at a high frequency that wasn't possible with the blockspace throughput available on the market before Fibre. To meet the throughput needs of a P2P network's worth of data, blockspace has to be extremely abundant and incredibly cheap.
Fibre delivers the missing capacity: up to 1 Tb/s of throughput, roundtrip times low enough to serve discovery, intent broadcast, and other coordination workloads, and per-blob fees small enough to absorb the message volume of a P2P workload economically. That makes it feasible for the first time to route node-to-node communication through DA.
Midnight Network: the first implementation of DA-as-P2P
Midnight Network uses Zswap to enable privacy-preserving atomic swaps, where users can post exchange offers (e.g., offering one asset in exchange for another) without revealing the parties involved or unrelated balance information. By posting these open Zswap offers to Celestia, other participants across the network can discover them without Midnight needing to run its own gossip layer for order dissemination.
This gives Midnight something that no centralised order book could: out-of-the-box shared liquidity. Every offer goes to the same Celestia namespace, available to any wallet or app that indexes it. New venues launch with day-one liquidity by reading from Celestia, instead of bootstrapping traders one at a time.
Put it together and the trades stop living inside any one application. Every DEX and every NFT marketplace built this way reads from the same pool of Offer Files. … Liquidity one site attracts is liquidity every other site can match against, the network effect is no longer captured by a single venue.
— Sebastien Guillemot, Offer Files
Once a user finds a matching offer, the two transactions can be merged off-chain into a single balanced swap. The confidentiality properties of Zswap mean that even during this discovery and matching phase, only minimal information is revealed, and intermediate imbalance information drops out of the final merged transaction.
How Zswap offer discovery works

- Alice builds a private offer. Her wallet creates a sealed "trade X for Y" message. Her balances and identity stay hidden. Only the trade itself is visible.
- She posts it to a shared Celestia namespace. Once Celestia's validators commit it, the offer is globally readable and guaranteed retrievable. Every wallet, marketplace, or aggregator watching that namespace sees the same offer.
- Bob's wallet matches and merges. Bob's wallet finds Alice's offer in the namespace, builds the complementary half, and snaps the two together into a single balanced swap. No back-and-forth with Alice is needed.
- Midnight settles it. Bob submits the merged trade to Midnight's L1. Only the completed swap lands on the ledger; the intermediate amounts drop out.
More detail in Sebastien Guillemot's Offer Files post.
Celestia helps Midnight move faster, replacing months of custom P2P protocol work and saving millions in engineering and opportunity cost. As a partner chain built to bring ZK compute to production, Midnight sees Celestia’s best-in-class data availability layer as a natural foundation for scaling efficiently and growing both ecosystems together. – Sebastien Guillemot, CTO @ Midnight Foundation
Get started with Zswaps now
For more information about how to get started with Zswaps, read more here.
P2P becomes a service
Midnight is the first chain using this pattern. Any decentralised network that needs nodes to share data reliably can do the same: post messages to a Celestia namespace and read them back with BFT availability guarantees, instead of maintaining a gossip layer in-house. The networking layer becomes a service.
Teams that would have spent quarters building and optimising one can spend that time on the parts of their protocol that actually differentiate them.