Skip to main content

eip-1559 support

Flashbots supports EIP-1559 transactions as of mev-geth v1.10.5-mev-0.3.0. This support requires no configuration changes for a searcher who is looking to use legacy transactions, but a block's base fee is a major change that will require transaction-level changes for any searcher using 0-gas-price transactions. Searchers are still able to pay for priority via a direct transfer to the coinbase or via gas price in excess of the 1559 base fee, but their transaction MUST include an Ethereum gasPrice at least equal to base fee.

Note: For searchers using legacy transactions, passing gasPrice is equivalent to passing maxFeePerGas equal to gasPrice and including tip. Using a legacy transaction does not bypass the gasPrice >= baseFee requirement

Signing bundles with a legacy transaction:

const signedTransactions = await flashbotsProvider.signBundle([    {      signer: authSigner,      transaction: {        to: "0xf1a54b075fb71768ac31b33fd7c61ad8f9f7dd18",        gasPrice: 10,        gasLimit: 33000,        chainId: 5,        value: 0,      },    },  ]);

Signing bundles with EIP-1559 transactions (note: chainId is a required attribute for 1559 transaction type: 2):

const block = await provider.getBlock("latest");const maxBaseFeeInFutureBlock = FlashbotsBundleProvider.getMaxBaseFeeInFutureBlock(block.baseFeePerGas, 1);const priorityFee = BigNumber.from(10).pow(9);const signedTransactions = await flashbotsProvider.signBundle([    {      signer: authSigner,      transaction: {        to: "0xf1a54b075fb71768ac31b33fd7c61ad8f9f7dd18",        type: 2,        maxFeePerGas: priorityFee.add(maxBaseFeeInFutureBlock),        maxPriorityFeePerGas: priorityFee,        gasLimit: 33000,        chainId: 5,        value: 0,      },    },  ]);


Can a transaction specify maxFeePerGas=0#

No, all transactions must have maxFeePerGas greater than or equal to block.baseFeePerGas, or they are not eligible for inclusion in a block.

Can a transaction specify maxPriorityFeePerGas=0#

Absolutely, although the builder will need some incentive to include this transaction. With a Flashbots bundle, you can incentivize a builder/validator to include your transactions with block.coinbase.transfer() payments OR via maxPriorityFeePerGas. You can also use both at the same time; the incentive is cumulative.

Will reverting transactions still be discarded?#

Flashbots still uses the same reverting transactions logic after EIP-1559: Unless specified in revertingTxHashes in eth_sendBundle, a transaction that reverts invalidates an entire bundle. However, as searchers are now required to use gas prices as a result of the requirement for base fee gas payments, searcher transactions may appear in the mempool more often as a result of block re-organizations. When using gasPrice=0, re-organized transactions are quickly dropped from gossip and are unlikely to appear in a future block, unless done so by another searcher. Transactions paying at least base fee will stay in the mempool and are likely to appear in future blocks, which could violate expectations around reverting transactions.

How can I send a transaction from an account with 0 ETH, like one with a malicious sweeper running against it?#

We have a working example of how to accomplish this in our Sponsored Transaction Github Repository, which has been updated to work with EIP-1559.

Where can I learn more about EIP-1559?#

EIP-1559 Hackmd Cheat Sheet