2

1) Why are opcodes in Ethereum priced the way they are priced and why is the EVM so expensive?

2) Right upfront, I do not say that it is too expensive to perform a tx on Ethereum, I just say that prices are not based on any fundamental causes, so why not make them different (for example cheaper)? I guess nodes would not perform actions anymore and the EVM could be much more efficient.

Maybe you can measure how much it costs to perform an action on one computer, but you do not know how much computers (nodes) there are in the network and how much this action would cost on all of them combined.

Furthermore only one node gets the Gas fees from the tx, so the other nodes that perform that action (tx) do not see anything of that price. So why is an action not as expensive as an action would cost on one node?

I guess GAS opcode prices are set relative to each other, but as already pointed out the economics behind this makes no sense to me.

1 Answer 1

3

1) Why are opcodes in Ethereum priced the way they are priced and why is die EVM so expensive?

Opcodes are priced in units of gas, which is a measure of work. They have no intrinsic cost to the user: the cost to the user depends on the gas price. The gas price is in units of wei (or gwei), which can be translated to a value in fiat currency.

2) Right upfront, I do not say that it is to expensive to perform a tx on Ethereum, I just say it the prices is not based on any fundamental reason, so why not make it different (for example cheaper)?

As mentioned above, the opcode cost is not directly related to a specific cost to the user. Only when gas price is taken into account - which the user is free to choose - does the a real cost become evident.

Furthermore only one node gets the Gas fees from the tx, so the other nodes that perform that action (tx) do not see anything of that price.

Correct, but it is in the best interest of any given full node to run all transactions to ensure the state transitions are valid. If nodes didn't do this, they could not rely on their own state. Yes, only the miner who solves the proof of work puzzle gets the transaction fees, but all miners must ensure they are attempting to mine subsequent blocks on a valid foundation.

So why is an action not as expensive as an action would cost on one node?

It is, given the previous part of the answer.

I guess WEI opcode prices are set relative to each other, but as alredy pointed out the economics behind this make no sense to me.

Okay, here's your problem. Opcode prices aren't in wei. They are in abstract units of gas. To get the total cost of an opcode (i.e. what the user is going to pay, in gwei), you use its gas cost (in units of 'gas') and multiply it by the gas price you want to use.

So: gas * gasPrice = transaction fee

Related: How to calculate transaction fee?

You are free to choose any gas price you like. However, you have to understand that gas prices are a market. If you pick a gas price at the low end of the market, miners won't choose to mine your transactions. As with any healthy market, gas prices change with supply and demand. (Of use: https://ethgasstation.info/)

8
  • In regards to your first answer: I cannot find an answer to my question in your first answer. I thought that maybe the topic "How were gas costs chosen for the Ethereum Virtual Machine instructions?" will answer it, but it does not. 3) Is the cost of an action is measured somehow and priced relative to each other?
    – Ini
    Apr 9, 2018 at 19:37
  • In regards to your second answer: That's true what you say, but it seems that die Nash Equilibrium is that people pay a gas-price (I assume because of the the blocksize limit) and therefore my questions still remain and I think they are valid.
    – Ini
    Apr 9, 2018 at 19:37
  • In regards to your third answer: So your argument is that you pay the miner for each block that he processed where he/she was not the winner of the puzzle onces he/she finally is the winner of the puzzle again? The cost of an action on all nodes can't be measured, because you do not know how many nodes there are and how many miners there are and when a miner will solve the next block.
    – Ini
    Apr 9, 2018 at 19:37
  • 1
    [Comment 1] Yes, they're priced based on the relative amount of work, roughly equivalent to the compute time in micro seconds. [Comment 2] Yes, the gas price market exists because block space is finite. [Comment 3] One miner solves the PoW puzzle and gets paid. No one else gets paid, but they must run the transactions so that they know the transactions are valid, and their own state is internally consistent. [Comment 4] The opcode gas costs are abstract. As long as they remain at the same values relative to each other, even cutting them by 90% wouldn't change things. Apr 9, 2018 at 19:49
  • 1
    Yes, correct. But it might be that things are currently set so that we can't move the scale. As in, the cheapest opcodes can't get any cheaper relative to the more expensive opcodes because they're already set to '1'. (I'm not entirely sure about this though.) :-) Apr 9, 2018 at 20:10

Your Answer

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

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