UTXO
What is UTXO?
UTXO stands for An Unspent Transaction Output. It is one of the key concepts in bitcoin design and it is closed related to modern "payment, settlement, clearance" process in financial system.
Current "payment, settlement, clearance" process
There is rarely direct transaction between two parties. Buying a coffee with cash is the case where the transaction complete immediately. In other words, the ownerships of "coffee" and "cash" exchange simultaneously. But in most cases, there exists financial institution services, like bank card, Paypal and Stripe, that help you do "payment".
What’s behind the "payment" is quite complex. After you paying, the money is not in sellers' pocket immediately. It typically spend a few days to collect the transaction information, check whether the data in vendors match the data in payment agencies. This is called "Balance”. Sometimes, there are more parties involved. So you need to check the transaction balance of all parties. After that, the transaction completes.
But the world is much more complex, you need to have risk management department to manually or automatically find flaw and scam from sea of data. Sometimes, the time vendors receiving money could be delayed for some reasons like transactions at the time of 23:59, 00:00. It is serious that you didn’t give money on time. So there are "grace period" to forgive this case occasionally. The whole process after payment is called settlement. But there are still disputes between parties. Even we settle it down by law.These process of ending the transaction completely is called clearance.
UTXO in bitcoin simplified the concept set involved in transactions
As mentioned before, the reason we introduce "payment, settlement, clearance" process is that transaction, the exchange of ownership could not finish simultaneously. For bitcoin, it makes p2p transactions available without third parties involved. So these concepts are redundant in bitcoin network. And UTXO is primitive. You can not break down the UTXO transaction. This remove the cost of managing account states and lower the risk of being attacked like Ethereum once faced, which finally rolled back the stolen eth coins but rose concerns about centralisation of influence and violation of immutability, which after hard fork, became two coins: ethereum and ethereum classic.
UTXO in real case
Actually you wallet balance is a combination of all UTXO values related to your public keys.
For bitcoin mining, it store all UTXO set to keep check of UTXO much faster. But there are concerns about the size of UTXO storage.
Research in UTXO storage explosition problem
In academic world, it is an important research direction to limit the size or even make the storage size constant. One promising technique is RSA accumulator. Stanford University professor introduced novel solution in his paper “Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains” coauthored with Benedikt Bünz and Ben Fisch.
But what is sad is that RSA accumulator can not survive in quantum computing. Another promising solution is proposed by MIT professor Thaddeus Dryja in his paper “Utreexo: A dynamic hash-based accumulator optimized for the Bitcoin UTXO set”, which used quantum-resistant cryptography knowledge.