Rosetta API - Help with understanding the transaction

Hello,

Can someone help me with understanding the below transaction with the below queries?

**1.**106965913 ADA debited from the input address addr1qygkwt3…m7x4sgn80eq and credited to addr1q8rp0t8htsp…m7x4s7fq5zh?

**2.**103441490 ADA as a reward debited from stake1u8a9htht…3raxgalr2cgmqau9 and credited to whom?

**3.**From which account 103441490 ADA is credited to stake1u8a9htht…3raxgalr2cgmqau9 account?

**4.**of type ‘stakeKeyDeregistration’, stake1u8a9hthtcf…yt7hk3raxgalr2cgmqau9 this address is deregistered from staking? What is fundAmount 2000000 here? This is debited from the same account? credited to whom?

{
“transaction”: {
“transaction_identifier”: {
“hash”: “ed2b22b421eb00edc5c25ccc480de07638eb3173c79c02be03d9170c709503a4”
},
“operations”: [
{
“operation_identifier”: {
“index”: 0
},
“type”: “input”,
“status”: “success”,
“account”: {
“address”: “addr1qygkwt3fje0teuqz2rv3x64htezh50q5pxjmfp6vlqshgp86twhwhsnn8w4tn3urjjev0fdvkwk5zgha0dz86v3m7x4sgn80eq”
},
“amount”: {
“value”: “-1700000”,
“currency”: {
“symbol”: “ADA”,
“decimals”: 6
}
},
“coin_change”: {
“coin_identifier”: {
“identifier”: “5edbffc3c030e33354aab3b07fd40d43ef232897aba6e1835ff3b611ecb456a7:0”
},
“coin_action”: “coin_spent”
},
“metadata”: {
“tokenBundle”: [
{
“policyId”: “c3f7c24203e407f8345238dece33aea3744a90b984a35c3fc0422540”,
“tokens”: [
{
“value”: “-1”,
“currency”: {
“symbol”: “43617264616e6f4b69647a546573744e4654303233”,
“decimals”: 0
}
}
]
}
]
}
},
{
“operation_identifier”: {
“index”: 1
},
“type”: “withdrawal”,
“status”: “success”,
“account”: {
“address”: “stake1u8a9hthtcfenh24ec7pefvk85kkt8t2pyt7hk3raxgalr2cgmqau9”
},
“metadata”: {
“withdrawalAmount”: {
“value”: “-103441490”,
“currency”: {
“symbol”: “ADA”,
“decimals”: 6
}
}
}
},
{
“operation_identifier”: {
“index”: 2
},
“type”: “stakeKeyDeregistration”,
“status”: “success”,
“account”: {
“address”: “stake1u8a9hthtcfenh24ec7pefvk85kkt8t2pyt7hk3raxgalr2cgmqau9”
},
“metadata”: {
“fundAmount”: {
“value”: “-2000000”,
“currency”: {
“symbol”: “ADA”,
“decimals”: 6
}
}
}
},
{
“operation_identifier”: {
“index”: 3,
“network_index”: 0
},
“related_operations”: [
{
“index”: 0
},
{
“index”: 1
},
{
“index”: 2
}
],
“type”: “output”,
“status”: “success”,
“account”: {
“address”: “addr1q8rp0t8htspc4aacuyelxdvru5tsf7r3784pv2avs7mz7e06twhwhsnn8w4tn3urjjev0fdvkwk5zgha0dz86v3m7x4s7fq5zh”
},
“amount”: {
“value”: “106965913”,
“currency”: {
“symbol”: “ADA”,
“decimals”: 6
}
},
“coin_change”: {
“coin_identifier”: {
“identifier”: “ed2b22b421eb00edc5c25ccc480de07638eb3173c79c02be03d9170c709503a4:0”
},
“coin_action”: “coin_created”
},
“metadata”: {
“tokenBundle”: [
{
“policyId”: “c3f7c24203e407f8345238dece33aea3744a90b984a35c3fc0422540”,
“tokens”: [
{
“value”: “1”,
“currency”: {
“symbol”: “43617264616e6f4b69647a546573744e4654303233”,
“decimals”: 0
}
}
]
}
]
}
}
]
}
}

Please correct me if I’m wrong somewhere…

Transactions in the UTxO model really aren’t pairwise address-to-address transfers of funds: i.e., it’s different than traditional bookkeeping where there are daybooks, a nominal ledger, etc. Rather, all of the input funds are gathered together and then they are dispersed as output. One could interpret a transaction as a set of pairwise transfers, but many different interpretations of the same transaction would be equally valid and there is no objective way to say one interpretation is uniquely correct. A metaphor might be that several folks put money and tokens into a bag, mix them up, and then (perhaps different) folks take out money and tokens from the bag until it is empty.

For the transaction in your example, we have the following inputs:

  • 1.7 ADA and 1 CardanoKidzTestNFT023 from 1addr1qygkwt3fje0...z86v3m7x4sgn80eq.
  • 103.44149 ADA in rewards from stake1u8a9hthtcf...3raxgalr2cgmqau9.
  • a 2 ADA deposit being reclaimed because address stake1u8a9hthtcf...3raxgalr2cgmqau9 is being deregistered. You could think of this 2 ADA as being held at the stake address as long it is registered for delegation.

This means there is a total of 107.14149 ADA and 1 CardanoKidzTestNFT023 that will be output:

  • The 0.175577 ADA fee for the transaction.
  • 106.965913 ADA and 1 CardanoKidzTestNFT023 sent to addr1q8rp0t8htsp...z86v3m7x4s7fq5zh

BTW, some of the blockchain explorers are not very clear about transactions that involve deposits or refunds, but Cardano Explorer is: the details of ed2b22b421eb00edc5c25ccc480de07638eb3173c79c02be03d9170c709503a4 appear clearly there.

Thanks for all the information!

How you have found the name CardanoKidzTestNFT023? This is a different token balance, right? rather than ADA?

In your example, “policyId”: “c3f7c24203e407f8345238dece33aea3744a90b984a35c3fc0422540” and “symbol”: “43617264616e6f4b69647a546573744e4654303233” associated with “value”: “1” indicate the transfer of a token. If you decode the hex string 43617264616e6f4b69647a546573744e4654303233, you’ll find it translates to CardanoKidzTestNFT023. You can look up more information about the token on Cardanoscan.

Token balances are tracked separately from the ADA balance, but have the same rules, aside from the fact that tokens can be minted or burned, but ADA cannot.

Got it! Thank You!