AVM is a beneficial proactive exploration based on the BTC mainnet Script script extension, which can drive some simple smart contracts to land on the BTC mainnet.
Author: Haotian
How to understand the latest release of AVM virtual machine white paper by @atomicalsxyz? In simple terms: It is a way to simulate the Bitcoin virtual machine, allowing the originally "stateless" Bitcoin mainnet to have the ability to carry smart contract systems, and thus be able to record and process more complex assets beyond BTC assets, similar to Turing-complete smart contracts. Next, I will share my understanding:
1) Bitcoin was originally designed as a peer-to-peer electronic cash system with a certain Script script data storage capability, as well as some basic OP Codes operation codes, and a set of asset verification logic based on UTXO time locks and spending conditions.
Therefore, the Bitcoin network can achieve asset management in a "stateless" manner when recording and transferring BTC assets. Due to the minimal UTXO model and predefined state transition rules, this stateless model can only handle limited management of individual BTC assets.
If attempting to add assets to the Bitcoin network, such as BRC20, ARC20, Runes, etc., a more complex dynamic "state machine" model is needed to record the storage, transactions, and state changes of these assets. How to achieve this?
One way is to use external protocols and layer2 off-chain solutions to build a "state machine" model for extension processing, such as the excellent current layer2 extension solutions like @NervosNetwork@RoochNetwork, and even native solutions like RGB, Lightning Network, etc. belong to this category;
Another way is to directly extend the functionality of the Script script by adding new operation codes or storage space to handle the creation and transfer of complex assets, such as Covenant and OP_CAT, which rely on BIP proposal standards that have been adopted.
Both of these approaches are either too "active" and difficult to achieve consensus unity in the short term, or too "passive" and have great uncertainty. The AVM virtual machine provides a special processing solution that is between the two, directly building a virtual machine execution environment on the Bitcoin mainnet.
2) How to do it? The main working principle of AVM includes three parts:
- Bitcoin script simulation, which is actually the Bitcoin instruction set, achieving Turing completeness through a double stack PDA (pushdown automaton) with storage capability;
- Sandbox execution environment, where the entire simulator is in a controlled isolation environment, ensuring that the execution inside the sandbox does not interfere with the outside execution;
- State hash, which allows participants to verify whether their indexer's state is correctly synchronized, preventing potential attacks from inconsistent states.
In simple terms: AVM directly utilizes the limited storage space and OP Codes processing framework of current BTC, by introducing a special encoding and decoding method (sandbox environment) in each BTC mainnet transaction.
This sandbox comes with an indexer, sandbox parser (instruction set), global database, etc., and can independently complete a set of asset storage, transaction state recording, and management, equivalent to embedding a dynamic "state machine" in the BTC mainnet, thereby enabling the processing of complex smart contracts, as well as state synchronization and verification.
3) With the AVM virtual machine, theoretically, the Bitcoin mainnet can have basic smart contract operation capabilities, allowing Bitcoin to manage multiple complex assets and the possibility of landing complex state logic DApps, essentially giving the Bitcoin network a certain self-built ecological function.
This is certainly a great advancement, at least on par with BTC extension capability innovations such as RGB, Lightning Network, and various excellent layer2 protocol processing solutions. It may even be superior to other solutions in the native aspect.
However, AVM relies on Bitcoin Script script encoding and storage, and also relies on OP Codes for transaction execution, so it is overall limited by the performance of the BTC mainnet, such as block storage space size, block speed, etc.
Imagine a DeFi project built on AVM, which can only process 7 transactions per minute and requires a ten-minute wait between two state transitions. Even if the smart contract is theoretically complete, it is still constrained. Moreover, developing complex contract functions using Bitcoin Script instruction set is more complex and difficult than developing smart contracts in languages like Ethereum Solidity.
Furthermore, the AVM white paper only clarifies a "Make Sense" built-in virtual machine execution method, and the actual deployment and stable operation in the application environment are still unknown.
In summary, I tend to view the development and implementation of AVM as a beneficial proactive exploration based on the BTC mainnet Script script extension, which can indeed drive some simple smart contracts to land on the BTC mainnet, and also enable the Bitcoin mainnet to play a larger role and value in the construction of layer2 ecology and various on-chain and off-chain combined ecology such as BitVM.
However, like other BTC extension solutions, AVM also has its advantages and disadvantages, and it needs to rely on the ecological construction after landing to enhance its "orthodoxy" attractiveness. It is recommended to maintain a rational, cautious, and optimistic attitude.
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。