With Ethereum, max fee is gas multiplied by the gas price. But with Tezos, when i construct an operation, the fee is personally set, why is it not computed by gas_limit
?
-
Some information about fees in proto 003 is available here tezos.stackexchange.com/q/106/118– EzyFeb 12, 2019 at 11:03
2 Answers
In Tezos, the fee is independant from the gas : whatever the gas consumed, you always pay the full fee.
However, bakers will probably compute the ratio fee/gas, and prefer transactions with higher fee/gas, i.e. more reward for less computation.
-
I don’t believe that bakers have a practical possibility of choosing operations that are easier to compute. I think they can only maximize fees received currently, can’t they ?– EzyFeb 12, 2019 at 10:51
-
1Besides your answer is not correct: the fee formula contains a term gas_limit*price_per_gas. Can you please clarify your answer ? Cause your first sentence is ambiguous.– EzyFeb 12, 2019 at 10:53
-
1Bakers don't currently choose, it is the current baker that implements a strategy to favor transactions with high fee/gas:gitlab.com/tezos/tezos/blob/mainnet-staging/src/…– lefessanFeb 12, 2019 at 21:57
The full fee is always paid for every transactions - the gas limit is just that, a cap on the amount of gas a given transaction can consume. A baker can be guaranteed that they are paid at least fee/gas_limit per unit of gas consumed, even if they consume less.
Some bakers will also enforce a minimum per gas fee, which is currently set to 0.1 mutez (= 100 nanotez) per unit of gas.