1

I want to create a transaction in the main-net. Each transaction modifies 4 * 32 bytes of storage. It also creates a event with 3 indexes and 150 bytes of real log.

Note: I arbitrarily take 300 Euros/Eth.

The calculus made follows:

Cost in gas calculus:
  Cost  TX      :    21000 gas/TX      * 1TX        = 21000
  Cost storage  :    20000 gas/32bytes * 4*32 bytes = 80000
  Cost   event  :      375 gas/LOG     * 1LOG       =   375
  Cost   Topic  :      375 gas/topic   * 3topic     =  1125
  Cost  byte/log:        8 gas/byte    * 150 bytes  =  1240
                                                    -------
                                            TOTAL    103740 gas
gas to Euro calculus:
  103740 (TOTAL) gas * 0.000000032 Eth/gas * 300 Euros/Eth = 0.995904 Eu

The 0.000000032 Eth/gas is taken from the average gas price at http://ethgasstation.info/

The final price, 0.996Eu, looks extremely costly, so I'm thinking there is a mistake in my calculus or something else that scapes to my understanding.

I base my calculus/data in next references:

2

The price will actually be a bit higher than you estimate, since you don't take into account overhead from Solidity for function dispatch etc.

The reason the cost is so high is that the price of ETH in fiat (Euros) has increased very quickly, and the gas price has not adjusted to compensate. The problem is compounded by large ICOs driving demand for gas up and crowding blocks.

Over time, the gas price should rebalance and the cost of the transaction will decrease

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.