How to issue assets using Taproot Assets?
Utilizing Taproot Assets A Guide on Issuing AssetsSource: 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.
- X Chairman Elon Musk Threatens Lawsuit Against Media Matters: A Case of Twisted Tales
- Telegram Robot Battle Unibot, Banana Gun, MaestroBot Comparative Analysis
- Devconnect News Highlights of DA, altVM, DVT, ZK, Rollup, and other tracks
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!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- A Brief Discussion on Restone It is not Plasma but an Optimium Variation
- OpenAI’s Crisis Deepens More Resignations Pour In After CEO’s Removal
- OpenAI: Rocking the Boat or Sinking Ship?
- The Hilarious Rise of Bonk, Pepe, and Memecoin Token Prices Memeinator Takes the Crypto World by Storm
- How is Ethereum’s liquidity staking developing now?
- Father of ChatGPT’ Ultraman suddenly stripped of office Several signs have emerged since the developer conference.
- Breaking News Ultraman Fired, Internal Conflict in OpenAI Board of Directors