7

I always thought that between Bitcoin and Ethereum only the latter had a virtual machine.

The answer to this thread opened my eyes to the fact that Bitcoin actual has a virtual machine. However, I wonder if there's a distinction between the two in terms of what is being categorized as 'virtual machine'. For instance, the EVM can run smart contracts. It's unclear to me whether one can do something similar in the Bitcoin virtual machine. But then again this distinction may not be necessary nor sufficient to claim that Bitcoin does not have a virtual machine similar to Ethereum's.

2 Answers 2

12

"Virtual machine" in this context is really just a fancy word for bytecode interpreter. Bitcoin's script language is certainly far simpler than Ethereum's EVM, and its functionalities are in many ways intentionally limited, but I don't think you can call one a VM without also including the other.

Ultimately this question is one about the semantics of what is considered a VM, which is probably more an opinion-based one than a technical one.

3

Is it correct to say that Bitcoin has a virtual machine in the same way as Ethereum does?

Short answer: No

Long answer:

The creation of a contract in Ethereum is a transaction in which its data field contains the compiled bytecode. Transaction is included in a block and then bytecode is executed.

Why Ethereum needs VM is something Ethereum devs can answer better, however according to my understanding:

  1. Turing completeness (Problems: https://bitcoin.stackexchange.com/a/105931/)
  2. Parallelization of smart contract execution (Possible without EVM: https://medium.com/bit-matrix/how-does-bitmatrix-achieve-parallel-processing-in-a-utxo-model-6ef70141bd59)

A smart contract is not just the code written in solidity and deployed on chains that use VMs.

Smart contract is any digital contract that minimizes trust. What can the smart contract do? What is the language used? Is it deployed using EVM? All these are irrelevant to define a code as smart contract.

Smart contracts are possible on Bitcoin but with limited functionality. There is nothing like EVM in Bitcoin AFAIK. However lot of things are possible using layer 2 (LN and Sidechains) and scripting is going to improve with Taproot.

Related questions:

Bitcoin and Smart Contracts

Can smart contracts be set up on a side chain or 2nd layer solution?

Is there a tool like Ethereum EVM at present for Bitcoin script?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.