Product Considerations
Compared with the regular SnapDeal protocol, the Optimistic SnapDeal protocol allows for much better efficiency on the SP side and for much more flexibility on the client side.
Optimistic SnapDeals for SPs: a 230x improvement in MT opening
On the Storage Provider side, the introduction of the Optimistic version of SnapDeals massively reduce the snark proving overhead currently to SHA, given that the commitment used for proofs is Poseidon. A back on the envelope calculation reveal a ~230x improvement in terms of needed constraints. Indeed:
- A MT path with SHA needs 30 sha evaluation (arity 2), and each evaluation needs ~44k constraints, for a total of ~30*44000 = 132k constraints
- A MT path with Poseidon needs 10 Poseidon evaluations (arity 8) and each evaluation costs 565 constraints, for a total of ~10*565 = 5650 constraints
Note that in case of fraud proof an SP is still required to run the regular SnapDeal protocol, but we need to take into account that this should happen only in case of wrong data snapped into a sector. Indeed, the fraud proof fee which the client has to pay in order to force the regular SnapDeal proof aims to discourage malicious client behaviors (given clients are rational actors)
Optimistic SnapDeals for SPs: full fledged flexibility
With Optimistic SnapDeals a client gets full flexibility, in the form of a tunable tradeoff between SLA guarantees, trust, fraud proof fee costs and computation overhead.
Indeed, a client has at his disposal different options:
- Trust the SP and do not check the correct data injection in the sector (unless he retrieves the data at some point).
- Ensure the data is correctly injected by computing the Poseidon MT of the data (with ~100x computing overhead with respect to the MT computed with SHA).
- Retrieve the data on purpose during the deal duration in order to check correct data injection and eventually pay the fraud proof fee and submit the fraud proof message, obtaining a regular SnapDeal proof.
- Pay the fraud proof fee directly without retrieving the data obtaining a regular SnapDeal proof
Moreover, the coexistence of both the regular SnapDeal and the Optimistic SnapDeal protocol does not prevent clients that are fine with the current protocol to keep using it.