How do transactions compete in the pending pool?

I was wondering:

If there are two mutually exclusive transactions in the pending pool, which one wins?

As an example, two liquidation transactions for a protocol like AlgoFi where only one can go through.

Is it first come/first serve, or highest fee wins, or…?

Or does the second one not make it into the pending transactions pool?



Assuming the block proposer runs the official software, it is first come first served (from the point of view of the block proposer - note that not all nodes see the same order of pending transactions).

1 Like

Interesting, thank you (doubly so for the promptness)

What affects the order of pending transactions? “Distance” from tx broadcasting node? How is the pending tx pool synced?

Pending transactions are gossiped between nodes/relays.
Nodes connect randomly to 4 relays and regularly update the worst-performing relay.

It is most likely quite hard to predict exactly the order.
But I would guess (not verified) that geographical distance counts a lot.

1 Like