I am writing the fourth and last post of Waku explanation series, a series of post to introduced core concept, and value proposition to the reader [1] [2] [3].
This fourth post is different because it addresses the Waku Service Marketplace. Contrary to the other protocols and features covered in previous poist, the Waku Service Marketplace is only a concept. Research is in progress to deliver protocols and software to enable it.
Because this post is more about a vision, than actual code and protocols, it seems adequate to open the discussion before publishing it.
Of course, the Waku team discussed this matter many times, especially during the Athens offsite. So it shouldn’t be new to most people. It was also discussed in this forum [4].
With this present post, I’ll also expand on some of the concepts that I removed from the blog article for brevity purposes. You are welcome to discuss both the article draft [5] and the present post in this thread (or comment directly in Notion if you are an IFT CC).
Also, best to read the blog article first.
RAILGUN case study
In the argument of financial incentivization to ensure the reliable provision of Waku service, I make a case that store is a hungry service, for which incentivization is necessary.
Interestingly, RAILGUN [6] does not enable store services on their fleet or broadcasters [7].
Let’s quickly review how RAILGUN uses Waku:
- Wallet users push fund to a zero-knowledge onchain contract, and then uses those fund to perform DeFi actions in privacy.
- This is possible by having broadcaster performing the onchain actions for users.
- Observers of the blockchain can only see wrapped transactions performed by broadcasters wallets, and cannot deduce what user actually performed said transaction.
- Users transfer funds to broadcaster to perform the defi action, and pay the broadcaster, using zero-knowledge notes.
- Which means that while you may see that a wallet has sent funds to the RAILGUN smart contract, you cannot deduced what kind of DeFi action they are doing.
RAILGUN do not have to use store, because:
- Broadcasters regularly send their fees; meaning a browser or mobile wallet can get online, and wait for the latest fee to be sent.
- RAILGUN developers implemented an end-to-end reliability protocol for transactions, where the broadcaster sends a ACK back to the wallet when receiving a transaction request. If no ACK is received, the wallet re-sends the transaction.
Which means that store is neither needed for historical message retrieval, nor for peer-to-peer reliability, as a robust end-to-end reliability is available.
Moreover, because of their early integration of Waku, past unreliability in our js-waku stack (we’re working on it [8] [9]), and, more importantly, a will to higher privacy standards, they use Waku relay in the browser.
So does the argument for incentivization still stand for RAILGUN?
The usage of relay in the browser has inherent scalability limitations [10]. This is mainly because of the lack of browser-to-browser connection. Leading browser to deplete the gossipsub mesh of service nodes. Note this is mitigated by the fact that Waku Relay uses flood publish (node initiating a message sends it to all connected peers in the shard, and do not restrict the publication to mesh peers).
Adding WebRTC to the Waku transport stack has been considered [11]. However, it comes with its own challenges. Not all WebRTC connections can be done without STUN/TURN servers.
Maybe enough connections can be done without them to make the Waku Relay network work?
The issue with such a bet (enough browsers can do WebRTC connections without TURN/STUN servers), may be loss when users from specific geographical location are flock in.
Adding TURN/STUN servers to Waku services is an idea we’ve be keen to explore. But it is very similar to store in terms of resource usage, most likely revalidating the argument for financial incentivization. Nonetheless,
Which means that if store is not needed, and light protocols are not needed, then there is still a scarce resource: the number of inbound connections from the fleet, to allow access to browser wallets (assuming mobile to mobile TCP connections are happening).
In this specific instance, it may be possible to have another form of incentivization to ensure this resource is available. For example, broadcasters could be encouraged to run services to support additional users, especially browser wallets. They are encouraged to do so as more user, more usage and hence more revenue.
Waku-network-per-app vs shared networks
In the blog post [5], I justify financial incentivization in a simplified scenario: one Waku network per application. While this simplify the reasoning, we aim for it to not be the de facto topology. Indeed, having a network per application implies caveats:
(1) no participation anonymity: if you are part of this app network, then it’s very likely you are using, or supporting, this app.
(2) reduced properties: a smaller network lead to reduced scalability, reliability and censorship-resistance.
We promote a model where privacy-focused applications use and remain in a shared network.
While other applications, may start in a shared network and graduate to their own network as they group. This post discussed various aspect of a Waku network of networks [12].
The shared network model strengthens the argument for financial incentivization. Indeed, in a network where all users are using the same app, it might be possible to put in place private tracker style reputations. By having some tracking in the app to encourage users sharing resources to the Waku network, and have some in-app rewards for it.
This becomes ineffective as soon as two apps share the same network. How to track that the resources shared by users of app A, are not exploited by users of app B?
The only solution here is either separate networks, or have a generalized system: financial incentivization. So it can be fine for both applications to share resources, as users, or projects, pay for what they use.
Waku Store vs Codex
The purpose of Waku Store is to cache messages for offline devices. Waku store is not expected to be durable, it is not designed to keep your messages forever, or even 30 days.
Codex [13] has been designed for data durability. The expectation is that if Waku messages need to be retained, then a mechanism should be developed to archive them on Codex [14]. This implies paying Codex for archiving.
Which means there may be a case to reduce the pressure on Waku Store. If Waku store nodes may only need to keep message for a day, or even few hours, before the important ones get archived on Codex. Then one could imagine how desktop users sharing some gigabits of hard drive would be enough.
But again, this only work in a topology where all users can share resources. Similarly to BitTorrent, where all users can seed as they leech.
This fails as soon as mobile and browser are brought in the picture, as each store node will have a limit on how many edge node they can serve.
References
- [1] Explanation series - RLN Relay
- [2] Explanation series - Light protocols and edge nodes
- [3] Explanation series - A unified stack for scalable and reliable P2P communication
- [4] Waku as a Decentralized Service Marketplace
- [5] Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
- [6] https://railgun.org/
- [7] GitHub - Railgun-Community/waku-broadcaster-client
- [8] Direct Message Reliability
- [9] Upgrade Waku for the Web
- [10] Waku v2 scalability studies - #4 by fryorcraken
- [11] Browser-to-Browser WebRTC over Waku: latest exploration
- [12] Message Validation Marketplace, Waku Network of Networks
- [13] https://codex.storage/
- [14] Logos Web apps