I have talked about UTXO in an article before. You can read this article first. I will also briefly mention it here.
Cryptoverse: Important Parameters for Bitcoin Data Analysis: UTXO0 Agree · 0 Comments Article
In the accounting method of the blockchain, there are mainly two different accounting methods. One is the UTXO accounting method like BTC and LTC, and the other is the account-based accounting method such as ETH.
In the UTXO chainProtocol layer, no account or wallet exists.
The wallet is used to handle the cash in the wallet
Money in the wallet is unspent, and transactions are created by consuming existing UTXOs and generating new UTXOs. UTXOs can be split or merged to achieve the required denomination for a given transaction. This concept can be illustrated through a cash analogy.
I'll repost an example from my old article, it should be easier to understand.
For example, if you have a UTXO with 10 Bitcoins on a Bitcoin address and you need to transfer 5 Bitcoins to someone else, then this transaction will create a new UTXO.
There are 5 Bitcoins on this new UTXO, and the original UTXO will also become spent, because you have spent 5 Bitcoins.
In this way, the remaining UTXO on your Bitcoin address is the original 10 Bitcoin UTXO minus the 5 Bitcoin UTXO spent, which is the remaining 5 Bitcoin UTXO.
These UTXOs can be used for future transfers, but the same UTXO can only be spent once.
That is to say, in this model, technically speaking, the user holds the right to use the money in the wallet, which is different from the concept of ETH where the wallet is the ledger.
UTXO is like cash
Each UTXO can be compared to a banknote or coin. If you have $50 in cash, you might have different combinations:
- A $50 bill
- Five $10 bills
- Ten 5 dollar bills
- Four $10 bills and two $5 bills.
In these cases, despite the different number of notes, you have a total of $50. UTXO behaves similarly. When you see a single balance in a cryptocurrency wallet, it could actually be composed of any number of UTXOs, depending on your past transaction history. When these UTXOs are added together, their sum is the total balance held in your specific wallet address.
Just like cash, UTXO cannot be divided. Consider buying a cup of coffee that costs $3.75; if you only have five $10 bills, you must pay more (hand over $10) and get change, which is $6.25.
UTXO behaves similarly. Just like you can't tear off part of a $10 bill to pay for coffee, you can't send a partial UTXO.
If you want to send 3.75 Bitcoins to someone, but you only have a UTXO worth 10 Bitcoins in your wallet, you have to send the entire UTXO to the recipient and then receive the change, just like you would with cash Same goes for payment. (Of course, this process is handled by the blockchain protocol and does not require you to trust the recipient to return the change).
So when you make this transfer, the recipient receives 3.75 BTC, and the remaining 6.25 BTC "change" is sent back to your address as a new, smaller UTXO.
What if you want to send someone 13.75 Bitcoins? The situation is the same as with cash. You have to send two UTXOs (like handing over two $10 bills); one is fully used and the other needs to be sent back to you as change with a new UTXO.
While the “UTXOs are cash” analogy is helpful in understanding the basic concepts, there are a few ways in which this analogy is limited.
Transactions conducted on the blockchain also require transaction fees, which are deducted from the change amount, unlike when paying in cash.
In addition, the value of legal tender banknotes and coins is fixed. When you pay for coffee, you don't get a $6.25 note, maybe a fiver, a dollar, two dimes, but a UTXO can be any amount.
The design of UTXO provides a lot of data that can be used to analyze on-chain activity
For example, each UTXO has a date, so we can easily tell how long each money has been stagnant, etc.
In addition, new UTXO will be generated after each transaction, and we can discover other on-chain indicators based on the number and size of UTXO.
For example:
UTXO quantity:
The number of UTXOs is an important indicator of on-chain activity. By tracking changes in the number of UTXOs, we can understand the transaction activity and usage on the blockchain. A higher number of UTXOs may indicate higher trading activity.
UTXO size distribution:
By analyzing the size distribution of UTXOs, we can understand the different denominations of coins used in transactions. This can provide insights into the handling habits and usage of Bitcoin or other cryptocurrencies.
UTXO age:
The age of a UTXO refers to the time since it was last used. This indicator can provide information about the holding time and holding period of the coin. Older UTXOs may represent long-term holdings or cold storage, while newer UTXOs may represent active transactions.
Coin Days Destroyed:
Coin Days Destroyed is a metric that measures UTXO usage. It takes into account the holding time and quantity of the UTXO. By calculating the holding time of each UTXO multiplied by the corresponding number of coins, and accumulating these values, we can measure the total number of coins that have been used in a certain period of time.
The calculation formula for Coin Days Destroyed (CDD) is as follows:
CDD = Σ(UTXO_age * UTXO_value)
Among them, Σ means summing all UTXOs. UTXO_age represents the holding time of each UTXO (expressed in block height or time units), and UTXO_value represents the value of each UTXO.
The specific calculation steps are as follows:
1. For each UTXO, calculate its holding time (UTXO_age). This can be found by subtracting the block height or timestamp when the UTXO was created from the current block height or timestamp.
2. Calculate the value of each UTXO (UTXO_value). This usually refers to the amount of cryptocurrency (e.g. Bitcoin) the UTXO represents.
3. Multiply the holding time of each UTXO by its value to get UTXO_age * UTXO_value.
4. Sum UTXO_age * UTXO_value of all UTXOs to get Coin Days Destroyed (CDD).
Coin Days Destroyed (CDD) can be used to analyze the following aspects:
1. Trading activity: By calculating CDD, we can understand the total amount of coins used within a certain time frame. High CDD values may indicate higher trading activity as more UTXOs are used or destroyed.
2. Holding behavior: CDD provides information about the holding time and value of UTXO. By analyzing CDD, we can understand how holders manage their coins. A higher CDD may indicate heavy short-term holding or frequent trading activity, while a lower CDD may indicate a longer-term holding or cold storage strategy.
3. Market activity: CDD can provide some insights about the market. For example, during a price increase, a high CDD may indicate that more coins are being destroyed or moved, as holders may be more inclined to sell or trade. Conversely, during price declines, low CDD may indicate less coins being destroyed or transferred, as holders may be more inclined to hold on.
Assume that within a certain time period, there are two UTXOs:
UTXO1: Holding time is 10 days, value is 5 Bitcoins
UTXO2: Holding time is 5 days, value is 3 Bitcoins
Calculate CDD:
CDD = (10 * 5) + (5 * 3) = 50 + 15 = 65 coin-days
This means that during this time period, a total of 65 coin-days were destroyed or used, indicating that the holding time and value of these coins were used.
SOPR (Spend Output Profit Ratio):
SOPR is a metric that measures the profitability of UTXO transactions. It calculates the ratio between each UTXO’s cost basis (based on its price when it was created) and its price when it is spent in a transaction. SOPR greater than 1 indicates a profitable trade, and less than 1 indicates a losing trade.
Calculated as follows:
SOPR = average transaction output price / average transaction input price
The average transaction output price refers to the average price of transaction outputs (sellers), and the average transaction input price refers to the average price of transaction inputs (buyers).
SOPR can be used to analyze the following aspects:
1. Profitability: SOPR can provide information about the profitability of market participants. When SOPR is greater than 1, it means that the average transaction output price is higher than the average transaction input price, and participants sell their assets at a profitable price. On the contrary, when SOPR is less than 1, it means that the average transaction output price is lower than the average transaction input price, and participants sell their assets at a loss.
2. Market Sentiment: SOPR can also provide insights into market sentiment. When SOPR is greater than 1, participants are generally in a profitable state, which may increase selling pressure and cause prices to fall. On the contrary, when SOPR is less than 1, participants are generally in a state of loss, which may reduce selling pressure and cause prices to rise.
Assume that within a certain period of time, there are the following two transactions:
Transaction 1: Input value is 2 Bitcoins, output value is 4 Bitcoins
Transaction 2: Input value is 3 Bitcoins, output value is 2 Bitcoins
Calculate SOPR:
Average transaction input price = (2 + 3)/2 = 2.5 Bitcoins
Average transaction output price = (4 + 2)/2 = 3 Bitcoins
SOPR = 3 / 2.5 = 1.2
This means that participants are able to sell their assets at a profitable price with an SOPR greater than 1 through average transactions.
By tracking changes in SOPR, changes in market participants' profitability and market sentiment can be observed.
The other one is easier to understand, which is an account-based chain, similar to ETH.
Unlike UTXO chains, account-based chains represent coins as balances in accounts.
Accounts can be controlled by private keys or smart contracts, which is a relatively mainstream design.
The account-based model is simpler than the UTXO model; it can be viewed as similar to a bank account, representing a user's balance within a single account and allowing deposits and withdrawals to be made within that account.
Simply put, UTXO means cash, and the account-based chain means bank account number.
Unlike UTXOs, balances can be partially spent. For example, if you have 10 ether, you can send 3.75 ether to someone directly from your account. The result of this transaction is that you now have 6.25 ether and the other person has 3.75 ether. You don't have to send all 10 ether and receive 6.25 ether in change like you would on a UTXO chain.
This model makes indicators such as CDD or SOPR unable to operate, but many data companies have tried to develop data tracking that can simulate similar functions.
Even so, it still has some unique indicators, such as Gas consumption, etc. On the other hand, most of these public chains support smart contracts and can also provide information on multiple assets, which is more conducive to analyzing data in specific sectors.
My favorite exchanges
Paiwang, the first choice for quantitative trading, is also where I use fixed deposits.
https://www.pionex.com/zh-TW/signUp?r=kfKGa6PF
### Binance Exchange
The world's largest exchange with the most functions, the group has a complete currency ecological chain, the platform currency rises rapidly, and is less disconnected, the control of deposit and withdrawal is relatively strict, it takes 24 hours to withdraw the currency after buying, and the risk of freezing the card is low.
https://accounts.binance.com/zh-CN/register?ref=XFRGMUKF
###OKX Ouyi
After years of bulls and bears, a stable exchange that has always been cultivated slowly, is an exchange with high security
https://www.okx.com/join/4506538
### SesameGate.io
There are a lot of initial coins, and the threshold for grabbing the first coin is relatively close to the people. Only VIPs can buy it. It is also a good place to mine the wealth of new coins. The NFT sector is quite rich and comes with quantitative trading functions. The functions are very rich and it is easier to make money , but it is also easy to encounter garbage coins, so keep your eyes open
2021/5/20 GTEVM starts to go online and will also enter the field of smart contracts