BTCBot Runes Technical Solution: Zero-cost Automatic Aggregation, Increasing Sell Order Transaction Rate
Author: BTCBot Chinese
This article is reprinted from https://medium.com/btcbotcn/btcbot-runes-technical-solution-zero-cost-automatic-collection-increase-sale-order-transaction-rate-e8fa1e017699
Recently, the Runes market has been quite popular, but many participants have noticed that the sell orders on many trading platforms are for single tokens rather than larger orders of 5 or 10 tokens. Today, we will explain the impact of this phenomenon, its causes, and BTCBot's technical solution.
Impact of Single Token Sell Orders
The large number of single token sell orders in the market significantly affects the trading experience. If the mint cost of a token is 10U, and there are sell orders in the market also at 10U, but only one Runes available, and the current gas price is 100sat/vB, then the buyer will end up paying slightly more than 20U for this single token. This means that the overall purchasing cost increases to 200% (20U).
If there is a sell order for 20 tokens, then a single transaction can buy 20 tokens for 200U, and the buyer's gas fee will still be about 10U. In this case, the impact of the gas fee is only 10/200=5%, and the overall purchasing cost is: (200+10) ÷ 20 = 10.5U.
The significant impact of the gas fee on purchasing, along with the substantial increase in overall purchasing costs, is the reason why many single Runes token sell orders go unsold.
The small impact of the gas fee on purchasing, along with the substantial decrease in overall purchasing costs, is why consolidated large orders of Runes tokens can even be sold at prices 10%-20% above the floor price.
Causes of Single Token Sell Orders
If participants only mint 1 Runes, then of course they will list just 1 token. The real issue arises when users submit 5, 10, or 20 tokens, and the result is that they can only list them as individual sell orders. Why does this happen? Because many platforms that mint Runes in the market use a "parallel mint" approach (first splitting UTXO, then minting Runes). Here’s a detailed explanation:
Taking the example of minting 20 tokens.
First, a large UTXO is split into 20 smaller UTXOs, then each of these 20 smaller UTXOs mints one token, resulting in 20 individual tokens left in the wallet. When listing on the exchange, they can only be listed one by one. Assuming the token price is the same as the mint price, this means that the gas fee the buyer pays for one token is already equivalent to the price of that token, leading to a slippage close to 100%, making it difficult to sell without a price spike.
Additionally, in terms of cost, minting 20 tokens this way results in 21 transactions, with the first transaction being the one that splits the UTXO. This transaction does not mint any tokens but incurs costs equivalent to minting 7 tokens, as shown below:
Therefore, without considering gas fluctuations, using this method to mint 20 tokens effectively costs the equivalent of minting 27 tokens.
BTCBot Technical Solution: Serial Minting
BTCBot will first create a temporary address for this batch minting, transfer the available UTXOs to this account, and mint one token. Then, this temporary address will organize 18 transactions using the received UTXOs in a serial manner, and finally, the last transaction will return the remaining UTXOs to the user's original address while minting the last token.
This serial minting method does not require prior splitting of UTXOs. The previous UTXO contains 2 tokens, and the new UTXO generated from the next transaction contains 3 tokens. The consolidation is automatically completed during the serial transactions, and in the end, the user's wallet will have one UTXO containing 20 tokens, which can be listed on the trading market at once, allowing the buyer to pay a single gas fee to buy 20 tokens with slippage of less than 5%.
It is worth mentioning that in terms of cost, this method only generates 20 transactions for minting 20 tokens, effectively costing about the same as minting 20 tokens, with almost all gas fees used for the actual minting without waste. For example, in BTCBot, if a user mints 50 Runes, it will automatically consolidate into 2 batches of 20 tokens and 1 batch of 10 tokens, saving money while making it convenient to list for sale.
To simplify the understanding of the above technical content: Mint while consolidating, saving gas fees, and facilitating listing for sale.
Conclusion
This article briefly discusses the Runes market, the reasons for the emergence of numerous single token sell orders, their impact, and BTCBot's technical solution. I hope this is helpful to everyone!