Skip to content

Correctly budget gas for refund payment in block to non-EOA recipient#932

Merged
ZanCorDX merged 1 commit into
flashbots:developfrom
quasarwin:payout-fix
Jul 17, 2026
Merged

Correctly budget gas for refund payment in block to non-EOA recipient#932
ZanCorDX merged 1 commit into
flashbots:developfrom
quasarwin:payout-fix

Conversation

@quasarwin

Copy link
Copy Markdown
Contributor

📝 Summary

When calculating the payout gas budget of a non-EOA refund recipient, estimate_payout_gas_limit used tx_gas_limit_cap (EIP-7825: 16,777,216) minus the gas used in the block. This caused bundles with those refunds to fail once the block committed past ~16.7M gas, failing with
EstimatePayoutGas(PayoutTxErr(EvmError(Transaction(CallGasCostMoreThanGasLimit { initial_gas: 21000, gas_limit: 0 }))))

Instead, the payout tx gas_limit needs to be at most the EIP-7825 limit, or whatever is left in the block, whichever is less.

💡 Motivation and Context

prevent bundles from being dropped due to bad refund tx payout calculation


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@quasarwin
quasarwin requested review from ZanCorDX and dvush as code owners July 16, 2026 23:42
When calculating the payout gas budget of a non-EOA refund recipient,
estimate_payout_gas_limit used tx_gas_limit_cap (EIP-7825: 16,777,216) minus the
gas used in the block. This caused bundles with those refunds to fail once the
block committed past ~16.7M gas, failing with
`EstimatePayoutGas(PayoutTxErr(EvmError(Transaction(CallGasCostMoreThanGasLimit
{ initial_gas: 21000, gas_limit: 0 }))))`
@ZanCorDX
ZanCorDX merged commit 6037fa7 into flashbots:develop Jul 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants