ποΈUTXO Data Model
How ChainArgos handles UTXO blockchain transaction data
For UTXO chains (e.g. Bitcoin) the transaction structure does not map directly on to the traditional sender-receiver-symbol-amount data model.
We employ a simple model that allows users to analyze data on UTXO chains with tools similar to those that work on account-based systems like Ethereum.
Bitcoin (and forks)
Each Bitcoin transaction is identified by a single Transaction Hash. Within a transaction there are two types of Transfer Types:
Input; and
Output.
Inputs are where tokens flowing in to the transaction came from.
Outputs are where tokens flowing out of a transaction went to.
The same scheme is used by Litecoin, BItcoin Cash and the many other Bitcoin forks.
Transfers on UTXO chains can look like Ethereum if there is a single Input and single Output. But if there are several of either, or both, then the transaction mixes together a number of different sources and destinations.
There is no concept of "these tokens came from only input 3" - there are sets of inputs and outputs and they are all munged together.
Mining rewards and block builder fees come from the Input "COINBASE" (not to be confused with the cryptocurrency exchange of the same name).
It is possible for a single UTXO Input to come from several addresses at once. Although having a UTXO Input from several addresses at once is not a frequently used feature, when this occurs we divide the input amount evenly across all possibly sources and include each as a single-source Input for the transaction.
The total amount of input and output remains correct, and all listed addresses were involved in the transaction, but this is a slightly simplified view of the world.
We do this to make tools work across ecosystems without users needing to fully understand all the idiosyncrasies of each chain.
Cardano
The Cardano UTXO model extends the Bitcoin one by adding user-defined assets.
Each Cardano transaction has a hash, but now there are 6 transfer types:
Input; and
Output for Native tokens (as with Bitcoin);
Asset Input; and
Asset Output for user-defined assets
Asset Mint for the minting of new user-defined assets. "Burning" is accomplished by minting a negative quantity;
Fee for the payment of fees to the network operator(s).
Last updated