introduction
Transaction is the soul of web3, attention is the core resource of web3, price is the starting point of clustering, value is the end of time.
BTC halving has been a month, and the widely expected Runes agreement has also been a month, during which more than ten generation platforms have emerged, trading markets, on the day of halving, even a generation to play a Runes asset needs to cost more than 100 US dollars.
This paper takes Runes assets as an example to analyze which is the best mechanism for asset token (etching) model on Bitcoin?
1 Runes on behalf of the platform GAS ranking
The following is a list of 14 Jun combing.
From the perspective of program ranking, the core conclusions are:
gas cost on "Split + chain solution" < "Chain" < "split" < "single"
Degree of centralization: Chain (no intermediate address) < split (no intermediate address) < chain (with intermediate address) < split (with intermediate address)
Asset collection: Chain > Split + Chain > Split Batch chaining speed: Split = split + chain > Chain
It may seem confusing at first, what is a chain and what is a split?
This is about to return to the Runes protocol itself, and it is recommended to expand reading: The BTC halving is imminent, and the underlying design mechanism and limitations of Runes protocol are explained "
1.1.Runes etching mechanism brief introduction
Runes uses etching technology, which is an easy and intuitive way to record information onto the chain: Written into the op-return field of UTXO (unspent transactions) in bitc, since the functionality was enabled in Bitcoin Core client version 0.9 (14 years), OP-RETURN creates a clear verifiable non-consumable output that allows data to be stored on the blockchain. Similar to utxo output, but not consumable.
In btc's blockchain browser, you can easily see that the transaction is attached with an op-return message, such as the following figure:
As you can see, the output here, #3, is actually free, although he occupies one of the pensutxoBut he is a closed loop circular rectangle, which means that he can not be transferred again for consumption, so he is like a transaction of the remarks area, left in the Bitcoin storage space, through the transaction hash index to find him.
Careful you may find, whyOP_RETURNThere's one behindRUNE_TESTThis is the result after decoding the specific content, click the details button, you can find52554e455f54455354Such an encoding string, in fact, a string of hexadecimal encoded data, can be obtained after decodingRUNE_TESTSimilarly, there are other encodings in the details, which will eventually become a string after decoding, probably in json format, so as to reflectRunesAsset deployment, casting, issuance and so on.
therefore
The so-called generation, the specific mechanism can be summarized as follows:Runes can only trade for one asset
So the so-called transaction cost is reflected in the size of the data on the transaction chain in BTC, then the design of the platform is equivalent to who can control the number of utxo in the transaction to the least extent, which is the optimal model.
Let's expand on the split model and the chain model
1.2. Split the model
The so-called split model is in the process of generation The first transaction is split into multiple sub-transactions, and each sub-transaction is then carried out the asset casting process .
For example, the following figure shows the execution of tools.mempool.
The first transaction estimates the fee consumption of each sub-transaction, and then sets aside 546 (the common dust value of Bitcoin) + the fee amount to split multiple UTXOs, where it will be found that he is transferred to a new address.
The second transaction is then redirected from the new address back to the user's address and completes the proxy, and the user collects the Runes asset.
The obvious problem with this model is that:
A transaction needs to be split first, and the user gets a decentralized UTXO.
So when the user wants to sell an order, either one by one, or first merge and then hang an order, for large customers, it will increase the cost of the transaction.
In addition, tools.mempool platform does not execute a proxy for the user in the split transaction, so the comprehensive loss is higher in the split model.
1.3. Chain mode
The so-called chain is similar to the following structure, the user initially has 2W Cong, and each transaction is to consume the last transaction that is still in the memory pool, so it is multiple transactions.
It will be found here that the 6144 Cong charged by the ending number s2t4 is the service fee of the platform, compared with the service fee required by the execution of the service fee itself 3892, it can be said that the income of the platform is very high.
The platform is previously known as Runestone, which developed the Runes generation + trading market in 5 days, in fact, from the trading point of view, the platform has long been uninterested. However, in the first few days, almost 3 BTC (over 150W) of fee income was generated For individual developers can not be all high ah.
However, this is actually a meaningless cost, there are multiple platforms have open source code, such as OKX also open source Runes code: the perfect solution to Runes codec and play, developers can directly reference to build their own play tools https://github.com/okx/js-wallet-sdk .
Back to the chain, because he is almost the first to charge fees, each subsequent transaction is the general cycle processing as shown in the following figure, so he actually has a relatively small amount of data.
2, Runes best generation model: split + chain
luminex is a relatively good solution model at present, can do large quantities of mint, the platform with utxo splitting tool easy to use, using the split + chain solution.
As shown in the picture below:
-
The platform will first give users an asset in the split, no waste.
-
And if the casting is less than 25 times, split enough gas for chain casting, and then perform the casting.
-
Finally, if the casting is more than 25 times, the required gas for multiple chains will be separated, and then the casting will be performed.
Although this basic fee is not better than the chain, but it can make a crucial difference Mass casting And his winding efficiency can Stuck in the limit of 2 blocks to complete the casting .
2.1, why is there an index of chain efficiency?
This is because the BTC node has a mechanism to prevent Dos attacks,
A maximum of 25 transactions are limited to the memory pool in the vout of a single utxo and the link on which it is consumed.
This is the reason why most high-volume Mint mostly uses intermediate addresses, in order to remove such restrictions. In the case of a chain, assets are stacked up and eventually transferred to the user.
Therefore, only 25 transactions can be in the memory pool at the same time in the chained model, but the split model can be indefinitely placed in the memory pool after the split transaction is linked (because the parent transaction is no longer in the memory pool, the vout of each utxo calculates the 25 limit independently).
Therefore, luminex, as the optimal model, is not only the lowest gas, but also the ability to keep gas very low, but also a large number of casting.
However, There are better models than luminex.
Because the split transaction of luminex will also be separately called to the user, but this asset is actually not transferred to the user, but can be transferred to the second chain transaction utxo, because Runes has the default asset flow mechanism, which can reduce the cost of a utxo in the case of luminex.
2.2. Comparison of BTC fee optimization rate
It talks about half a day's cost, how exactly is the cost measured? In fact, it is very simple, the user usually sets the unit price, that is, similar to gasPrice, but BTC is actually completely dependent on the storage of data as a quantity unit, that is, vsize.
So let's take taproot address as an example (different addresses have different fees, and taproot address is a lower fee). In the structure of such an address:
-
For each additional input, vsize increases by 58.
-
For each output increase, vsize increases by 43.
-
For each OP_RETURN, the vsize needs to be about 30.
So we can calculate the following optimization rate
Chain batch Mint 10, cost: i * 10 + o10 +p10 = 1310
Split batch Mint 10, cost: i * 10 + o10 +o9 +p*10= 1697
gas optimization rate: (1697-1310)/1697 = 22.8%
Chain batch Mint 20, cost: i * 20 + o20 +p20= 2620
Split batch Mint 20, cost: i * 20 + o20 +o19 +p*20= 3437
gas optimization rate: (3437-2620)/3437 = 23.8%
It seems that 20% is not much, but in a single brush casting will consume 100U peak period, 10 batches can reduce the cost of 200U The subtle cost spread eventually maps to the psychological threshold of the transaction.
In the face of high handling fees, those who expect to receive the earliest share in the web3 circle in the future still need to learn the basic node js, so as to directly run each open source code (such as the OKX open source signature component mentioned above), so as to directly cross the platform charging problem, and even in the next trading market article, It can also directly bypass the block of multiple platforms to directly build cross-platform transactions, and even directly monitor the memory pool to directly gain profits.
3. Summary
The Runes Assets deal was launched a month ago, but ultimately did not cross the $1 billion threshold, and it was also reported that Ordinals and runes founder casey asked seppuku for a live chat.
However, in the final analysis, it is still in the ecology, the two core infrastructures of beating and the market are imperfect, so that the cost of retail participation is too high, and the institutional participation lacks ecological operations.
First of all The platforms that have emerged either charge high fees or are not fully functional . For example, although the chain cost of Runestone is low, its gas estimation is inaccurate, which is easy to lead to the wear of the last transaction, accompanied by the uncertainty of the chain, and gradually make it withdraw from the market.
In addition, the current generation model still ignores the real demands of users, the transaction itself.
Each hit assets, often need to change hands more quickly out, but in the early market price fluctuations, and btc is extremely crowded, in fact, in addition to the project side's own market behavior, there will not be too much demand for large-scale assets, in other words, there is such a large amount of capital to play 1000 assets, but also their own ability to do it. The core users of the platform are retail investors.
So the chain is low cost, but it's not suitable for the very early stages, In high-speed fluctuating pricing, in the case of the lack of splitting tools in the market, the chain generated more than 20 pieces of composite in 1 transaction, will make the transaction of the swept goods threshold becomes higher.
Finally, this article is the BTC on the asset generation mechanism, followed by a trading market model, can be adapted to (BRC20, Ordinals, Atomical, Runes) and other new asset trading mode, please pay attention to, do not miss.
Reference materials:
With runes split generation of open source: https://github.com/okx/js-wallet-sdk
Ruens agreement official source: https://github.com/ordinals/ord
Can background message author, discuss web3 industry issues
Like attention, fourteen with technical perspective to bring you value
Weekly more bloggers, recommend adding stars to reduce the omission of the latest original views!
评论 (0)