Detailed explanation AVM: Bitcoin smart contract based on simulation virtual machine

author:Bitcoinsquare

Just this week,@Atomicalsxyz released the latest AVM virtual machine white paper. I believe everyone still remembers the ARC-20 token such as last year’s $ Atom and the $ quark in New Year’s Eve.What does it affect the subsequent Bitcoin ecosystem? Below we will analyze the content of the agreement and the white paper.

1. 1. Background

With the development of Bitcoin ecosystems, such as Segwit, Taproot, Schnorr, MAST, and Taproot Scripts and other technologies have been updated, which has promoted the emergence of new applications.On this basis, many Bitcoin tokens were born, and it also promoted the continuous development of the Bitcoin ecosystem.

The birth of the Ordinals protocol is closely related to the concept of Satoshi on the Bitcoin network.The protocol introduces the concepts of order numbers and inscriptions.The order number is to allocate a unique number for each Cong’s mining order. No matter how Cong is transferred in different wallets, the order number logo has always remain unchanged.Inscriptions are achieved by burning information on Cong.Combined with SEGWIT and Taproot, the Ordinals protocol allows to record a file less than 4 MB for each Cong on the Bitcoin blockchain, that is, the inscription.With the development of the Bitcoin ecosystem, the founder of Ordinals Casey suggested using Runes as an alternative to the BRC-20.Compared with the BRC-20, Runes reduces the server consensus layer and becomes simpler. At the same time, it does not rely on the data of the chain, and it does not require native currency. It is very suitable for the native UTXO model of bitcoin.

The birth of the Atomicals protocol we want to introduce is also a coincidence. At the beginning, the founder Arthur wanted to develop a DID project on the basis of it when the Ordinals protocol was released.The concept of the agreement on Twitter could not be sent on Twitter, and then officially launched in September last year.For the ARC-20 concept in Atomicals, it is not actually an inscription agreement that many people understand. It is more like a chromosomal coin. It uses the smallest unit SAT of Bitcoin as the basic “atom”.The currency unit is supported by at least one Cong unit and operates according to the same rules of sending and receiving the same rules of Bitcoin according to the UTXO architecture of unsuitable transactions.

When tracking historical transaction records and calculating the current ARC-20 asset balance, people only need to check the Bitcoin UTXO-related Bitcoin UTXO related to ARC-20 tokes, and no additional data is required to store the module from the chain.This is the main difference between the ARC-20 and the BRC-20 protocol, because the BRC-20 protocol usually depends on the indexer and under the chain storage layer.The ARC-20 protocol has significantly reduced the cost of index server and increased the degree of decentralization. Its transfer security depends on the BTC network, does not produce redundant transactions, while maintaining the same atomicity as BTC, suitable for developing a variety of native applications.The Atomicals protocol is not just about doing asset issuance, but how to provide richer usage scenarios for assets to enhance its liquidity and expand more functionality.

2. What is AVM

Bitcoin was originally designed as a point -to -point electronic cash system. It has a certain Script script data storage capacity and basic OP CODES operation code. So far, all coverage protocols on Bitcoin are based on fixed or predetermined state machines.All coverage agreements basically share two types of state machines: one is used for signal transmission to create digital assets, and the other is used to manage these digital assets.The status machine rules are essentially unchanged, and they are hardcoded in their respective coverage protocol indexes -application developers cannot customize digital assets.

However, due to the restrictions on the UTXO model and predetermined state conversion rules, this stateless model can only handle limited management of BTC single assets.In order to add assets such as BRC20, ARC20, and Runes to the Bitcoin network, more complex dynamic “state machines” models need to record the storage, transactions and status changes of these assets.One of the methods is to use external protocols and Layer 2 solutions. For exampleScript script function, adding new operating codes or storage space, such as BIP proposals such as Covenant and OP_CAT.However, the problem is that the first method is difficult to reach consensus in a short period of time, and there is uncertainty in the second method.

The AVM virtual machine provides a solution between the two. It directly builds the virtual machine execution environment on the Bitcoin main network.And define arbitrary rules of its digital assets.The basic idea is to allow developers to place smart contract code in the data segment of the transaction so that all relevant parties can execute.By storing the code on the blockchain, different relevant parties can easily synchronize the state by performing logic in the same way.

3. Working principle

