Unspent transaction output
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
In cryptocurrencies, an unspent transaction output (UTXO) represents some amount of digital currency which has been authorized by one account to be spent by another. UTXOs use public key cryptography to identify and transfer ownership between holders of public/private key pairs. UTXOs are formatted with the recipient's public key, thus restricting the ability to spend that UTXO to the account which can prove ownership of the associated private key. The UTXO can only be spent if it includes the digital signature associated to the public key attached the last time it was sent.
Each UTXO represents a chain of ownership implemented as a chain of digital signatures going back to the origin of the coin which may come from mining, staking, or mint functions defined by the protocol.
Bitcoin is an example of a cryptocurrency that uses the UTXO model.[1] An extended version of the UTXO model is used for the Cardano blockchain.[2]
UTXO model vs. Account Model
The many cryptocurrencies that use the UTXO model do not use accounts or balances. Instead, individual coins (UTXOs) are transferred between users much like physical coins or cash.[3]
The UTXO model treats currency as objects. The history of a UTXO is stored only in the blocks when it is transferred, and to find the total balance of an account one must scan each block to find the latest UTXOs which point to that account. UTXOs are valid no matter their age; it is only necessary to acknowledge their ownership when they are sent, and not in each and every block. Though all nodes on a single chain must all agree on the block history, the relevant blocks to any single account's balance will likely be unique to that account.
An account model on the other hand keeps track of each account and its respective balance for every block added to the network. This allows one to easily check account balances without scanning historical blocks, but increases the raw size of each block (compression of unchanged account balances can reduce space requirements). Checking account balances is quicker, but like the UTXO model, fully verifying the origin of coins still requires auditing past blocks to the coins origin.
UTXO set
The total UTXOs present in a blockchain represents a set, every transaction consumes elements from this set and creates new ones that are added to the set. Thus, the set represents all of the coins in a particular cryptocurrency system. The complete UTXO set can be summed to calculate the total supply of a cryptocurrency at a given point in time.[4]
Outputs are a superset of UTXOs. Accordingly, UTXOs are a subset of the outputs superset. Bitcoin UTXO lifespans have been studied.[5]
In the case of a valid blockchain transaction, unspent outputs (and only unspent outputs) may be used to fund further transactions. The requirement that only unspent outputs may be used in further transactions is necessary to prevent double-spending and fraud.
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.
Origins
The UTXO model can be attributed to Hal Finney's Reusable Proofs of Work proposal,[6] which itself is based on Adam Back's 1997 Hashcash proposal.[7]
See also
References
- ^ Delgado-Segura, S., Pérez-Sola, C., Navarro-Arribas, G., & Herrera-Joancomartí, J. (2018) "Analysis of the Bitcoin UTXO set" in International Conference on Financial Cryptography and Data Security (pp. 78-91). Springer, Berlin, Heidelberg. https://link.springer.com/chapter/10.1007/978-3-662-58820-8_6
- ^ Chakravarty, M. M., Chapman, J., MacKenzie, K., Melkonian, O., Peyton Jones, M., & Wadler, P. (2020) “The extended UTXO model”, in International Conference on Financial Cryptography and Data Security (pp. 525-539). Springer, Cham. https://link.springer.com/chapter/10.1007/978-3-030-54455-3_37
- ^ "Unspent Transaction Output (UTXO)". river.com/learn/. December 15, 2020.
- ^ "UTXO Set". river.com/learn/. December 15, 2020.
- ^ "Bitcoin UTXO Lifespan Prediction" (PDF). cs229.stanford.edu. December 11, 2015.
- ^ "Reusable Proofs of Work". nakamotoinstitute.org. August 16, 2004.
- ^ "Hashcash - A Denial of Service Counter-Measure". hashcash.org. March 28, 1997.