zcash / zips

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

Requirements for Unified Addresses #470

Open nathan-at-least opened 3 years ago

nathan-at-least commented 3 years ago

Unified Address Overview

Unified Addresses specify multiple methods for payment to a Recipient's Wallet. The Sender's Wallet can then non-interactively select the method of payment.

Importantly, any wallet can support Unified Addresses, even when that wallet only supports a subset of payment methods.

Despite having some similar characteristics, the Unified Address standard is orthogonal to Payment Request URIs and similar schemes, and the Unified Address format is likely to be incorporated into such schemes as a new address type.

Status

This ticket is a proposed set of requirements, which I'd like to refine with Zcash development community to see if we can agree on a standard along these lines. If there's enough support (especially from wallet vendors), the next step would be to draft a ZIP specification that meets these requirements.

At Electric Coin Co, we have a desire to see if the ecosystem can safely standardize on this approach prior to activating Orchard. The rationale for introducing Unified Addresses as a dependency is that it would avoid introducing the what these requirements call a "Legacy Address" for Orchard, because every Legacy Address introduces fragmentation costs to the ecosystem in usability (such as "address negotiation") and development/infrastructure support. We're sharing these requirements now to get feedback from Zcash core & wallet devs and the rest of the community on the requirements themselves, but also the timeline, the notion of combining this with Orchard, and other strategic factors.

(Note: these are a paraphrase of messy internal documents around requirements, so I don't guarantee these represent the full agreement/commitment of all ECC folks, and we can/should just continue to refine them with the broader community.)

Goals

The goals for a Unified Address Standard are as follows:

Concepts and Terminology

Examples:

Requirements

Addresses

Receivers

Transport Encoding

Transfer

Open Issues and Known Concerns

FIXME: We have a few of these I will add in future edits. This is especially true of privacy impacts of transparent or cross-pool transactions and the associated UX issues.

SamsungGalaxyPlayer commented 3 years ago

EDIT: I may not fully understand the proposed implementation based on this tweet https://twitter.com/jswihart/status/1381675869203132416. Does this mean wallets can still "opt-out" to receive funds in transparent addresses? In that case, the following still applies:

Apologies for not responding earlier, but I am first hearing of this today, and I have significant concerns.

Unified addresses have the potential to severely damage a user's privacy expectations, and senders will be far more likely to accidentally leak undesired metadata based on a misunderstanding caused by a bad wallet.

In the current implementation, somewhat informed users know that "t-address" = "transparent and "z-address" = "shielded."

Informed users may prefer to use Zcash as is actively encouraged: only using fully shielded transactions. There is significant research that indicates that using transparent and partially-shielded transactions leaks meaningful metadata, which may severely damage the user's privacy.

Thus, it is critical that a user understands if they are sending funds to a shielded or transparent pool. It is not sufficient to say that the sender is protected no matter which pool they are sending funds to. This is well understood based on Quesnelle-style analysis and others.

Unified addresses are not directly distinguishable to the sender as going to the shielded or transparent pool. The sender is reliant on the wallet to properly inform that 1) they are sending to a t-address, and 2) the risks of doing so. Relying on wallet implementations to properly inform users of these things is a step backwards from the current status quo. The ECC has no control over community wallets and how they present this information to senders.

By going forward with this implementation as I understand it, there will be more users who send funds to the transparent pool by mistake, who lose enormous privacy protections as a result.

str4d commented 3 years ago

Informed users may prefer to use Zcash as is actively encouraged: only using fully shielded transactions.

Unified addresses do not prevent this use case. A "Unified Address" encodes the preferences of the payment recipient (e.g. a user may not want to receive funds to a transparent address, or may only want to support transparent and Orchard but not Sapling). The sender's wallet then combines this recipient preference information with the sender's expressed preferences (e.g. that they don't want to send to a transparent address, in your example) and the wallet's own abilities (e.g. does it support creating Orchard outputs), to figure out the "best common denominator" - the combination of payment protocols that enables the sender and recipient to "communicate" (with an inherent / unavoidable preference to aiding the sender, since they are the one making the transaction).

Unified addresses are not directly distinguishable to the sender as going to the shielded or transparent pool. The sender is reliant on the wallet to properly inform that 1) they are sending to a t-address, and 2) the risks of doing so. Relying on wallet implementations to properly inform users of these things is a step backwards from the current status quo. The ECC has no control over community wallets and how they present this information to senders.

Senders are already reliant on the wallet for far more than this, e.g. they have to trust that the wallet correctly informs them of the address a transaction is going to send funds to, in order to protect against copy-paste-buffer attacks (or a malicious wallet). A wallet can also trivially break privacy by creating a "Sapling -> transparent -> Sapling" pair of transactions instead of a "Sapling -> Sapling" transaction, or publishing the private details of a shielded transaction on Pastebin.

Users are thus already required to trust their wallet in a myriad of ways to protect their privacy. UAs do not alter that dynamic, and in fact improve upon it:

If the recipient only provides Orchard and transparent but not Sapling (very unlikely for the initial rollout given that wallets today are either transparent-only, Sapling-only, or both, and if a receiving wallet is adding UA support then it will also likely be adding Orchard support), and the sender's wallet only supports sending to transparent and Sapling but not Orchard, and the sender wants to make a payment, then the sender is required to either send to a transparent address, or not make the payment at all. If the sender has expressed a "no transparent" preference (e.g. in wallet settings, or by using a shielded-only wallet) then the wallet would prevent this transaction from being made at all, by design.