What is UTXO? How to split UTXO in Bitcoin?

GhSo...taPv
24 Apr 2024
48


Understanding how UTXO works is essential to using cryptocurrency safely and effectively and taking full advantage of its potential, especially splitting UTXO in the context of the Runes protocol. So what is UTXO? Which platform to use to split UTXO?


What is UTXO?

UTXO (Unspent Transaction Output) is a term that represents the remaining amount from a previous transaction and is continued to be used in the next transaction. It serves as the foundation for the operating model of many blockchains, the most popular being Bitcoin.


Some other blockchains also use UTXO, but they are customized to suit their own advantages: Sui uses OwnedObject almost similar to UTXO, Cardano uses the extended UTXO model - extended UTXO (eUTXO), Fuel uses an optimized UTXO with custom additional components such as witness…


UTXO is translated as “Unspent Transaction Output” or “Unspent Transaction Output".


How UTXOs are created

Operational model of UTXO

For the most intuitive and easy-to-understand view, below is an example of how UTXO works with a bank account and savings piggybank:


Bank accounts: When you deposit money in a bank, your money gets mixed with the money of all the other customers. Withdrawals may not return you the exact notes you deposited.

Deposit a savings piggy bank: You put money in the piggy bank, when you withdraw money, you will receive back the exact coins you put in the piggy bank.

UTXO in practice: Suppose, Alice sends 2 BTC from CEX to her wallet, then she sends 1 BTC to wallet A and wallet B respectively. However, the number of transactions and value of each send are the same. after:

Wallet address A: Send 1 BTC at once -> wallet A has 1 UTXO

Wallet B address: Send 2 times, 1 time 0.6 BTC and 1 time 0.4 BTC -> wallet B has 2 UTXO

So, as for the bank deposit model, the piggy bank and the UTXO, they all exist for the purpose of allowing users to use and transact. However, the way to store and pay will be different.


The bank account model is similar to the approach of the Ethereum platform - account base, asset statistics based on the final balance. The piggy bank model will be similar to how UTXO works.


More specifically, in the UTXO model, there will be two main factors: INPUT and OUTPUT. In there:

INPUT represents the value of assets held.


OUTPUT is a piece of computer code (script) that carries out the logic of the transaction that the user wants to execute.

A specific example:


Input:


Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6


Index: 0


scriptSig: 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6 cc8d25c6b241501


Output:


Value: 5000000000


scriptPubKey: OP_DUP OP_HASH160 404371705fa9bd789a2fcd52d2c580b65d35549d


OP_EQUALVERIFY OP_CHECKSIG


The simple operating model of UTXO is described in the Bitcoin whitepaper

Let's consider the above example, the data will be displayed as follows:


For 2 BTC transferred by Alice from the exchange to the wallet:


INPUT(Tx1) = NULL


OUTPUT(Tx1) = Alice receives 2 BTC from CEX


Step 1: Send 1 BTC to wallet A


Alice has 2 BTC: INPUT(Tx2) = OUTPUT(Tx1)


Alice sends 1 BTC to wallet A: OUTPUT(Tx2) = Alice transfers 1 BTC to address A


Alice receives 1 BTC back: OUTPUT(Tx2)’= Alice receives 1 BTC back


Step 2: Send 0.6 BTC to wallet B


Alice has 1 BTC: INPUT(Tx3)= OUTPUT(Tx2)’


Alice sends 0.6 BTC to wallet B: OUTPUT(Tx3)= Alice transfers 0.6 BTC to address B


Alice receives 0.4 BTC back: OUTPUT(Tx3)’= Alice receives 0.4 BTC back


Step 3: Send 0.4 BTC to wallet B


Alice has 0.4 BTC: INPUT(Tx4) = OUTPUT(Tx3)’


Alice sends 0.4 BTC to wallet C: OUTPUT(Tx4) = Alice transfers 0.4 BTC to address B


It can be seen that the total value of each wallet A and wallet B is 1 BTC. However, different sending methods and amounts will return different display results and data storage on the blockchain.


That is also how the UTXO model works.


Split UTXO - split UTXO

However, we do not always have enough balance or UTXO with the correct value for sending needs. Let's say you want to deposit 0.8 BTC:


In case (1) wallet A holds 1 UTXO worth 1 BTC


In case (2) wallet B holds 2 UTXOs worth 0.6 BTC and 0.4 BTC respectively


So what should you do now? The answer is that you need to split the UTXO (split UTXO) and do the following:


In case (1) wallet A, you need to exchange 1 UTXO of 1 BTC into 2 UTXOs valued at 0.8 BTC and 0.2 BTC respectively, then send the 0.8 BTC UTXO.


In case of (2) wallet B, you need to send 0.6 BTC or 0.4 BTC first, then the remaining part will continue to be exchanged for BTC to the missing value and send this part.


However, for the Bitcoin network with expensive transaction costs, splitting and sending multiple transactions is not an optimal solution. This creates disadvantages for the UTXO model.


To separate UTXOs, users can refer to the Luminex platform. The project allows users to split sats, create and split UTXOs with ease.

Compare Bitcoin's UTXO model with other blockchain


Instead of UTXO, Ethereum and some other popular blockchains use an account base model. They manage asset value through a blockchain ledger.


This helps these systems perform tasks on smart contracts more optimally in terms of execution and cost. In return, they also have their own disadvantages such as creating vulnerabilities in smart contract security, manipulating the ledger...


That is also the biggest difference that creates unique advantages and disadvantages for each model.


UTXO simulates how to use money with a piggy bank, returning a secure asset conversion and transaction method. However, the trade-off is high transaction fees and inconvenience when using.


Although account base is convenient and fast, it comes with the security risks that come with depending on smart contracts.


Advantages and disadvantages of the UTXO model


Advantage


High security: The UTXO model is highly secure thanks to the use of digital signatures and encryption in transactions. Using UTXO requires a valid private key. It is more difficult for fraudsters to impersonate or commit fraud compared to the traditional accounting ledger model.

Control: Users have complete control over their UTXOs and can choose how they are used. This provides great flexibility in managing crypto assets.

Transparency: All UTXOs are recorded on the blockchain, allowing anyone to check their balance and transaction history. This promotes transparency and safety in the cryptocurrency ecosystem.


Defect


Complexity: The UTXO model can be more difficult for users to understand. Managing multiple UTXOs can become cumbersome and requires some technical knowledge.

Transaction size: UTXO transactions can be larger in size than transactions in other models, resulting in higher transaction fees. This could affect the efficiency of using cryptocurrencies for small payments.

Usability: Using the UTXO may require more steps than other models, making it less convenient for new users.

The UTXO model offers many benefits in terms of security, control, and transparency, but also comes with some disadvantages such as complexity, large transaction sizes, and limited usability.


Choosing which model is suitable depends on each person's needs and purpose of using cryptocurrency.


Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to vuabaiyugioh

1 Comment

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.