Log In
Sign Up
Scan the QR code to download the mobile APP
More download choices
Notifications
Markets & Prices
No new notifications
More
Select language and region
简体中文
English
Tiếng Việt
繁體中文
Español
Русский
Français (Afrique)
Português (Portugal)
ไทย
Indonesia
日本語
بالعربية
Українська
Português (Brasil)
Rise/fall colour
Red for rise and green for fall
Green for rise and red for fall
Start-End Time of the Change
24H
UTC 00:00
UTC+8 00:00
Gate.io
BLOG
What is Unspent Transaction Output (UTXO...
What is Unspent Transaction Output (UTXO)?
2022-12-26, 00:38
[//]:content-type-MARKDOWN-DONOT-DELETE ![](https://gimg2.gateimg.com/image/article/1672015184WhatisUnspentTransactionOutput_web.jpeg) <font size=4>TL: DR</font> A UTXO is a digital currency that remains after a crypto transaction. UTXOs are continuously processed and are part of each transaction's beginning and end. When a transaction is finished, any unspent outputs are saved in a database as inputs for future transactions. UTXOs are essential in preventing double spending on the Blockchain and users from spending nonexistent coins. <font size=4>Introduction</font> The Unspent Transaction Output (UTXO) and Accounts Models are both cryptocurrency record-keeping methods used to represent the number of tokens an individual has left after completing a transaction on the Blockchain. These models are essential to how blockchain architecture maintains an accurate ledger while maintaining privacy. The term is basically used to define the result of transactions received and could spent in the future. Physical fiat currency is the best analogy for UTXOs. A UTXO cannot be divided into smaller denominations in the same way that coins or notes cannot. A UTXO can be considered a discrete chunk of its corresponding token controlled by its owner's private key. [Bitcoin](https://www.gate.io/trade/BTC_USDT) (BTC), [Litecoin](https://www.gate.io/trade/LTC_USDT) (LTC), [Bitcoin](https://www.gate.io/trade/BTC_USDT) Cash (BCH), and Zcash (ZEC), among others, use the UTXO model. <font size=4>What Exactly Is the Unspent Transaction Output (UTXO) Model?</font> The amount of digital currency left after a cryptocurrency transaction is described as an unspent transaction output (UTXO). It's similar to the change you get after buying something, but it's not a lower currency denomination. It's transaction output in the database generated by the network to allow for non-exact change transactions. As an accounting measure, the portion of the total cryptocurrency not spent in a transaction (output) is used in the next transaction (input). Each transaction, like double-entry accounting, has an input and an output. Consider 10 [Bitcoin](https://www.gate.io/trade/BTC_USDT) to be a bucket full of coins. Each coin represents a UTXO. If you pay 5 BTC for something from Stephanie, the network will give Stephanie the entire bucket of coins and return the 5 BTC you are owed in "change." You now have a UTXO worth 5 BTC that cannot be divided further. <font size=4>How does UTXO work?</font> Imagine you want to send 1.3 BTC from a balance of 1.5 BTC in your [Bitcoin](https://www.gate.io/trade/BTC_USDT) wallet address. This 1.5 BTC is probably an output from your previous transactions. Say, 0.9 BTC & 0.6 BTC, respectively. There are two outputs for your new transaction; the 1..3 BTC spent (sent to the receiver) and the 0.2 BTC unspent output, which is returned to your address( the sender). The remaining 0.2 BTC is either used in one of the following ways: Sent back to your account. Use part or the remaining amount as the transaction fee or Send the remaining amount is sent to someone else. [Bitcoin](https://www.gate.io/trade/BTC_USDT) nodes keeps track of these outputs to maintain a record of transactions. Each UTXO uses encoded _script_PubKeys to record each transaction & doesn't have a specific user associated with it.This allows the network to validate the existence of all related coins without revealing user’s private information. <font size=4>Importance of UTXO</font> The concept of UTXOs significantly simplified blockchain accounting. UTXOs allow each node to track information about unspent coins rather than tracking and storing every single transaction made and in order. It works because each coin can only be spent once on the [Bitcoin](https://www.gate.io/trade/BTC_USDT) network. That means every BTC in a wallet is unspent; either it was received as a mining reward or minted as a change during a transaction. UTXOs are essential in preventing double spending on the BlockchainBlockchain and preventing users from spending nonexistent coins. Each network node keeps a database of every UTXO in existence. <br/>What is an Account Model? A debit card or bank account is the most obvious analogy for the account model. In contrast to physical fiat currency, which cannot be divided into smaller denominations, an account model allows for the credit (or debit) of any arbitrary token amount. An account model wallet represents the user's aggregate balance, whereas UTXO wallets keep the total sum of a user's UTXOs. Among the projects that use the account model are Ethereum (ETH), Ethereum Classic (ETC), and Ripple (XRP). Unlike the UTXO model, transactions in the Account model represent a single transfer of funds or digital currency between accounts with no additional inputs or outputs required. All that is required is a ledger change. Differences between UTXO and Account Model While the UTXO and account models share the same objective, they each have benefits and drawbacks. <br/>• Scalability: Because storing a single balance takes significantly less memory than storing all of the UTXOs owned by that user, the account model makes better memory use. Account model transactions are smaller because they only require the amount, the sender, the recipient, and a digital signature. A typical Ethereum transaction is about 100 bytes, whereas a UTXO model transaction is several times larger. The parallelizability of UTXO transactions also facilitates the division of UTXO-based blockchains into shards and sidechains. The UTXO model allows for output aggregation and definition on the client side, reducing network computation requirements. Account models are more challenging to implement because each node must localize sender and recipient accounts across multiple shards. <br/>• Privacy: Because the UTXO model makes switching between addresses trivial, it becomes more challenging to track coin ownership. Addresses that are newly generated do not have a public owner. Hence, advanced chain analysis is usually required to link them to a specific user. The accounts model involves the reuse of a single address. As a result, such blockchains make identifying a transaction history much more accessible. In terms of fungibility, the account model, on the other hand, provides better privacy. <br/>• Smart Contract Functionality: The model benefits significantly from smart contract functionality due to accounts-based transactions' simplified and intuitive nature. Verifying a singular balance requires less computing power than calculating UTXO input/output logic, making it easier for DApp developers to program multi-party contracts and transactions. For example, the Ethereum Virtual Machine (EVM) can process transactions between multiple smart contracts by adjusting their respective balances. The UTXO model consumes significantly more resources because it involves explicit UTXO inputs and outputs across each transaction. Smart contracts written in a UTXO model must factor in the number of inputs to combine or, if multiple options exist, which inputs should be combined. <br/>• Security: Validator nodes in UTXO blockchains like [Bitcoin](https://www.gate.io/trade/BTC_USDT) keep track of the UTXO set to ascertain precisely which coins are in circulation and who has them. The UTXO system addresses the double-spend problem in an efficient and trustless manner because each transaction must reference the exact UTXOs being spent. Account model blockchains are far more vulnerable, frequently plagued by other issues such as chargebacks and overdrawn smart contracts. For example, throughout 2020, the Ethereum Classic project lost millions due to a series of double-spend attacks. <br/>Conclusion The UTXO model is a method of recording transactions on the Blockchain. Because different models have their advantages and disadvantages, the application of UTXO in any blockchain depends on the project's goals. Ethereum employs the account model because it is concerned with deploying robust smart contracts, whereas [Bitcoin](https://www.gate.io/trade/BTC_USDT) employs the UTXO model because it is more concerned with developing secured electronic cash. Newer projects are attempting to improve on these models. Cardano (ADA), Tron (TRX), and Qtum (QTUM), for example, have attempted to combine the benefits of both into advanced hybrid models. These models make it simpler for developers to use UTXO while retaining the power of smart contracts. Author - M. Olatunji, Gate.io Researcher <br/> Disclaimer: * This article represents only the views of the observers and does not constitute any investment suggestions. *Gate.io reserves all rights to this article. Reposting of the article will be permitted provided Gate.io is referenced. In all other cases, legal action will be taken due to copyright infringement.
Share
Content
A Model of Recording Transactions in Blockchain
Credit Ranking
Complete Gate Post tasks to upgrade your rank
Join Now
BTC/USDT
1.91%
ETH/USDT
2.2%
GT/USDT
5.05%
Related articles
Crypto Knowledge
Essentials for Crypto Newbie: What Is Layer 0, Layer 1 and Layer 2?
Scalability and Layer 0/1/2 are terms that are often mentioned in the cryptocurrency news. So what are Layer 0, Layer 1 and Layer 2 in the blockchain? And what are their respective features and uses?
2021-11-24, 03:44
Crypto Knowledge
Top 6 ways for Cryptocurrency Passive Income in 2021
2021-12-17, 07:22
Crypto Knowledge
The Sandbox: Everything You Need To Know
2021-12-23, 01:45