Here we’ll try to implement atomic asset transfer between Zones using the Taiga Framework.

Setup

To execute the transfer, the following must hold

  1. $x$ has a valid history w.r.t. $X$ asset rules
  2. Bob wants to transfer $x$ from $z_A$ to $z_B$
  3. Bob has authority to transfer $x$
  4. $z_B$ knows about assets of type $X$
  5. $z_B$ accepts Bob’s deposit of $x$
  6. $z_A$ accepts Bob’s withdrawal of $x$

Valid Asset History

This transfer assumes both zones $z_A$ and $z_B$ have a shared understanding of asset type $X$. In Taiga, this would be implemented as an Application VP for $X$, let’s call it $\text{VP}_X$.

Bob would need to prove that $x$’s history is valid w.r.t to $\text{VP}_X$.

Suppose $X$ is a token using the UTXO model. Then this means that instances of $X$ (i.e. $x$) are destroyed when used as inputs to transactions and created in outputs of transactions. Commitments and nullifiers are used to track the creation and destruction of notes.

The commitment and nullifier set for $X$ needs to be stored somewhere. In Taiga, all state is stored within notes. These notes are linked with a VP via a type tag (each VP can have multiple types of notes.)

credit: https://github.com/anoma/taiga/blob/main/book/src/app.md

credit: https://github.com/anoma/taiga/blob/main/book/src/app.md

So for our token example, we would have one type of note that stores the state of the commitment and nullifier sets, and another note type to represent an instance (i.e. $x$)

Screenshot 2024-03-14 at 12.17.37 AM.png