0

I know validators choose the trx order mainly based on the fees. They will be rewarded with them, in fact. Thus it's in their interest to prioritize the transaction with higher fees.

However, in all blocks I'm looking at, the order seems quite random and not fees dependant.

Let's take this as example: https://etherscan.io/txs?block=18808120

The first block trx paid 0.0058 eth, whereas the 7th paid 0.017 eth. More than the double of the fees, yet it still come after the less expansive one.

This is just an example but there are some other with more gap between the fees.

How do you explain it?

2 Answers 2

0

First, you are looking at the total gas cost. Instead you should be looking at the gas price. A small tx (in terms of gas limit) with a higher gas price will be included before a big tx with a smaller gas price.

Second, some transactions are part of a flashbot bundle. Theses bundles are generally included at the start of the block, and the txs inside them aren't generally ordered by gas. For example, consider a sandwich attack: only the two txs by the MEV bot will have a high gas price (at least one of them), while the victim tx in the middle will have a normal gas price.

tx 1: frontrun-tx  --> normal/high gas price
tx 2: victim-tx    --> normal gas price
tx 3: backrun-tx   --> normal/high gas price

What's important from the validator's perspective is the average gas price of the txs inside the bundle.

Third, some MEV bots pay the validators by sending ETH directly to their address instead of using a higher priority gas. So this is another element that can mess things up.

3
  • Thank you for your important info! Regarding the first point, are you sure? I cannot find any source saying that. Most of them say it's up to the validators and depends Dec 21, 2023 at 7:21
  • 100 gwei x 300k gas is more valuable than 1 gwei x 30M gas, even if they pay the same total. The second fills all the block, so you don't have space for anything else.
    – 0xSanson
    Dec 21, 2023 at 10:50
  • It makes sense! Thank you so much Dec 21, 2023 at 11:23
0

Nonce Order may affect the transaction ordering. Sometimes, transactions are ordered by nonce (transaction count) for each account. Transactions with lower nonce values are processed before those with higher nonce values, irrespective of the fees attached.

1
  • Yes I knew about Nonce, I wrote "mainly" in fact. However, I think nonce cannot be the reason because there are too many cases where low gas trx are processed before high gas ones Dec 18, 2023 at 8:50

Your Answer

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

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