What would be a good strategy to prioritize a transaction given the EIP-1559 definitions:

  • Base Fee: minimum fee a transaction must pay to be a valid transaction. The Base Fee changes per block, depending on how full the previous block is. The Base Fee is burned so the block producer (miner/validator) does not receive any of it.

  • The Priority Fee: transaction would pay a block producer when the transaction is included in a block. The Max Priority Fee is a maximum because the block producer may be paid less

From my understanding, increasing the MaxPriorityFeePerGas and the MaxFeePerGas will increase the chance of your transaction being picked up. But the question is by how much ?

What value to give the maxPriorityFeePerGas and the maxFeePerGas (given also that maxFeePerGas = baseFee + maxPriorityFeePerGas), so it seems that only calculating the maxPriorityFeePerGas should do the job.

1 Answer 1


Here are 3 strategies and the general tradeoff is between ease and cost. Ease is about how much work you want to do; there is a tradeoff because doing more work will probably save more money.

To keep this discussion clearer, "pay"/"price" is about the price per gas. Gas limit is discussed at the end.

The easiest is to think of the maximum price you are willing to pay for the transaction, and set MaxFeePerGas (and MaxPriorityFeePerGas) to that value. The most you will pay is MaxFeePerGas. (The priority fee you end up paying will be lower than MaxFeePerGas, because the BaseFee is paid first.)

On the other spectrum, if you want to optimize your prioritization, then it requires analyzing what's in the txpool, having many nodes to listen to new transactions as they come in, and making projections and estimates based on that data. Using a very simple example, if at a point in time you see that the highest MaxPriorityFeePerGas is 1.234 gwei, if you set your MaxPriorityFeePerGas to 1.2340001 (and a high enough MaxFeePerGas), then your transaction is the most profitable based on these alone, so chances are high your transaction will be included in the next block. You probably just want to be included in the block, so if you find that the median MaxPriorityFeePerGas of all the transactions in the txpool and incoming to your nodes is 0.3 gwei, setting yours to this median value should also reliably get your transaction in the block, while saving money. These are just initial ideas as you start analyzing and optimizing. More nodes, connected to more peers, will also get your transaction around the network faster.

In the middle ground, you can search online for Ethereum gas estimators and gas prices, and set your MaxFeePerGas (and MaxPriorityFeePerGas) to the value they suggest at that time.

Note: the gas limit can also affect the priority of your transaction:

Does Gas Limit have any bearing on transaction/mining time?

Does using a very high gas limit somehow get your transactions executed slower?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.