This article provides an in-depth analysis of some recent rune “loss” issues in BEVM cross-chain operations, and provides security recommendations to prevent such issues from happening again. Recently, we have noticed that some runes have been "lost" in BEVM cross-chain operations, which has aroused the attention and doubts of the community. This article will conduct an in-depth analysis of this issue, aiming to provide users with a more comprehensive understanding of the issue. At the same time, it also takes this topic to tell you about some precautions when using the recently popular inscriptions and runes. background On December 23, 2023, Beijing time, some BEVM cross-chain transaction users found that some COOK and PSBTS held in their accounts were transferred to the cross-chain bridge without their knowledge, and then these users questioned the BEVM team. Then the BEVM official Twitter issued a statement saying that since these runes are not supported by mainstream wallets such as Unisat , when cross-chaining to BEVM, these non-mainstream inscriptions will be transferred to the BEVM address as ordinary UTXO . After the ScaleBit security team noticed this, they immediately conducted an investigation. After research by the ScaleBit team, it was confirmed that the runes were indeed transferred as ordinary UTXOs in the same cross-chain transaction, rather than being "stolen" by the BEVM . text According to the BEVM official website, BEVM is a BTC Layer2 that uses BTC as Gas and is compatible with EVM. Its core goal is to expand Bitcoin's smart contract scenarios and help BTC break through the constraints of the Bitcoin blockchain being non-Turing complete and not supporting smart contracts, allowing BTC to build decentralized applications with BTC as native Gas on the BEVM Layer2. Recently, with the launch of the BEVM Odyssey event, many users have begun to cross-chain BTC to BEVM for interaction, hoping to seize the opportunity to participate in the BEVM ecosystem in the future. However, during the cross-chain process, some users found that part of their COOK and PSBTS were lost. According to the blockchain browser, it was found that the runes were transferred to the BEVM cross-chain bridge, resulting in the situation mentioned above. Next, let’s take a look at what happened. First, we found some cross-chain transaction information through the BEVM browser (https://scan.bevm.io/stats). Through analysis, we found that the receiving address of the cross-chain bridge is: bc1p43kqxnf7yxcz5gacmqu98cr2r5gndtauzrwpypdzmsgp7n3lssgs5wruvy. We then checked Rune Alpha (a general browser and service that supports RUNES protocols such as COOK and PSBTS) and found that its address held a large number of various runes, including more than 110,000 COOKs and more than 280,000 PSBTS. We then conducted research and analysis on this part of rune-related transactions. Let’s take one of these transactions as an example: https://runealpha.xyz/txs/c1bf015ce01a3610b436fb2e418685855cd7a37143cd52a4d1858a53e610b5f2 The transaction content is shown in the figure: We can see that this transaction has two inputs, namely 0.00000546 BTC (including 1000 COOK) and 0.02169031 BTC, and the outputs are 0.02 BTC (including 1000 COOK) and 0.00148377 BTC. For comparison, we found a COOK transaction that was not a cross-chain bridge transaction, and its output is as follows: It can be seen that both input and output contain a UTXO of 0.00000546 BTC. Why is this happening? Here we need to understand some relevant knowledge. UTXO First, let's understand what UTXO is. UTXO, the full name of which is Unspent Transaction Output , is the core knowledge point of Bitcoin. In Bitcoin transactions, each transaction has input and output. The money someone pays you is the "transaction input", and the money you receive is the "transaction output". The core design idea of UTXO is stateless . It records transaction events but not the final state, that is, it only records change events. Users need to calculate their balances based on historical records. Therefore, the transaction model of Bitcoin is different from the bank account we usually use. It does not have an account. Bitcoin only has UTXO. A UTXO can be imagined as a "coin" of any amount. UTXO input and change UTXO is just like a coin, it cannot be broken apart for use. So how do you make up the input amount during a transaction, and how do you get the change? For example, Xiao Ming transfers 1 BTC to Xiao Gang. The whole process is like this. Xiao Ming needs to collect enough inputs. For example, in the previous transaction corresponding to Xiao Ming's address, a UTXO with a face value of 0.9 is found, which is not enough for 1 BTC. Fortunately, multiple inputs are allowed in the transaction, so Xiao Ming finds another UTXO with a face value of 0.2. In this way, there will be two inputs in this transfer transaction. At the same time, there will be two outputs, one pointing to Xiao Gang's address with a face value of 1 BTC. The other points to Xiao Ming's address with a face value of about 0.1 BTC. This output is the change. In the process of Bitcoin transfer, there is no fixed algorithm for adding inputs, which depends on the implementation of the wallet. Bitcoin Inscriptions and Runes Secondly, we need to understand what inscriptions and runes are. Bitcoin inscriptions and runes are two important concepts in the Bitcoin ecosystem. The main representative of Bitcoin inscriptions is the Ordinals protocol. Ordinals was born in December 2022, and its content is completely on-chain. It was developed by Casey Rodarmor. The protocol uses the Sat numbering system. Ordinals tracks each Satoshi in transactions by assigning them a serial number. At the same time, users can attach additional data (images, videos, text, etc.) to the Bitcoin blockchain through Ordinals, making each Satoshi unique and thus having the properties of NFT. BRC-20 was created based on this protocol. Runes protocol, also known as the Rune protocol. With the popularity of BRC-20, transactions of BRC-20 related tokens account for most of the Ordinals protocol. On September 26, 2023, Casey Rodarmor redeveloped a protocol called Runes (which is now referred to as the Rune protocol) as a replacement for BRC-20. The protocol is a simple, UTXO (unused transaction output)-based FT (Fungible Token, fungible token) protocol that enables Bitcoin users to have a good experience. The main representatives of Runes are COOK and PSBTS we mentioned. The carriers of Bitcoin inscriptions and runes are both UTXO . A key difference between Bitcoin inscriptions and runes is that inscriptions are engraved in the isolated witness data, while runes are engraved in OP_RETURN . The size of data that OP_RETURN can store is very limited, but it is more than enough for issuing coins, and this is not a new technology. For users to cast inscriptions or runes, they essentially send the corresponding amount of Bitcoin to the protocol, and the protocol returns you a UTXO with the inscription or rune, usually a UTXO of 0.00000546 BTC. Here is why it is 0.00000546, this is the minimum transaction amount set by Bitcoin. The reason for transferring inscriptions is that these wallets recognize the special format of these UTXOs. The wallets use the corresponding protocols to transfer these UTXOs as inputs and pay additional fees to the other party. Why did users lose their Runes? As for the user's lost rune, since it is essentially still UTXO, when the user uses UniSat to perform Bitcoin cross-chain operations, UniSat does not recognize the UTXO containing the rune and processes it as a normal UTXO, and sends the combined input to the cross-chain bridge. In fact, it is not only cross-chain operations, but also possible for users to lose runes when performing other Bitcoin transfer operations in wallets that do not support runes. On December 7, a user lost 15,000 COOKs when performing a BRC-20 swap operation on Unisat. There is another interesting thing. When casting runes on Runes Alpha, it is possible to transfer the user's inscriptions as Gas. Why has no one reported the lost inscription? Through the official documents of BEVM, we found that BEVM cross-chain supports inscription cross-chain. Users only need to use BSwap to cross-chain their inscriptions to BEVM. The wallet used for cross-chain is UniSat wallet. This is a Chrome plug-in wallet for BTC ecology, which helps users store, mint and transfer BRC-20 tokens. It can identify the user's inscription, thereby avoiding the merging of this part of UTXO. It will only be transferred when the user actively trades the inscription. Since Unisat does not currently support the Rune Protocol , this is why users will "lose" Runes instead of Inscriptions when crossing chains. A similar situation will occur if other wallets that do not support Runes are used. Can the runes be retrieved? Now that the runes have been transferred to the cross-chain bridge, can users get those runes back? We consulted the BEVM white paper. BEVM's asset cross-chain solution is built based on Bitcoin's Taproot technology. It integrates Schnorr signature + Mast contract + 1000 BTC light nodes to form a POS network to achieve decentralized cross-chain and management of assets. The BTC-BEVM two-way cross-chain is completely managed based on the node consensus on the chain, achieving complete coding and de-trust, rather than relying on multi-signature or manual management. This makes the cross-chain security of BTC and Bitcoin assets as decentralized and secure as BFT POS. Therefore, the BEVM official cannot initiate a separate transfer transaction to withdraw the user's "Rune Assets". Since BEVM does not support the Rune Protocol, the probability of this part of the runes being transferred out is completely random. When the custody contract executes the transaction, these "rune assets" may be transferred out as ordinary UTXO, but the whole process is completely random and not under human control. If you want to force the withdrawal, you must completely change the consensus of the entire BEVM chain, which is undoubtedly equivalent to hard forking BEVM. In general, the incident was caused by several reasons:
How to avoid such problems from happening again? For ordinary users, how can we avoid such problems from happening again? When performing interactive operations, we recommend that users do the following:
At the same time, developers are reminded that they need to fully consider and prepare when developing and designing, and solve possible protocol incompatibility issues at the code level . If this is not possible, they should do a good job of research and make clear reminders before going online to avoid unnecessary doubts and troubles. Summarize The emergence of inscriptions and runes is an important milestone in the continuous exploration and innovation of the Bitcoin ecosystem. It has greatly promoted everyone's attention and enthusiasm for participation in the Bitcoin ecosystem, and has also played a great positive role in the future development of the Bitcoin ecosystem. However, for now, inscriptions and runes are still in a relatively early stage. I hope that everyone will pay attention to the relevant risks while participating, and avoid blindly. |
In fact, the size of the nose can be used to dete...
Some women have many different facial features. W...
After summary, the APW7 high-imitation power supp...
The author of this article is Liao Xuefeng, a tec...
Face reading, five sense organs, nose, physiognom...
In fact, every mole on the body has its meaning, ...
A girl's marriage is also called her second r...
A judge at the U.S. District Court for the Southe...
The degree of wealth of different people is differ...
Bitcoin isn’t the only cryptocurrency hitting new...
Speaking of Jin Xing, everyone knows that she is ...
On December 15, the price of Bitcoin ( BTC ) surg...
Everyone has a different personality and a differ...
As Ethereum (ETH) price consolidates above $3,900...
The lines on the hands and the face are actually ...