-
Notifications
You must be signed in to change notification settings - Fork 574
don't refund all the unused gas #1085
Comments
how about we use returned value of |
that'll make the check tx much heavier, which breaks the assumption of the design, and introduce new dos attack venerability. |
This suggestion has a negative impact on some common patterns in EVM development. The way Uniswap handle's tx expiration is to have a quick check to see if the block height is greater than zero before doing a swap. This is done while spending much less gas than a swap. At low transaction fees, these semantic differences won't have a huge impact. Unfortunately a more holistic solution seems to depend on using ABCI++ to have the proposer actually pre-execute all the transactions |
is this a feature or bug though, this opens the room for bots to do lots of low gas trials, only need to pay the heavier gas when it succeeds. |
Proposal: don't refund all the unused gas
Adapt the cosmos-sdk proposal to ethermint.
Instead of charge user
gas_used * gas_price
as fee, chargemax(gas_limit / 2, gas_used) * gas_price
.Positives:
Negatives:
max(gas_limit / 2, gas_used)
in place ofgas_used
in json-rpc, so client still calculate the correct fee, but get a wronggas_used
(we can add a newrealGasUsed
field?)Current behavior: refund all unused gas
Desired behavior: only refund a portion of unused gas
Use case:
The text was updated successfully, but these errors were encountered: