1

Can someone explain the algorithm to compute Monero transaction fee?

I have seen somewhere it is based transaction size (or something called "weight"?), and some other vague explanation. But I would like to know more deeply how it works.

EDIT: This is basically the same question as How does the dynamic fee calculation work? but the answer to that question looks out of date. I would like to know how it works in the protocol today.

2

Can someone explain the algorithm to compute Monero transaction fee?

The computation of the current dynamic fee algorithm is explained, in detail, here: https://web.getmonero.org/2017/12/11/A-note-on-fees.html.

I have seen somewhere it is based transaction size (or something called "weight"?), and some other vague explanation.

"weight" is just another term for size. However, It's not just tx weight that is used in the calculation.

But I would like to know more deeply how it works.

https://web.getmonero.org/2017/12/11/A-note-on-fees.html

  • This was the type explanation I was looking for. That post is old, does it still correspond to the Monero code? – PyrolitePancake May 13 at 8:24
  • It's not that old and it's the most recent write-up. Some parameters I think may have been tweaked but it's largely current. – jtgrassie May 13 at 11:36
  • But seems wrong. Example, this transaction xmrchain.net/tx/… fee is 0.0000331xmr, size is 1,73kB, median block is 293kB, and block reward is 2.8xmr (says xmrchain.net). But above formula says fee/kB should be (2.8/10)*(300/293)*0.002*(60/300)*4 = 0.000459xmr, so the fee should be 0.0007935xmr. That is almost 25 times more than on xmrchain.net! – PyrolitePancake May 14 at 6:39
  • No, the numbers you are using in your calculation are wrong. Re-read the article. – jtgrassie May 14 at 11:33
  • 1
    Hmm, looking at the source code, this article does indeed look a little out of date. Apologies. The source for the base fee per byte can be seen calculated here – jtgrassie May 14 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.