My understanding of transaction costs is:

  • Any operation that increases the context (e.g. added storage, revelation, etc) incurs a burn fee. This is based on a fixed rate defined in the protocol.
  • There's also a baker fee that goes to the baker. This incentivises the baker to include the operation in their next block.

My question is how should the baker fee be estimated when creating an operation? Assuming bakers optimize their blocks to earn the highest baker fee, what are they optimizing for? Is it simply based on which operations have the highest baker fee/gas ratio, or is it more complicated than that?

  • bakers can choose to include/exclude operations based on txn fee, gas fee, and/or storage fee. IIRC, the baker binary sorts by highest total fees first. Simple calculation.
    – utdrmac
    Jul 1, 2021 at 3:47

1 Answer 1


Transaction fees are up to the client to offer. While the documentation will say that there is no gas cost (which is technically true), the default baker config comes with a setup that specifies a minimum fee per gas. Any operation that offers less than this is ignored. Operations that offer higher than this will be prioritised.

Its up to each baker to decide to keep this setup, increase, decrease it, etc. The only guidance that can be given is a sample on how to calculate that minimum fee. Its up to clients if they want to add a little extra, ask the user if they want to increase it further, retry it with higher amount if it fails etc.

I wrote a postman collection, that includes a functioning sample for estimating operations. It hasn't been updated since Delphi, and the burn fee constants are hardcoded instead of being pulled form the node. The basic logic is sound though: https://gitlab.com/camlcase-dev/tezos-rpc-postman

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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