2

Excerpt from chapter 9 of the yellow paper, "Execution Model", describing the behaviour of the EMV when clearing storage:

This refund is effectively paid up-front since the initial usage of a storage location costs substantially more than normal usage.

This seems to counteract this StackExchange answer:

The gas refund is provided only 1 time, at the very end of the transaction's execution.

I also know that the refunded gas is capped at half of the execution costs, so this is confusing. Does the first statement mean that the refund is actually calculated up-front (formally, in the σ checkpoint state transition) but only transferred to the caller after the execution is finished?

Paul Razvan Berg
  • 17,902
  • 6
  • 73
  • 143
  • IMHO the wording is confusing. I read it as you already have paid the first time you set to non zero the slot, the refund is from that payment. – Ismael Jan 07 '19 at 19:44

0 Answers0