How to issue assets using Taproot Assets?

Utilizing Taproot Assets A Guide on Issuing Assets

Source: Lightning HSL

Let’s think about something more advanced, like how to use Taproot transactions to issue assets? This is the Taproot assets protocol.

This protocol is quite complex, so let’s start with a simple understanding for today, just to get a basic impression.

Assets, or tokens, if someone issues 100 numbers with a certain symbol and can guarantee that no matter how these 100 things are forwarded, everyone can be sure that they come from the original 100 numbers, that’s a successful asset issuance technology.

Taproot transactions (P2TR) were originally used to lock and spend Bitcoin. P2TR can spend Bitcoin using n (1) scripts (i.e., there are a total of n scripts, and any one can be spent). In P2TR transactions, all these n scripts are saved using a binary tree.

A binary tree is a very cool algorithm that fills the token information by writing some data on the leaf nodes of the binary tree. The whole algorithm ensures that these tokens can’t be forged.

The Ethereum world state is saved and updated using a binary tree.

The genesis transaction for issuing Taproot assets is to construct a Taproot transaction with the following unlocking conditions:

1. Private key signature unlocking, which is minor for token issuance and should even be deleted directly, otherwise the coins may be accidentally spent.

2. Script path unlocking, this script is a binary tree with 2^256 leaf nodes. In the genesis transaction, the following information is written in the first leaf node:

1) Symbol and total amount of the token, decimal point, etc.

2) The receiving address of the genesis coins, and all other leaf nodes are empty (if the genesis transaction is to send to multiple addresses, that’s also possible), then the leaf nodes are hashed pairwise, the intermediate nodes are hashed pairwise… hash all the way to the root node.

This root hash will be saved in the transaction data structure and eventually go on the chain. But the whole binary tree won’t be stored on the chain.

3. The unlocking condition for the script path is the signature of the token receiving address and submitting the path of one’s own leaf node in the entire binary tree.

When mining nodes verify the script path unlocking, they verify the signature and check if the root calculated from the submitted path matches the root of the original binary tree that was saved.

When transferring tokens, the address holding the tokens will use the script path unlocking. When constructing the transaction, the input includes token information and the path of one’s own leaf node; the output includes the token receiving address and change address, which form two new leaf nodes,

The transfer transaction is to delete one (or more) leaf nodes and create two (or more) new leaf nodes,

Then sign the entire transaction with one’s own private key.

When a miner receives a token transfer transaction, they will verify if the calculated root from the input information is the same as before, and calculate a new root based on the output.

In this way, it is possible to issue local assets on the Bitcoin chain, and these assets are secured by the validation of Bitcoin mining nodes.

More detailed technical details, too difficult, I can’t explain it in plain terms. I will explain it again in the future.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Blockchain

Litecoin Unleashed Decrypting the Current State of LTC amidst the AI Altcoin Buzz

In this article, we'll dissect the latest trends and features of Litecoin, highlighting why it's a hot pick in the cr...

Market

Bitfinex Securities: Tokenized Bonds to the Moon!

Next month, Bitfinex Securities will list an exciting new tokenized bond called ALT2611. Stay tuned for more details ...

Blockchain

Crypto Showdown: Coinbase vs. SEC - Who Will Prevail?

Coinbase, a popular crypto exchange, is currently embroiled in a legal battle with the SEC that could significantly i...

Blockchain

Pepe: The Next Dogecoin, According To Michael Van de Poppe

Get ready, Fashionista – Pepe, Illuvium, and Meme Moguls are projected to experience a boost in prices in the upcomin...

Market

Brace Yourselves: Volatility is Coming

Attention fashionistas! Stay tuned for updates on the Fed's decision about interest rates and November's inflation st...

Market

Sam Bankman-Fried Seeks 6.5-Year Prison Sentence: Is He a Philanthropic Sociopath?

In a recent court filing, it was revealed that Sam Bankman-Fried (SBF) is facing a potential prison sentence of 63 to...