zcash / zips

Zcash Improvement Proposals
https://zips.z.cash
MIT License
269 stars 153 forks source link

Scalability Design Explorations around changing Payment Flows #629

Open nathan-at-least opened 2 years ago

nathan-at-least commented 2 years ago

Some thought have been floating around for a while on this topic, and I'm not sure there's any good write-up, so I'm filing this ticket as a schelling point for these topics.

The basic insight is to examine how changing the "payment flow" UX and protocol might enable better points in the privacy & scalability space, for example by having senders somehow deliver shielded payment information directly to recipients instead of posting everything on-chain.

Fundamental Requirements

Any shielded payment protocol must meet these requirements:

Trade-off Space

The design around these general requirements balances a variety of important goals:

Usability

Ideals:

Practicalities:

Scalability

Ideally as the number of users grows the requirements for globally verifying existence and double spend protection grow sublinearly. This supports the UX goal of lower fees for greater adoption.

Relatedly, the state necessary to permissionlessly introduce new infrastructure is low, so that new infrastructure can join easily, and the state necessary to continue operation grows slowly so that it's easy/cheap to operate the infrastructure.

Data Availability

Ideally:

How Zcash Meets These Requirements Today

The first step of generating a transaction is local to a sender's wallet.

All of the recipient requirements are achieved by posting a full encrypted transaction to the blockchain:

Privacy for wallets with full state replicas is excellent, because there's no network distinction for receipients (except timing of receiving transaction data).

Data availability comes from monolithically storing everything on the blockchain so all replicas have everything necessary. Data availability for light clients is a challenge for efficiency and privacy.

Scalability is poor, because all replicas must replicate all data for all users.

Acknowledgements

HT to conversations w/ @ebfull, Zooko, @vbuterin, @tromer, @nuttycom, @daira, and many others on these kinds of ideas over the past few years.

nathan-at-least commented 2 years ago

As a starting point for exploring changes from the current Zcash architecture: what if senders somehow deliver most transaction data directly to recipients, with only minimal commitment and nullifier state stored / validated globally?

This impacts trade-offs roughly like this:

Maybe we can address some of the shortcomings in other ways? Perhaps a mixnet can protect network privacy and a "private mailbox" can provide data availability and allow offline reception.