After reading through the docs and through this post, I understand the concept and need for gas, but I do not understand why each transaction can have a variable fee associated with it. It seems to be a way for the rich to get priority over the poor, or those willing to pay a premium to get their transactions confirmed before anyone else. To me, this sounds unsustainable. Is there another reason for these changeable fees?
-
Others will presumably answer in more detail, but it allows for a dynamic marketplace. When you ask a miner to include your transaction in a block, you're entering an open market. It also allows the network to adapt to changes in the underlying value of ether.– Richard HorrocksCommented Mar 10, 2017 at 15:56
-
rich or poor?? we are talking about insignificant amount of money as fees. i think such comparison is not fair.– Badr Bellaj ♦Commented Mar 13, 2017 at 20:37
3 Answers
From the Yellow Paper
Transactors are free to specify any gasPrice that they wish, however miners are free to ignore transactions as they choose. A higher gas price on a transaction will therefore cost the sender more in terms of Ether and deliver a greater value to the miner and thus will more likely be selected for inclusion by more miners. Miners, in general, will choose to advertise the minimum gas price for which they will execute transactions and transactors will be free to canvas these prices in determining what gas price to offer. Since there will be a (weighted) distribution of minimum acceptable gas prices, transactors will necessarily have a trade-off to make between lowering the gas price and maximising the chance that their transaction will be mined in a timely manner.
Also found from Vtalik:
https://blog.ethereum.org/2016/10/31/uncle-rate-transaction-fee-analysis/
In my view it provides an elegant form of price discovery during periods of high contention for finite resources. For example, if we are hovering near the block gasLimit this is a mechanism for both users and miners to prioritize transaction urgency. I'm unsure what is unsustainable about that.
-
I understand that it is a mechanism for both users and miners to prioritize transaction urgency, but why have it in the first place? What if VISA were to have 1-3% fees, paid for by the customer? How would that world differ from ours now?– user5135Commented Mar 15, 2017 at 14:57
-
I'm not sure I can answer satisfactorily. I wonder if the question behind your question is, in summary, "Why doesn't Ethereum have unlimited scalability like VISA?" Consider this in the reverse. What if VISA engineered themselves out of the role of mediator and instead decided every device would do distributed consensus? Answer: No more data centers, and, the network would slow down considerably. What we have right now is a supply/demand solution and promising research into scalability. Scalability is all about increasing "supply" of a scarce resource - transaction processing capacity. Commented Mar 15, 2017 at 16:20
There are two main reasons: to prioritize one transactions over others and to adjust to the price.
In Bitcoin, there is a limit on how many transactions you can put inside a block (the limit is on the size of the block). The way to prioritize some transactions over others is paying more transaction fees so you can be sure your transaction gets added to the next block.
In Ethereum, the limit is on the gas used, and you pay more ether for that amount of gas for the same reason.
Now, imagine that we set a fixed amount of ether for each unit of gas at the beginning of the blockchain, with a value of 1 ether = $0.10. A reasonable fee would be 0.1 ether ($0.01) for a normal transaction. With the increase in price, if we had a fixed value, now we would be paying 0.1 ether ($3).
-
"the limit is on the gas used" do you say that there is a limit on how much gas can be used per block?– jayarjoCommented Oct 10, 2017 at 11:04
-
1
I kind of had a similar thought myself. But in my scenario I was running a permissioned/private instance and its only purpose is SmartContracts/Business Logic. Gas, with regards to SmartContracts, is crucial to prevent DOS Attacks and infinite loops. So far so good.
But when discussing with my peers we were not sure if transactions (again, regardless if monetary or data) need to have a fee to get the transaction verification right.
I suppose that the consensus mechanism, either PoW or PoS, need the TX-Fee to do their math. Maybe otherwise they wouldn't function?
So sorry for not directly answering your question, but I wanted to add some thoughts into this discussion.
B
-
As transaction fee is a way to prioritize transactions, I doubt you have such a volume on a private chain that you need it.– comodoroCommented Nov 23, 2017 at 6:39