waku-org / research

Waku Protocol Research
MIT License
3 stars 0 forks source link

Waku as sovereign chain #84

Open alrevuelta opened 4 months ago

alrevuelta commented 4 months ago

Every decentralized protocol can be designed as:

Before the introduction of RLN, waku was an isolated protocol that didn't require any external interactions. But with the introduction of RLN as an smart contract deployed on an existing chain (Ethereum), it started becoming i). This issue discusses the possibility of waku becoming ii), its own sovereign chain with its own nodes, consensus, state, etc.

The current approach i) has the following pros:

But it has some cons:

Switching to ii) would be non-trivial, since it will imply:

Some unorganized thoughts:

chaitanyaprem commented 4 months ago

Completely agree with you thoughts on this and it makes sense to not depend on an external chain which has a huge state to sync and maintain for just running a node that does p2p communication.

  • Waku would be no longer a best-effort message delivery

Not sure how this would be gauranteed though. Maybe i am missing something here. RLN state sync would only happen as new users onboard the network and that will only gaurantee that state is synced across not messages that are delivered by each node right.

alrevuelta commented 4 months ago

Waku would be no longer a best-effort message delivery

Not sure how this would be gauranteed though. Maybe i am missing something here. RLN state sync would only happen as new users onboard the network and that will only gaurantee that state is synced across not messages that are delivered by each node right.

Let me rephrase. I meant that if we introduce consensus in waku, not just for rln but for other (to be explored) things, the guarantees could be higher. Having consensus allows to better measure the actions that you want to reward/penalize. So these actions would be backed by onchain incentives rather than being just "best effort". Note that I'm referring to the "actions" beyond the current slashing with RLN.

adklempner commented 4 months ago

If a sovereign chain is used, what currency would be used for purchasing RLN membership?

mart1n-xyz commented 4 months ago

Some notes from the token economics perspective:

ABresting commented 4 months ago

few thoughts:

  1. What are we trying to solve here? Maybe Higher RLN fee, competing block space, 3rd ecosystem dependency... Users prefer current scenario coz it comes with added legacy (BTC, ETH) L1 security, if we also deploy RLN SC on Polygon or Arbitrum, IMO it still would be ETH L1 > sidechain/L2. So with sovereign chain are we helping the users or doing this for us?

Having consensus allows to better measure the actions that you want to reward/penalize.

Can we first quantify this somehow? i.e. Having sovereign chain has better guarantees than WN sync'ing with a cheap, MINA style state chain?

fryorcraken commented 4 months ago

Projects like dydx evolved from i) to ii), being now a cosmos chain with its own set of validators.

If we see this as a potential path. Assuming that using Nomos is the final goal. Then it would be good to understand how much of detour we take by having RLN smart contract on an existing L2.

From a product/developer experience/user experience perspective, we still have open problems. Let's say a dapp dev has a smart contract on Arbitrum and we deployed RLN on OP. It means that users or dev need to interact with both chains already, with potential bridging issues/friction. Using a sovereign chain does not seem to make it worse here. Could potentially make it better if we leverage Waku node to provide Web3 RPC service.

alrevuelta commented 4 months ago

How much work that would be thrown away by using a smart contract now, assuming own chain later?

Depends on many things, but most likely with our own chain, we would reuse everything, but deploy it in our chain instead. But ofc, the difficult thing is having our own chain.

So by now, i would leave this idea as a thought, not affecting the current RLN plans.

fryorcraken commented 3 months ago

Another con of a sovereign chain is that it reduces the composability of Waku smart contracts. Having said that, it is not clear if if's a demanded feature. Will projects integrating Waku want to compose with the Waku smart contracts? E.g., automatically allocate memberships of "service credits" based on onchain events or data?

corpetty commented 3 months ago

I've recently had a conversation with @jm-clius about "consensus" at various layers of Waku w.r.t. message reliability. I'd suggest we have a joint talk with the Nomos team about this at the upcoming All-Hands in Athens. A few notes:

SionoiS commented 3 months ago

Tangentially, can we not build some kind of L2 since nodes agree on ordering of messages by virtue of using RLN?