nearprotocolnear

Understanding fee payments and assets flow


Consider the following example transaction 24AVRBgWnEWQK1yPnfgfzkSugsWbLNxhnHeDQr9tG7Mf.

Receipt Ef93JLMy6aeAKDQA4p74dLxEQEPPJpLjfwPz6bJE3tBy burned 21027712500000000000 tokens as a fee. As one could see, this receipt is a sub-receipt of GrvohsC2eHLCZDKB7r2yZmSaxqqzqh97keCEFt3QeyQP which is a sub-receipt of another one. There are different senders and receivers in this receipt-chain.

There are a few things I don't understand here:

  1. Did the sender of the transaction (rgv250cc.near in this case) covered all the fees for executing all receipts?
  2. In receipt Ef93JLMy6aeAKDQA4p74dLxEQEPPJpLjfwPz6bJE3tBy both predecessor and receiver are aurora.pool.near. Does this mean, that in this case, the aurora.pool.near covered the fee for this receipt, which was earlier passed to aurora from the transaction sender, which is indicated by the amount of gas ("gas": 250000000000000,) attached to the function call from the transaction?
  3. What does the value of tokens_burnt in receipt 6okihcHrqjr4KWY6CeRzynvC5GxA6wrNyZNMYyKphqJP represent? Is it the fee of executing this receipt only, or maybe cumulated value of executing all receipts in this receipt-chain?

EDIT: AD 3. After summarizing all tokens_burnt value matched with the explorer, so each receipt shows only tokens burned for executing itself.


Solution

    1. Did the sender of the transaction (rgv250cc.near in this case) covered all the fees for executing all receipts?

    Correct.

    1. In receipt Ef93JLMy6aeAKDQA4p74dLxEQEPPJpLjfwPz6bJE3tBy both predecessor and receiver are aurora.pool.near. Does this mean, that in this case, the aurora.pool.near covered the fee for this receipt, which was earlier passed to aurora from the transaction sender, which is indicated by the amount of gas ("gas": 250000000000000,) attached to the function call from the transaction?

    rgv250cc.near covers all the fees even for the cross-contract calls.

    1. What does the value of tokens_burnt in receipt 6okihcHrqjr4KWY6CeRzynvC5GxA6wrNyZNMYyKphqJP represent? Is it the fee of executing this receipt only, or maybe cumulated value of executing all receipts in this receipt-chain?

    That only covers the tokens that were burnt during this particular receipt. You need to sum up all the tokens burnt values to get the total.

    I believe you might benefit from reading this article about the balance changes.