Transferring Taproot Assets

Published by Mario Oettler on

There are three ways to transfer Taproot Assets

  1. In the same tree
  2. Split into different trees
  3. Merge into one tree

Transfer in the same tree

Remember how assets were created. It was done in a transaction with a UTXO containing the asset in the script path.

Sending an asset always requires another on-chain transaction to update the tree and store it in a new UTXO.

The simplest way is for Alice to update her tree and then create a new transaction with an output to Alice (herself). In this output, Alice includes the updated tree.

User 001 (Alice) holds 3 assets. She wants to send 2 assets to user 101. The result is an updated Merkle Sum Sparse Merkle Tree that reflects the new distribution of the assets.

After the transfer, Alice is still the only person who can update the tree (transfer assets). This is because she controls the new UTXO where the updated tree is stored.

Asset Split and Asset Merge

In an asset split, the sender relinquishes control of some assets. The sender creates a sparse Merkle sum tree in which he includes the reduced amount of his own assets. But he doesn’t update the recipient’s assets.

The receiver creates a new Sparse Merkle sum tree, including the new amount of its assets. The amount of the sender’s address is set to zero.

Now Alice creates a transaction that consumes the minting UTXO. This transaction has two outputs. The first goes to Alice and contains Alice’s updated Merkle tree. The second output goes to the receiver and contains the Merkle tree reflecting the amount held by the receiver.

Note: The total amount of the assets doesn’t change. But each Merkle tree now has a different root sum.

Alice creates an on-chain transaction with two outputs. One output contains the updated tree (30 assets for Alice) and the other output contains a new tree with 20 assets for Bob.

An asset merge works the same way.

Categories: