Fully decentralized applications, instead of using backend servers controlled by developers, are implementing their logic and storing their data on-chain. Therefore, all this data is publicly available to anyone on the Internet. In many cases this is really desirable, but truly powerful DApps must also sometimes process private data, intended only for a small group of recipients, the presence of which on the public blockchain is highly unacceptable.

As an example, let’s take a decentralized platform for selling physical products. The purchase could be made by the buyer paying the product price to a certain smart contract method. But how to send the buyer’s personal information, shipping address and contact details to the seller? There were two solutions: centralize the application or make this data available to the entire world by storing it in a marketplace smart contract.

Our solution to this problem is Synapse – a peer-to-peer network running parallel to the BPX chain, relaying and delivering off-chain messages. Synapse allows any BPX wallet to send arbitrary data (up to several hundred kilobytes per message) to another BPX wallet address. Asymmetric encryption ensures that only the recipient is able to read the message content using his BPX wallet private key. The sender’s wallet signature attached to the message makes it impossible to spoof the sender’s address.

Returning to the example marketplace application described earlier, with Synapse, a buyer can now pay for the product on-chain, then send his personal data and shipping address to the seller via Synapse. In this case, the personal data will remain secret between the buyer and the seller, will not be recorded in any transaction on the blockchain, and the level of decentralization of the application will not decrease.

Synapse is a trustless P2P network of nodes maintained by volunteers. Each node provides an API endpoint for lightweight JavaScript clients – decentralized applications running in the browser. To run your own node, all you need is to download the node software. Make sure you have opened/forwarded the ports used by Synapse on your router/firewall. It is worth noting that each Synapse node reserves some space on the hard drive to store messages intended for currently offline users. When the recipient of the message will reconnect to the network, he can easily retrieve the messages he has missed.

💾 Download BPX Synapse node 1.0.0:

In addition to direct communication between two BPX wallets, Synapse also allows the creation of unencrypted public pub/sub topics. You can think of Synapse as a permissionless, decentralized and free for use cluster of a message broker like RabbitMQ or Apache Kafka. Using Synapse, creating a fully decentralized chat/shoutbox for your DApp is just a few lines of code and implementing a decentralized game in which one player’s moves must be broadcasted to the other players in real time is easier than ever. To demonstrate the capabilities of Synapse, we have prepared a simple test application:

🔗 Synapse Shoutbox:

From the technical side, Synapse is our custom network based on the open source Waku protocol (waku.org). The main motivation for its creation was the requirement for a decentralized message broker for our flagship project – Bitpost. Synapse is a pivotal component to implement all this project’s assumptions and Synapse launch is a big milestone in Bitpost development process. We very much hope that first public version will be presented later this year. Synapse documentation for developers is coming soon, we will also shortly release the JavaScript client libraries for DApps. In the meantime, we encourage everyone to help building the truly decentralized network by launching and testing their own nodes.