You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
The text was updated successfully, but these errors were encountered: