Unspent transaction output

Last updated

In cryptocurrencies, an unspent transaction output (UTXO) is a distinctive element in a subset of digital currency models. A UTXO represents a certain amount of cryptocurrency that has been authorized by a sender and is available to be spent by a recipient. The utilization of UTXOs in transaction processes is a key feature of many cryptocurrencies, but it primarily characterizes those implementing the UTXO model. [1]

Contents

UTXOs employ public key cryptography to ascertain and transfer ownership. More specifically, the recipient's public key is formatted into the UTXO, thereby limiting the capability to spend the UTXO to the account that can demonstrate ownership of the corresponding private key. A valid digital signature associated with the public key must be included for the UTXO to be spent. [2]

UTXOs constitute a chain of ownership depicted as a series of digital signatures dating back to the coin's inception, regardless of whether the coin was minted via mining, staking, or another procedure determined by the cryptocurrency protocol. [2]

Prominent examples of cryptocurrencies adopting the UTXO model include Bitcoin and Cardano. Cardano utilizes an extended version of the UTXO model known as EUTXO. [3]

Comparison: UTXO Model vs. Account Model

Cryptocurrencies that utilize the UTXO model function differently compared to those using the account model. In the UTXO model, individual units of cryptocurrency, termed as unspent transaction outputs (UTXOs), are transferred between users, analogous to the exchange of physical cash. [4] This model impacts how transactions and ownership are recorded and verified within the blockchain network.

In the UTXO model, each unit of currency is treated as a discrete object. The history of a UTXO is documented only within the blocks where it is transferred. To ascertain the total balance of an account, one must scan each block to find the latest UTXOs linked to that account. While all nodes within a blockchain network must consent on the block history, the blocks relevant to an account's balance are unique to that account.

On the contrary, the account model preserves a record of each account and its corresponding balance for every block added to the network. This setup enables quicker balance verification without the need to scan historical blocks, but it increases the raw size of each block (though data compression techniques can be utilized to alleviate this). Regardless of these disparities, both models necessitate the inspection of past blocks to fully authenticate the origin of coins.

In the UTXO model, each object is immutable - units of coins cannot be 'edited' in the same way an account balance is modified when a transaction occurs. Rather, the balance is computed from the transaction history dating back to when the coins were first minted. This simplicity enhances security as a UTXO either exists in its anticipated form or it does not. In contrast, the account model requires meticulous verification of the account's status during transactions, which can lead to oversights if not conducted correctly.

The UTXO model's inherent characteristics also make it well-suited for off-chain protocols, such as sidechains and the Lightning Network. Conversely, the account model simplifies the task of storing the 'state' of transactions, but this ease doesn't necessarily imply superiority. The Extended UTXO (EUTXO) model, for example, introduces more explicit and cleaner state transitions, reducing the potential for unexpected outcomes. Although the EUTXO model may be more complex to handle, it offers enhanced security and straightforwardness.

UTXO set

The collective of UTXOs present in a blockchain constitutes a set. Each transaction in the network removes some elements from this set (those being spent) and adds new ones (those being created). This UTXO set effectively represents all the coins within a specific cryptocurrency system at a given time. [5]

In a broader sense, outputs are a superset of UTXOs, making UTXOs a subset of the outputs. This relationship and the dynamics of UTXOs, such as their lifespan within Bitcoin's system, have been subjects of research. [6]

In valid blockchain transactions, only unspent outputs (UTXOs) are permissible for funding subsequent transactions. This requirement is critical to prevent double-spending and fraud. Accordingly, inputs in a transaction are removed from the UTXO set, while outputs create new UTXOs that are added to the set. The holders of private keys, such as those with cryptocurrency wallets, can utilize these UTXOs for future transactions. [1]

For this reason, inputs on a blockchain are removed from the UTXO set when a transaction occurs, whilst at the same time, outputs create new UTXOs, which are added to the UTXO set. These unspent transaction outputs may be used (by the holders of private keys; for example, persons with cryptocurrency wallets) for the purpose of future transactions.[ citation needed ]

Origins

The conceptual framework of the UTXO model can be traced back to Hal Finney's Reusable Proofs of Work proposal, [7] which itself was based on Adam Back's 1997 Hashcash proposal. [8] Bitcoin, released in 2009, was the first widespread implementation of the UTXO model in practice. [1]

The Extended UTXO (EUTXO) Model

The Extended UTXO (EUTXO) model is an advanced iteration of the traditional Unspent Transaction Output (UTXO) model. It expands on the fundamental UTXO model, incorporating enhanced features to increase flexibility and utility while maintaining the model's inherent advantages in security, predictability, and parallelizability. [9]

In the EUTXO model, UTXOs can be linked to arbitrary pieces of data and logic in the form of smart contracts. This allows UTXOs to carry state in a way that remains compatible with the parallel processing of transactions and the predictable resource consumption inherent to the UTXO model. It results in more expressive and complex contracts compared to those feasible under the basic UTXO model, bridging the gap between the UTXO and account models in terms of contract functionality.

Each UTXO in the EUTXO model is associated with a data value that can change as the UTXO is consumed and new ones are created, allowing contracts to maintain state across transactions. This enriched data structure offers the EUTXO model an extended ability to facilitate smart contract development while still maintaining the immutability and auditability of the standard UTXO model.

The EUTXO model is used in cryptocurrencies like the Cardano blockchain to facilitate more complex financial transactions and automated scripts. It serves as the basis for Plutus, Cardano's smart contract development platform, and allows it to handle complex, stateful contracts while maintaining a high level of security and predictability. [9]

Despite its added complexity, the EUTXO model maintains the critical advantages of the UTXO model. It preserves predictable resource consumption, a valuable property for contract execution, and it supports high degrees of parallelism for transaction processing, a crucial feature for blockchain scalability.

See also

Related Research Articles

Financial cryptography is the use of cryptography in applications in which financial loss could result from subversion of the message system. Financial cryptography is distinguished from traditional cryptography in that for most of recorded history, cryptography has been used almost entirely for military and diplomatic purposes.

A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to the terms of a contract or an agreement. The objectives of smart contracts are the reduction of need for trusted intermediators, arbitration costs, and fraud losses, as well as the reduction of malicious and accidental exceptions. Smart contracts are commonly associated with cryptocurrencies, and the smart contracts introduced by Ethereum are generally considered a fundamental building block for decentralized finance (DeFi) and NFT applications.

Double-spending is a fundamental flaw in a digital cash protocol in which the same single digital token can be spent more than once. Due to the nature of information space, in comparison to physical space, a digital token is inherently almost infinitely duplicable or falsifiable, leading to ownership of said token itself being undefinable unless declared so by a chosen authority. As with counterfeit money, such double-spending leads to inflation by creating a new amount of copied currency that did not previously exist. Like all increasingly abundant resources, this devalues the currency relative to other monetary units or goods and diminishes user trust as well as the circulation and retention of the currency.

<span class="mw-page-title-main">Bitcoin</span> Decentralized digital currency

Bitcoin is a decentralized digital currency. Bitcoin transactions are verified by network nodes through cryptography and recorded in a public distributed ledger called a blockchain. The cryptocurrency was invented in 2008 by an unknown entity under the name Satoshi Nakamoto. The currency began use in 2009, when its implementation was released as open-source software. The word "bitcoin" was defined in a white paper published on October 31, 2008. It is a compound of the words bit and coin.

<span class="mw-page-title-main">Cryptocurrency</span> Digital currency not reliant on a central authority

A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority, such as a government or bank, to uphold or maintain it. It is a decentralized system for verifying that the parties to a transaction have the money they claim to have, eliminating the need for traditional intermediaries, such as banks, when funds are being transferred between two entities.

<span class="mw-page-title-main">Bitcoin network</span> Peer-to-peer network that processes and records bitcoin transactions

The Bitcoin network is a peer-to-peer network of nodes which implement the Bitcoin protocol. The protocol itself implements a highly available, public, and decentralized ledger. The nodes verify that each update to the ledger follows the rules of the Bitcoin protocol.

Zerocoin is a privacy protocol proposed in 2013 by Johns Hopkins University professor Matthew D. Green and his graduate students, Ian Miers and Christina Garman. It was designed as an extension to the Bitcoin protocol that would improve Bitcoin transactions' anonymity by having coin-mixing capabilities natively built into the protocol. Zerocoin is not currently compatible with Bitcoin.

<span class="mw-page-title-main">Ethereum</span> Open-source blockchain computing platform

Ethereum is a decentralized blockchain with smart contract functionality. Ether is the native cryptocurrency of the platform. Among cryptocurrencies, ether is second only to bitcoin in market capitalization. It is open-source software.

A blockchain is a distributed ledger with growing lists of records (blocks) that are securely linked together via cryptographic hashes. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. Since each block contains information about the previous block, they effectively form a chain, with each additional block linking to the ones before it. Consequently, blockchain transactions are irreversible in that, once they are recorded, the data in any given block cannot be altered retroactively without altering all subsequent blocks.

Monero is a cryptocurrency which uses a blockchain with privacy-enhancing technologies to obfuscate transactions to achieve anonymity and fungibility. Observers cannot decipher addresses trading Monero, transaction amounts, address balances, or transaction histories.

A decentralised application is an application that can operate autonomously, typically through the use of smart contracts, that run on a decentralized computing, blockchain or other distributed ledger system. Like traditional applications, DApps provide some function or utility to its users. However, unlike traditional applications, DApps operate without human intervention and are not owned by any one entity, rather DApps distribute tokens that represent ownership. These tokens are distributed according to a programmed algorithm to the users of the system, diluting ownership and control of the DApp. Without any one entity controlling the system, the application is therefore decentralised.

A distributed ledger is the consensus of replicated, shared, and synchronized digital data that is geographically spread (distributed) across many sites, countries, or institutions. In contrast to a centralized database, a distributed ledger does not require a central administrator, and consequently does not have a single (central) point-of-failure.

<span class="mw-page-title-main">Ethereum Classic</span> Blockchain computing platform

Ethereum Classic is a blockchain-based distributed computing platform which offers smart contract (scripting) functionality. It is open source and supports a modified version of Nakamoto consensus via transaction-based state transitions executed on a public Ethereum Virtual Machine (EVM).

<span class="mw-page-title-main">Cardano (blockchain platform)</span> Public blockchain platform

Cardano is a public blockchain platform. It is open-source and decentralized, with consensus achieved using proof of stake. It can facilitate peer-to-peer transactions with its internal cryptocurrency, ADA.

Segregated Witness, or SegWit, is the name used for an implemented soft fork change in the transaction format of Bitcoin.

A cryptocurrency wallet is a device, physical medium, program or a service which stores the public and/or private keys for cryptocurrency transactions. In addition to this basic function of storing the keys, a cryptocurrency wallet more often offers the functionality of encrypting and/or signing information. Signing can for example result in executing a smart contract, a cryptocurrency transaction, identification, or legally signing a 'document'.

<span class="mw-page-title-main">Polkadot (cryptocurrency)</span> Cryptocurrency

Polkadot is a blockchain platform and cryptocurrency. The native cryptocurrency for the Polkadot blockchain is the DOT. It is designed to allow blockchains to exchange messages and perform transactions with each other without a trusted third-party. This allows for cross-chain transfers of data or assets, between different blockchains, and for decentralized applications (DApps) to be built using the Polkadot Network.

A blockchain is a shared database that records transactions between two parties in an immutable ledger. Blockchain documents and confirms pseudonymous ownership of all transactions in a verifiable and sustainable way. After a transaction is validated and cryptographically verified by other participants or nodes in the network, it is made into a "block" on the blockchain. A block contains information about the time the transaction occurred, previous transactions, and details about the transaction. Once recorded as a block, transactions are ordered chronologically and cannot be altered. This technology rose to popularity after the creation of Bitcoin, the first application of blockchain technology, which has since catalyzed other cryptocurrencies and applications.

Colored Coins is an open-source protocol built on the Bitcoin 2.0 that allows users to represent and manipulate immutable digital resources on top of Bitcoin transactions. They are a class of methods for representing and maintaining real-world assets on the Bitcoin blockchain, which may be used to establish asset ownership. Colored coins are bitcoins with a mark on them that specifies what they may be used for. Colored coins are also considered the initial step toward NFTs built on top of the Bitcoin network.

Nervos Network is an open-source blockchain platform. It consists of multiple blockchain layers that are designed for different functions. The foundational layer is known as the Common Knowledge Base, whilst the native cryptocurrency of this layer is called CKB. This foundational layer uses a proof-of-work consensus model. Other blockchains on the platform can use proof-of-stake consenus models. Smart contracts and decentralized applications can be deployed on any layer.

References

  1. 1 2 3 Antonopoulos, Andreas M. (2017). Mastering Bitcoin: Unlocking Digital Cryptocurrencies. O'Reilly Media, Inc.
  2. 1 2 Delgado-Segura, Sergi; Pérez-Sola, Cristina; Navarro-Arribas, Guillermo; Herrera-Joancomartí, Jordi (2018). "Analysis of the Bitcoin UTXO set". International Conference on Financial Cryptography and Data Security. Springer: 78–91. doi:10.1007/978-3-662-58820-8_6.
  3. Chakravarty, Manuel M.T.; Chapman, James; MacKenzie, Kenneth; Melkonian, Orestis; Peyton Jones, Michael; Wadler, Philip (2020). "The extended UTXO model". International Conference on Financial Cryptography and Data Security. Springer: 525–539. doi:10.1007/978-3-030-54455-3_37.
  4. "Unspent Transaction Output (UTXO)". river.com/learn/. December 15, 2020.
  5. "UTXO Set". river.com/learn/. December 15, 2020.
  6. "Bitcoin UTXO Lifespan Prediction" (PDF). cs229.stanford.edu. December 11, 2015.
  7. "Reusable Proofs of Work". nakamotoinstitute.org. August 16, 2004.
  8. "Hashcash - A Denial of Service Counter-Measure". hashcash.org. March 28, 1997.
  9. 1 2 Chakravarty, Manuel M. T.; Chapman, James; MacKenzie, Kenneth; Melkonian, Orestis; Peyton Jones, Michael; Wadler, Philip (2020). Bernhard, Matthew; Bracciali, Andrea; Camp, L. Jean; Matsuo, Shin'ichiro; Maurushat, Alana; Rønne, Peter B.; Sala, Massimiliano (eds.). "The Extended UTXO Model". Financial Cryptography and Data Security. Lecture Notes in Computer Science. Cham: Springer International Publishing: 525–539. doi:10.1007/978-3-030-54455-3_37. ISBN   978-3-030-54455-3.