waku-org / research

Waku Protocol Research
MIT License
3 stars 0 forks source link

Crypto-economic incentives in light clients side #21

Open alrevuelta opened 10 months ago

alrevuelta commented 10 months ago

This issue explains the idea of having crypto-economic incentives on light clients side. Meaning that light client users should pay a small fee in exchange of such services (such as store, filter or lightpush). Since these so called "light clients" (nodes that don't run a full node and just use other nodes) don't really contribute to the network, it would be fair that they have to pay a small fee for such services. Trust assumptions in the different protocols are also explained, which at the moment, can't think of a way of being completely trust free.

Introduction

Crypto economic incentives in waku are not trivial, since:

In fact there are some examples out there of blockchains that without having incentives for i) relay and ii) storage, work very well. For example, in Ethereum no one incentivices you (economically) for relaying traffic in their gossipsub network. Same for serving blocks to new nodes or for storing old state that you dont really need. But in the Ethereum case, economic incentives are placed somewhere else, so that you are indirectly incentiviced do i) and ii).

During the offsite, we decided to leave crypto-economic incentives a bit aside, and focus on some game theory and non crypto-economic incentives that will indirectly incentivice people to run nodes. Examples:

Crypto-economic incentives in light clients

But what if crypto economic incentives could be on light protocols side, meaning that light client users pay for filter, light-push and store requests? In other words, require light client users to pay for publishing and fetching messages to/from the network.

If a node is getting paid for providing these services to light clients, then it would be incentiviced to relay traffic and store messages, because its getting paid to do so. And by doing this, they are contributing to The Waku Network. If you are interested in running a full node, you can always do it (even with incentives disabled), but with this we can also ensure coverage to light clients. L2 technologies could be used, any Validium should be enough, with non onchain data availability but with sub cent fees.

There could be two approaches:

While I don't have anything against the subscription model, I would just analyze the pay-per-message one, since I think i) involves less trust in the node and ii) its not and out of band agreement between users and specific wkau operators. The analysis is divided into 3 incentives for the pay-per-message case:

store incentives

A node can be incentiviced by getting a small fee on every time it replies to a `fetchMessage(topic, startTime, endTime) request. Assuming that the more messages the node replies to, the higher the fee it gets, then its incentiviced to store as many messages as possible, since a non stored message has an opportunity cost. Meaning that you will fail to profit from that if someone requests it. This section suggest how to implement incentives on store providers by:

We could add a previous req/resp interaction before the existing store interactions (+ some minor mods), to settle the payment. Something around the lines of:

The pricing mechanisim is open but should take into account the following.

There are two ways of completing the payments. Leaving aside other fancy designs with escrows, disputation systems etc. I would opt for i) since the node operator has some reputation that can work as collateral.

However, with the current state of the art in waku, there are some trust assumptions:

In both cases, i) using more than 1 node to run the query and crosschecking the responses and ii) node reputation can reduce trust, but by now its an open problem to do this in a fully trustless manner.

lightpush incentives

TODO

filter incentives

TODO

tldr: Have light protocol users to pay for filter, light-push and store requests.

s-tikhomirov commented 9 months ago

How do we know the message is real?

Isn't this question orthogonal to incentivization? Even without incentivization, how can a light node be sure that the message it receives is real, and what is real anyway? (In the absence of a canonical history.)

alrevuelta commented 9 months ago

Isn't this question orthogonal to incentivization? Even without incentivization, how can a light node be sure that the message it receives is real, and what is real anyway? (In the absence of a canonical history.)

Not per se part of incentivization but very connected, since with incentives in serving messages, the incentive to attack the protocol is way higher (create fake messages out of thin air and get paid for each one, easy exploit). Without incentives, well, the attack is still there but it makes less sense to exploit it (from an economical perspective). Said that:

how can a light node be sure that the message it receives is real Note that this problem affects both light nodes and full nodes. Note that your full node might be down for few hours, and then you would need a store node to fetch the messages during this time window.

and what is real anyway?

I would define by real a message that has been seen by the majority of relay nodes. But by now what we have is just "valid rln proof".

alrevuelta commented 9 months ago

Storing nodes are supposed to take on risk without being sure that they will get reimbursed in the future. A full node must store non-ephemeral messages as they arrive, in the hope that someone, sometime in the future will be interested in them. This is akin to PoW mining where miners expend energy first hoping to get rewarded later, so that's not to say this cannot work, but it's something I'd keep in mind.

@s-tikhomirov (my bad, I meant here)