Service providers
Currently, Massa node runners provide services like maintaining and feed the blockchain consensus and state, provide API and bootstrap access and so on…
The idea of this proposal is to create a new type of actors (that can be the node runners themselves but not necessarily!) that provide multiple kinds of off-chain services with on-chain management. Those services can be - but are not limited to:
- data storage (Dropbox-style)
- internet connection (eg. VPN / proxy)
- compute (eg. ZKSNARK/ZKSTARK prover-as-a-service, LLM inference as a service, cloud services…)
On the difficulty of proving off-chain service quality
Misbehavior by providers can in a few specific cases be proven on-chain to generate a penalty.
This is for example the case of cryptographically provable computation, storage proofs through Merkle paths and so on…
However, in most cases, there are no good solutions to prove an off-chain service was badly provided. Examples:
- a data storage provider stores the data you pay them for but refuses to serve it in order to limit their bandwidth costs and legal exposure. This means they can prove they host the data if you challenge them on-chain but they won’t serve it off-chain.
- a VPN provider throttles the proxy connection they provide to you when you visit some websites they don’t like
- a computation provider is slow to respond to your requests
A bad solution: redundancy & majority voting
Instead of asking 1 provider to do something, the client asks 3 of them for the same thing, and to sign the hash of the request and their responses (with timestamp + unique counter to avoid replay).
If one provider responded differently than the 2 others, the client publishes the proof that they gave a “minority” response, and the provider gets slashed of some stake locked in a smart contract.
Why this is bad:
- it does not measure quality of service, and only allows detecting “wrong” answers
- it does not account for lack of response by the provider
- providers could be targeted, for example by crafting a website that serves a specific page to all IPs except the one of the targeted provider. That way, when you use proxy providers to visit your website, you can prove that only that target provider responded differently and get them slashed
A better but imperfect solution
In the real world, the actual quality of most services can only be known by clients through:
- reputation (eg. online ratings of a service provider) but those are notoriously easy to manipulate and safe decentralized permission-less and pseudonymous reputation solutions are an unsolved problem
- trial periods (but the service could degrade once the trial period is over)
- previous experience of the client (eg. the client tried the service before and it was good/bad) but then the client bears the risk of their first encounter with a new provider
- third party random blind audits
In this proposal, we will aim for a self-organized, social response to provider behavior.
The idea is the following:
- providers need to lock a MAS stake and wait some time before being enabled
- the MAS stake of a provider defines the level of trust in it, as well as the probability of being randomly selected by clients
- providers advertise a service and pricing
- clients choose the service provider they will use through a recommendation algorithm based on:
- their previous experience with that provider
- how competitive the offer is
- the stake of the provider (also provides Sybil resistance)
- randomness
- clients can cancel their subscriptions anytime
Proposed structure
Service management smart contract
If someone wants to register as a service provider, they need to call a smart contract with the following data:
- a stake in MAS that will be locked in the smart contract
- a service that they are ready to provide (eg. data storage) with SLAs
- capacity (the max number clients at a given time)
- a pricing scheme (eg. MAS per month)
- arbitrary metadata (eg. provider name & description, some signing or encryption public keys, IP address…)
For each service they want to offer, providers need a separate registration.
If a client does not pay, the provider cancels their subscription.
TODO: how does a provider stop being a provider cleanly?
TODO: clients voting with stake to slash a provider ?