Popular science: Bitcoin’s UTXO model

Synopsis

  • Bitcoin does not use the “account-balance” model to express value. On the contrary, it takes coins as the primary concept, and each money is held by Bitcoin users.
  • An unspent transaction output (UTXO) represents “a whole block” of Bitcoin. UTXO is used as input for Bitcoin transactions.
  • The UTXO model makes Bitcoin better than traditional financial systems in terms of auditability, transparency and efficiency.

What is UTXO?

An unspent transaction output (UTXO) represents a certain amount of Bitcoin. Multiple UTXOs can be combined, and a single UTXO can also be split to make any denomination required for payment.

We can understand UTXO as physical currency because they must be used as a complete unit. If you want to spend 50 cents, you can’t break a 1 dollar coin to pay. Instead, you have to spend the entire 1 yuan and then take 50 cents for change. However, unlike physical currencies, UTXO does not have a standard denomination. A UTXO can be any number of Bitcoins.

As the name suggests, a UTXO is the output of a Bitcoin transaction. The output exists in the form of UTXO until it is used as an input for another transaction, at which point it is no longer unspent.

At any point in time, the set of existing UTXOs is called the UTXO set. Bitcoin nodes track the UTXO set to determine which tokens have not been spent and who can spend them. This system allows Bitcoin to solve the problem of Double Spend. The problem of double spending is a major problem that has plagued digital currency attempts for a long time.

How was UTXO created?

New UTXOs are created by spending existing UTXOs. Every Bitcoin transaction consists of inputs and outputs. The input costs an existing UTXO, and the output creates a new UTXO.

So, if a new UTXO is created by destroying an existing UTXO, how did the original UTXO come from?

Coinbase transactions

Coinbase transaction is a special type of transaction that rewards miners who find a block by creating new bitcoins. Due to the creation of new bitcoins, coinbase transactions have no inputs, but will produce one or more outputs. Like all normal outputs, the output of a coinbase transaction is a new UTXO.

The history of each UTXO can be traced back to one or more outputs of the coinbase transaction.

Understand Bitcoin’s UTXO model

Bitcoin’s UTXO model is different from most digital currency systems. This is because Bitcoin is designed to be different from traditional financial systems. The original intention of Bitcoin is to achieve complete transparency, fairness and auditability. UTXO can help Bitcoin achieve these goals. So how does the UTXO model work?

Address and UTXO

In the traditional financial system, a transaction removes funds from one account and transfers it to another account. Bitcoin’s UTXO model does not have an account, so there is no special sender account/address. Although the address is used to receive UTXO, it will never be directly recorded on the blockchain. The Bitcoin address is the code of scriptPubKeys and is included in the output of each transaction.

When Bitcoin is spent, the input only contains the signature and public key necessary to execute the scriptPubKey, and there is no mention of which address on the blockchain the Bitcoin came from. However, the last address of UTXO can be easily calculated. Each transaction input uses the transaction id to indicate its previous transaction, and the index to indicate which output of the previous transaction is used (essentially, it refers to the existing UTXO). The scriptPubKey output of the quoted transaction can be converted into a Bitcoin address.

Bitcoin’s monetary policy

The UTXO model allows all Bitcoin nodes to reach a consensus on the existence of Bitcoin at any time. In other words, anyone can audit the total supply of Bitcoin to ensure that Bitcoin’s monetary policy is strictly followed.

UTXO combination and split

A Bitcoin transaction can contain any number of inputs and outputs. Therefore, users can arbitrarily combine and split UTXO to complete any amount of payment.

For example, Alice holds two UTXOs, each worth 0.5 BTC and 0.7 BTC . When she pays 1 BTC to Bob, she can use these two UTXOs as inputs, and then send the input of 1 BTC to Bob.

Popular science: Bitcoin's UTXO model

Alice also created an output of 0.199 BTC as change and sent it to herself. Due to the need to pay transaction fees, she cannot send 0.2 BTC to herself.

Transaction fees are not reflected in the form of transaction output (UTXO). It is calculated by the difference between the input value and the output value.

Transaction verification

The UTXO model allows Bitcoin nodes to effectively verify every transaction on the chain. When a node receives a transaction, regardless of whether the transaction has been packaged into the block, it can verify whether the UTXO in the transaction is really valid and has not been spent. Because of this, Bitcoin can solve the double-spending problem without relying on a trusted third party.

UTXO model vs. account model

Most financial systems (including banks and cryptocurrencies) do not use the UTXO model. Therefore, users do not rely on certain tokens to control assets, but use one or more accounts, and each account has a balance. The account model allows financial institutions and merchants to accurately record the borrowing and lending of personal accounts, avoiding change and currency selection issues.

The reliability of the account model

The advantage of the account model comes at the expense of transparency and auditability. It is impossible to audit the total amount of dollars in all bank accounts.

In addition, most account models suffer from issues such as chargebacks and account overdrafts. Since Bitcoin transactions must reference the UTXO to be spent, invalid transactions cannot be added to the blockchain.

Privacy issues of UTXO model

The UTXO model provides users with privacy advantages. Bitcoin users can store each UTXO in a different address for processing separately. In this way, users can hide the connections between UTXOs they hold and avoid exposure to the public. For blockchain observers, it becomes more difficult to determine which UTXO belongs to which user.

Bitcoin’s design greatly reduces the difficulty of generating new addresses. The account model system (especially in the traditional financial system) makes it very troublesome or even impossible to generate new accounts, forcing users to deposit all or most of their funds in one account.

Chain analysis companies try to destroy the privacy of Bitcoin and determine the ownership of UTXO through various methods. However, these methods rely on assumptions and indirect evidence rather than strict logic.

Related terms

Transaction

A transaction is a record of the transfer of Bitcoin from one address to another. All transactions are recorded in blocks on the blockchain.

UTXO set

The UTXO set is the set of all UTXOs that exist at a certain point in time. The total amount of all UTXOs is the current supply of Bitcoin.

Transaction ID (txid)

Transaction ID (txid) is a string of letters and numbers that identify a specific transaction. This string is just the hash value obtained by performing SHA 256 calculation twice on the transaction.

Multiple payment

The so-called multiple payment means that someone spends the same amount of money more than once, and makes one or both parties believe that they have received the money. Bitcoin uses a decentralized ledger and a time-stamped blockchain to solve the double-spending problem.

Scarcity

Currency scarcity refers to the difficulty of finding or creating currency. Although currency popularization is important, once currency can be easily created, it will have a negative impact on the economy.

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/popular-science-bitcoins-utxo-model/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-08-24 13:39
Next 2021-08-24 13:41

Related articles