Search

A quick intro to the Unspent Transaction Output (UTXO)

We're all accustomed to the way our banks make the accounting with our money. Traditional accounting documents the flow of funds between different accounts. UTXO, by contrast, focuses on the flow of funds from transaction to transaction.


Every transaction has inputs (amount coming from where other people are spending the money) and outputs (where this money is going in a new transaction). The body of a transaction can contain other data as well. The Unspent Transaction Output (UTXO) paradigm is an essential part of Cryptocurrency and many others. This post tries to serve as a quick intro to UTXO.


Accounting in a blockchain (Photo by @stellrweb on Unsplash)

The consumer uses a digital signature to validate the inputs' possession, which ultimately must correspond to outputs. The consumed UTXOs are now called "spent."


UTXO accounting style is a convenient mechanism for redistributing the cash flow from several contributors to the desired payees. The "bucket" where all this cash is temporarily stored/bundled is called a Transaction. In the interim, the transaction results become new UTXOs - to be included later on in a new transaction. When anyone sends some amount of a coin (bitcoin, Cardano ADA), one or more locked unspent (UTXO) outputs are activated to function as the same coin input.

If you have read the previous post in this blog, you'll see that this mechanism shares many Smart Contracts characteristics. However, as we're used to the traditional accounting method, UTXO is not an intuitive way of moving funds.




UTXO Structure

Underneath every transaction, there is a ledger to record all of them along with their internal details. The Ledger record that contains the transaction information is called a UTXO: Unspent Transaction Outputs.


This record is a map with keys and values. The Keys are the transaction IDs and one or more output indexes (a transaction can have many outputs), while the values are pairs of ADA amounts and wallet addresses.



Processing a transaction involves updating the UTXO on the ledger that makes the funds spent (recorded inside the transaction) available to be consumed by the owners of the addresses listed in the outputs.




Transaction validation


The validation of a transaction is not an easy task. The validation implies calculating the total amount of ADA in the outputs and inputs of the transaction. The treasury is the destination for the ADA spent besides adding them as UTXO entries. All the deposits and fees are paid inside the treasury. There are output entries with no matching inputs: These are the rewards that the network pays to delegators, collected from rewards addresses. Every transaction also includes much more info: hashes, scripts, witnesses, and certificates.


Validation also implies more calculations to ensure that no ADA is created from thin air. These calculations take into account the ADA in the transaction and the other accounts in the ledger. This process is called Generalized Accounting Property (GAP).


UTXO also implements protection against double-spending: Network users can't spend outputs more than once. This protection, along with the GAP, disables bad or dishonest behavior between the network participants. It also ensures that the total amount of ADA in existence does not change.




The UTXO Set


There is a global network database that keeps track of all the spendable outputs. When a new transaction is being constructed, it uses the spendable Outputs exposed by the UTXO Set. The Outputs selected are removed from the UTXO set resulting in its shrinkage. On the other side, when new unspent output is created, the UTXO Set grows accordingly.




Advantages


  1. Security and simplicity. A UTXO is "consumed" thoroughly after spending, so the system avoids double-spending.

  2. Every user can use a new address for every transaction that she makes. This characteristic provides users privacy, making it very difficult to associate a set of coins with a specific user.

  3. When a new transaction is committed, and the UTXO is spent inside it, the UTXO is destroyed, and more UTXO are crated. The UTXO is updated accordingly. Nodes can verify transactions in parallel independently.



Disadvantages


  1. UTXO is not an intuitive model. We're used to thinking about accounts when we're dealing with money.

  2. Traditional mechanisms are easier to manage: Multiple account numbers make UI/UX difficult for wallet designers.

  3. The UTXO model requires multiple signatures from multiple parties when dealing with Smart Contracts and, at the same time, access outside blockchain data with Oracles. Some Smart Contract platforms use a hybrid model: UTXO keeping track of balances and Accounts for Smart Contracts.



Conclusion


The majority of working blockchains use the UTXO model (except Ethereum, which uses the traditional Account Model). The UTXO is not an easy concept; at least the first time you are confronted with it. But once you're accustomed, it is a logical and handy choice for the development of blockchains. In the UTXO way of thinking, your money (coins) is exactly the UTXO that can be unlocked with your private keys. Verification is the main objective behind the UTXO model, but this comes at a cost: It is computationally more complex, introduces usability challenges, and puts some difficulty to Smart Contracts.

  • Twitter
  • LinkedIn
  • Facebook
  • Instagram
  • RSS

SUBSCRIBE TO THE NEWSLETTER

SUBSCRIBE TO THE NEWSLETTER

The advice provided on this website is general advice only. It has been prepared without taking into account your objectives, financial situation, or needs. All statements made on this website are made in good faith and we believe they are accurate and reliable. This website disclaims all and any guarantees, undertakings, and warranties, expressed or implied, and shall not be liable for any loss or damage whatsoever (including human or computer error, negligent or otherwise, or incidental or consequential loss or damage) arising out of or in connection with any use or reliance on the information or advice on this site. Before acting on this advice you should consider the appropriateness of the advice, having regard to your objectives, financial situation, and needs. Where any product(s) is/are detailed on this website, you should obtain a Product Disclosure Statement relating to the product(s), consider its contents and obtain professional advice before making any decisions. The information on this website is not a substitute for financial advice. Past performance is not indicative of future performance. Cardano™ is a trademark of Cardano Foundation, CHE-184.477.354, Dammstrasse 16, 6300 Zug, Switzerland, in Switzerland and other countries.  Copyright © 2020 by Vantica Trading. All rights reserved.. Madrid  Spain.

We receive, collect, and store any information you enter on our website or provide us in any other way. In addition, we collect the Internet protocol (IP) address used to connect your computer to the Internet; login; e-mail address; password; computer and connection information and purchase history. We may use software tools to measure and collect session information, including page response times, length of visits to certain pages, page interaction information, and methods used to browse away from the page. We also collect personally identifiable information (including name, email, password, communications); payment details (including credit card information), comments, feedback, product reviews, recommendations, and personal profile. Our website is hosted on the Wix.com platform. Wix.com provides us with an online platform that allows us to sell our products and services to you. Your data may be stored through Wix.com’s data storage, databases, and general Wix.com applications. They store your data on secure servers behind a firewall. All direct payment gateways offered by Wix.com and used by our company adhere to the standards set by PCI-DSS as managed by the PCI Security Standards Council, which is a joint effort of brands like Visa, MasterCard, American Express and Discover. PCI-DSS requirements help ensure the secure handling of credit card information by our store and its service providers... Please read our complete  Privacy Policy© 2021 by Vantica Trading,

[Valid RSS]