Transaction ordering and execution costs
Crypto Execution WeeklySeven Mempool Fields That Decide a Swap’s Fate
An Ethereum mempool holds intent, fee limits and execution constraints—not a fill—leaving traders exposed to repricing, reordering and failed swaps.
Before confirmation, an Ethereum mempool holds seven practical parts of a signed transaction: identity, nonce, destination, value, calldata, gas constraints and fee bid—not a reserved fill. The observed failure is familiar: a swap UI says “pending” while the market moves. The responsible component is the execution client’s local transaction pool, not the exchange router. Ethereum’s London upgrade shipped type-2 transactions with separate maximum total and priority fees; it made the bid legible and bounded, but did not turn propagation into execution.
What seven things does an Ethereum mempool contain?
For a standard type-2 swap, the seven things are the signed envelope’s identity, sequencing, call and payment instructions.
- 1. Identity and authorization: the transaction type, chain ID and signature; the client recovers the sender from that signature rather than trusting a “from” field.
- 2. Nonce: the sender’s sequence number, which prevents replay and forces that account’s transactions to execute in order.
- 3. Destination: the “to” address, usually a router or settlement contract for a swap.
- 4. Value: the ETH attached to the call, which can be zero for a token-for-token trade.
5. Calldata identifies the contract function and its arguments, often including the route, amount and slippage protection. 6. Gas constraints provide the gas limit and, where present, an access list. 7. The fee bid supplies maxFeePerGas and maxPriorityFeePerGas. Together, those groups describe the executable intent being held.
How does one swap move from wallet to block?
One swap moves from a signed wallet request to an RPC node, through peer-to-peer gossip, into a builder’s candidate block, and only then through EVM execution. Take a token swap with nonce 41: the wallet encodes the router call, sets gas and fee limits, signs it and broadcasts the bytes. A client checks the signature, chain, balance and basic fee rules. If nonce 40 is missing, 41 is queued; if 41 is next, it is pending.
Inclusion still is not a fill. The builder chooses an order, the EVM runs it against that block’s state, and the receipt records success, gas used and logs. A prior trade can move the pool enough to trigger the swap’s minimum-output check. The transaction can then be confirmed but reverted, consuming gas without delivering tokens.
Why can a valid mempool transaction stay pending?
A valid transaction can stay pending because admission does not prove that its fee remains eligible or competitive. Suppose the current base fee is 30 gwei, the fee cap is 32 gwei and the priority cap is 2 gwei: its effective price can be 32 gwei. After one maximally full block, the base fee can rise 12.5% to 33.75 gwei, above that cap, making the transaction ineligible until fees fall or the sender replaces it.
The legacy route used one gasPrice; London’s split cap and tip improves fee control, but a tight cap preserves the stall risk. A replacement reuses the nonce with a sufficiently higher bid, while client policies determine whether it displaces the old copy. The Fraxswap confirmation-time dashboard is a useful live check on delay rather than treating a wallet spinner as a network-wide clock.
Does the mempool improve swap execution?
The public mempool improves fee and nonce diagnosis, not execution certainty. Type-2 bidding is better than the legacy single-price bid because the cap makes a one-block eligibility test measurable. The trade-off is public intent: searchers can see a swap before execution, while private submission can hide it under the same calldata and state conditions but depends on relay and builder coverage. The trader bears that reach-versus-information risk, plus slippage or revert gas.
In the live product, decode the input, compare the fee cap with the pending block’s base fee, check the sender’s preceding nonce, then inspect the receipt status and logs. Those checks separate a fee stall, nonce blockage and router failure.
Filed under
- Transaction ordering and execution costs
- Liquidity pools and order routing