We all know that the programming language of smart contracts should have at least the following key attributes: predictable running time, Turing completeability, and the ability to implement efficient execution on the resource restriction system.Judging from the above requirements, Bitcoin script is very suitable as a instruction set to define the creation and transfer rules of digital assets.Smart contract code is stored in Bitcoin transactions, covering the protocol indexes to execute these codes for various methods to call and transform.All relevant parties perform the same logic and achieve the same state conversion, thereby forming a spontaneous consensus.

Create and execute smart contracts covering digital assets by simulating Bitcoin virtual machines and their script interpreters.Bitcoin blockchain is used as a timestamp and data provider to store smart contract programs on the chain, but the execution of these programs is performed by the coverage protocol indexer when the sandbox is running.The cover protocol index node is jointly operated by application developers, service providers and users, thereby forming an emerging consensus:

1. Bitcoin script simulation: Bitcoin instruction set, the Turing complete attribute is achieved through the double stack PDA;

2. The operating environment of the sandbox: The entire simulator is in the controlled isolation environment, so that the execution of the sandbox and the execution of the sandbox will not interfere with each other;

3. Status hash: It allows participants to verify whether the status of its indexant is correctly synchronized, preventing the potential offensability of inconsistent status.

Simply put, AVM is to directly use the current limited storage space of BTC and the OP CODES processing framework to introduce a special encoding and decoding method by introducing a special encoding and decoding method in each BTC main network transaction, that is, the sandbox environment. This sandbox is the sandbox.The streamlined version of the Bitcoin script interpreter has some significant differences, such as directly accepting the execution of the scriptpubKey (Scriptsig), and various other data such as token status and protective memory of the memory. This environment can beComplete the storage and transaction records of a set of assets independently, and then the complex smart contract processing and status synchronization and verification can be achieved.

Fourth, future development

In the future, there are possible development of AVM. It provides a advanced execution environment that can handle smart contracts and DAPP, equipped with a custom instruction set for enhancing performance. At the same timeTreatment capabilities to improve throughput and scalability.At the same time, AVM realizes interoperability and cross -chain communication.Simply put, AVM allows the Atomicals protocol to perform various tasks, not just the simple tokens issuing mechanism before.After meeting the foundation of the needs of issuing assets and management assets, we can truly develop the Bitcoin ecosystem, and there will be more large -scale applications and system architecture.

Although there are many limitations of AVM, such as can only operate ARC20 assets, and the availability of a layer of smart contracts under the main network is still unknown. In addition, although the Bitcoin script language design is used for resource limitsThe environment and complex smart contracts may still consume a lot of computing resources, and there are still doubts in terms of execution efficiency.But its appearance is still exciting, looking forward to further technological innovation breakthroughs.

  • Related Posts

    A pre-provocative death: The money and human nature behind Jeffy’s fake death

    Jessy, bitchain vision Meme in the currency circle has released a new narrative: the death track. On May 6, an obituary of the death of Zerebro Jeffy Yu was released.…

    Binance removed from the shelves but soared. Alpaca dealer’s extreme trading

    Jessy, bitchain vision According to common sense, a token is removed from the exchange, which is a major negative news. However, this rule has not been perfectly reproduced on May…

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    This time Ethereum retail investors defeated institutions

    • By jakiro
    • May 15, 2025
    • 2 views
    This time Ethereum retail investors defeated institutions

    Bankless: Rebuilding Ethereum’s product and currency circulation mechanism

    • By jakiro
    • May 15, 2025
    • 2 views
    Bankless: Rebuilding Ethereum’s product and currency circulation mechanism

    9 important investment experiences of Buffett

    • By jakiro
    • May 15, 2025
    • 4 views
    9 important investment experiences of Buffett

    Wall Street Journal: Why did Buffett retire?Who is the next successor?

    • By jakiro
    • May 15, 2025
    • 7 views
    Wall Street Journal: Why did Buffett retire?Who is the next successor?

    Fartcoin’s farts resounded through Wall Street

    • By jakiro
    • May 14, 2025
    • 8 views
    Fartcoin’s farts resounded through Wall Street

    Eight narrative directions and related projects worth paying attention to

    • By jakiro
    • May 14, 2025
    • 10 views
    Eight narrative directions and related projects worth paying attention to
    Home
    News
    School
    Search