Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZSAs: Addition of reference notes to the global issuance state to prepare for ZSA Swaps #969

Open
vivek-arte opened this issue Jan 9, 2025 · 1 comment

Comments

@vivek-arte
Copy link
Contributor

The ZSA Swaps design enables users to construct Swap Orders, which function as incomplete pieces of a transaction that allow users to specify the Asset they want to spend and the Asset they wish to receive during the Swap.

Two or more matching Swap Orders can then be combined together into a Swap Bundle and submitted on-chain.

Since an OrchardZSA Action includes an input note and an output note of the same asset (as per OrchardZSA design) and we wish to preserve this property, the user needs to provide a valid input note of the desired asset base (similar to the split note mechanism). If the user has never held a note of the desired asset, there has to be a way to provide this note nevertheless.

The suggested solution includes creating a publicly known note per asset that any user can use to generate swap orders - a reference note.

The public-spendability is achieved by the note having a fixed recipient with publicly known spend authority, namely the one created from the all-zero spending key.

The reference note is treated as any other note and attached to the commitment tree. It is also stored in the global state of a Zcash node for fast access so that a user can efficiently access it at any required point.

A consensus rule will require every newly issued asset to have a reference note for this asset. The rule can be enforced since all issuance is done in public.

For more details about the asset swap design, please see https://deploy-preview-63--zcash-zips-qedit.netlify.app/zip-0228 (work in progress)

@vivek-arte
Copy link
Contributor Author

This specification has been added in QED-it#94, and merged into #960.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant