What is QTUM? Programmerexplains
The main idea of Qtum is totake Bitcoin core code which they have done, change PoW to PoS and then put theEthereum virtual machine on top of it, making it compatible with Ethereum smartcontracts running on it. So as you can take the Ethereum smart contract anddeploy it on Qtum blockchain without any modifications, because Qtum have theEthereum virtual machine running on top of the Bitcoin software, but slightlymodified Bitcoin Software. So the whole idea is to take the both best parts ofboth worlds from Bitcoin & Ethereum and make this project that isindustrial-ready. So we are going to discuss how they make it possible and howthey actually bridge the gap between Bitcoin and Ethereum. At the end we’regoing to talk about the threats and risks with this project.
Something we have tounderstand is that Bitcoin and Ethereum are built slightly different. InBitcoin we have “Unspent transaction output(UXTO)”. We will talk about howBitcoin transaction work on the next slide and they are based on UXTO and youwill understand how it works. However Ethereum is built a bit differently, theyuse “Account model”. So the challenge of Qtum is to combine UTXO and accountmodel, in order to be a hybrid between Bitcoin and Ethereum. Qtum needs tosomehow solve this difference.
First of all let’sunderstand what’s UTXO and how transactions work on Bitcoin. So, a Bitcointransaction has a set of inputs and a set of outputs. A a transaction takessome inputs and produces some outputs. Those outputs can be in turn and used byother transactions. Bitcoin transaction usually has inputs and a bunch ofoutputs, some of these outputs are used in the next transaction, and some otheroutputs are used in other transactions, rest of the outputs are left unspent.So when we are talking about UXTO, we are talking about that each transactionhas a bunch of outputs, one or several outputs, and then these output can thenbe in turn, be used in order to build up new transaction. In that sense, Bitcoindoesn’t track your Balance. When you open your wallet you might see that youhave 1.2 Bitcoin. The 1.2 Bitcoin is not stored anywhere on the Blockchain,Bitcoin Blockchain doesn’t keep track of that at all, it keeps track oftransactions and transaction outputs. When your wallet displays you yourbalance, what it does is to add all of the unspent transaction that yourprivate keys control. This is an abstraction your wallet does, it looks at yourprivate keys and it checks the Blockchain and looks which unspent transactionoutputs does these private keys control and then add all of them together,displays you your balance. When you’re making a new transaction, your walletwill construct a transaction with some inputs and outputs. One outputs might goto your recipient, another might go back to you. This is something you cannotsee, because this is happening under the hood, your wallet is user friendly,most often it will just ask you for a recipient address, and the amount youwant to send. The reason why Qtum has decided to base their project on UXTO isbecause Qtum wants to make the whole ecosystem Bitcoin progress compatible, sothat when Bitcoin announced lightning or other innovations, it will be easierfor Qtum to adapt. Also because of the SPVs, Qtum could have lightweightclients for mobile devices. So that UTXO is at the core of Bitcoin and also atcore of Qtum.
Then how does Qtum bridgethe gap to Ethereum? In Ethereum instead we have a way simpler model calledaccount model and Ethereum does track Account’s Ether balance, Account’scontract code and storage.
The challenging issue forQtum is to connect these 2 technologies. They connected Ethereum’s accountmodel and Qtum’s UTXO model based on Bitcoin by implementing “AccountAbstracting Layer(AAL)”. The idea of Qtum is to put Ethereum virtual machine ontop of Qtum’s UTXO model without major modification,and make it communicate andrun on the UTXO system.
To do that, Qtum built the “
Abstract Account Layer
(AAL)” in between. So the EVM justcommunicate with the Abstract Account Layer and doesn’t know about the UTXO atall, it only cares about how it usually works. Generally speaking, the EVMusually only works on the Ethereum Blockchain and the AAL’s work it to do thetranslation to UTXO, then the EMV and UTXO could communicate with each other.This is extremely common in software development, when you have 2 systems, theydon’t have to care each other because they have another layer in between whichmakes all the communications possible. So this is the technological aspect ofQtum.