Understanding Cardano transactions and the Cardano Explorer
Let's take a look into a sample transaction on the Cardano Explorer to learn how to read it:
You can see it here: c36a03547d1fb45e79b644e3ba9e5a6665899f9d6531234d866fac0af1aaabab
So it shows:
- Received time: Cardano Explorer uses UTC time as reference. Daedalus shows your local time.
- Epoch and Block: Self explanatory. An epoch has 432000 slots of 1 seconds each. (5 days)
- Confirmations: One confirmation = 1 slot
- Transaction id: The hash of the transaction.
- From addresses: The inputs of the transaction. It can have an arbitrary number of Inputs.
- To addresses: The outputs of the transaction. It can have an arbitrary number of outputs.
NOTE: Unless the UTXOs used as input for the transaction cover exactly the outputs + fees, the outputs include a change address of the wallet that created the transaction. In the example above addr1qx....xegjg is a change address. - Values: The value of each input and output of the transaction.
- Total Output: The sum of the values of the outputs.
- Transaction fee: The fees paid by the transaction, fees depend on the size of the transaction.
A closer look:
Cardano blockchain uses the Unspent Transaction Output (UTxO) model. It is an extremely efficient system for keeping track of your wallet balance on the blockchain. When you create a wallet (i.e. using Daedalus) it has various addresses associated to it. Each of these addresses can receive and hold ADA in one or more UTxOs. For example:
White addresses = Unused / Gray addresses = Used
A UTxO consists of the reference to the address to which it belongs (proof of ownership), its value in lovelace (1 ada = 1,000,000 lovelace), and its index (TxIx) on the host transaction (TxId). A transaction can take various inputs (consume UTxOs) and produce various outputs (New UTxOs to be used by future transactions). For example:
Daedalus UTXO Distribution screen shows a summary of your UTxOs, for example on this wallet we have 11.831199 Ada on 4 UTxOs
When you send a transaction, it takes only complete UTXOs as inputs until they are enough to cover the outputs of the transaction and the transaction fee. If there is any change left, It is sent to a change address of the origin wallet. To spend a UTXO on a simple transaction Cardano uses (private) keys to sign transactions, so that only the person that has the signing keys for the address owning a given UTxO can spend it. This is why you need to be very careful with your recovery phrase, if it is compromised, others could sign a transaction on your wallet.
Let's visit our sample transaction again and see how it looks like if we plug it into our UTxO diagram:
So we have that the transaction:
- Used as input the UTxO with value of 549 Ada from address addr1q8...0v3tnqjkartq
- Paid a transaction fee of 0.168801 Ada
- Sent 1 Ada to address addr1q8a...qej8y2n producing the first output (TxIx 0)
-
Sent 547.831199 Ada, the change of the transaction, to addr1qx6...nqmxegjg which is a change address on the origin wallet producing the second output (TxIx 1).
- Has a Total Output of 548.831199 ADA, the sum of all outputs.
Note: The transaction indexes are not shown in the explorer, one can use cardano-cli to query the blockchain, for example let's query the address of the first output.
cardano-cli query utxo --mainnet --mary-era --address addr1q8a...xql7jp6lqej8y2n
TxHash TxIx Amount
--------------------------------------------------------------------------------------
01faae71a9b6747c6973a8e72e5362a884880ae504fa7aec1b2032d67606946c 1 4831199 lovelace
bafa57ed2ab2b0e6ebaa1c294c90ae29dfe917a357486346be341ffeddf4f1bd 0 1000000 lovelace
c36a03547d1fb45e79b644e3ba9e5a6665899f9d6531234d866fac0af1aaabab 0 1000000 lovelace
This means that the address addr1q8a...qej8y2n has 3 utxos for a total of 6.831199 ADA, including 1 Ada at index 0 from our sample transaction.
Finally, if we search the same address on the explorer we find that it reports the same three transactions, its current balance and the details of each transaction.
To learn more watch The UTXO model explained by Lars Brünjes