Why Your Transaction Is Stuck: Base Fee vs Priority Fee
Bottom line: A pending transaction is priced below the current base fee. Raising the value in the gas-price field is not enough on EIP-1559 chains — you must raise maxFeePerGas above base fee plus your intended priority fee, or replace the transaction.
What the mempool is actually doing
Validators order by effective tip. A transaction whose maxFeePerGas is under the current base fee is not merely low priority — it is invalid until the base fee falls. In a rising market that can be hours.
| Field | Meaning | Common mistake |
|---|---|---|
maxFeePerGas |
absolute ceiling | set once, never raised |
maxPriorityFeePerGas |
tip to validator | left at 1 gwei while others pay 3 |
gasLimit |
compute ceiling | set to block limit |
Read before replacing
1 | cast base-fee --rpc-url $RPC |
Then set maxFeePerGas = 2 × base + tip and maxPriorityFeePerGas = tip where tip tracks the 60th percentile of recent effective tips, not a guess.
Replacement
Same nonce, higher fees, broadcast to the same node and to at least two others. Most clients require both fees to rise by ≥10%. Below that the replacement is dropped silently.
1 | cast send $TO --value 0.1ether \ |
Cancel instead of replace
If the transaction no longer matters, send 0 ETH to yourself at the same nonce with the same fee bump. Cheaper than pushing a doomed swap through.
Prevention
- Always cap
maxFeePerGasat a sane multiple of current base — a 20× cap survives a spike - Watch base fee in the sending loop; pause submissions when it moves > 40% in a minute
- On L2, remember the sequencer sets ordering and a too-low tip stalls even when L1 is calm
Do not
Bump gasLimit hoping it helps throughput. It changes the up-front hold, not the ordering. Bump fees.
A stuck transaction is a pricing bug, not bad luck. Instrument the fee decision and the stalls stop recurring.
Operating notes
Check the transaction’s own fee against the current base fee before anything else. If maxFeePerGas is under it, the transaction is invalid, not merely slow, and no amount of waiting helps. Report the ratio so the decision is mechanical:
1 | python3 - <<'PY' |
Under 1.0: replace. Between 1.0 and 1.2: valid and competing badly, replace if the intent still holds.
On replacement hygiene
Broadcast the replacement to at least three independent nodes. Providers drop conflicting transactions on different schedules and a replacement sent to one node can sit behind a mempool that never saw the original. Confirm exactly one hash lands; two confirmed hashes on the same nonce means a reorg split and needs a reconcile pass.
Cap replacement attempts at five per nonce. Beyond that the base fee has usually moved enough that cancelling and re-planning is cheaper than chasing.
What the fee history tells you
Sample the last 20 blocks’ median priority fee before setting a replacement tip. A tip below the 40th percentile is a replacement that will be replaced. If the 90th percentile is more than 3× the median, the chain is congested and splitting the swap beats one expensive push.
Post-mortem signals
Log base fee at submit, at replacement and at inclusion, plus the wait. A growing base-fee slope across your own attempts means your retry interval is too short — you are repricing into a rising market and paying each step. Back off geometrically instead.
FAQ
Why is my transaction still pending after I raised the gas price?
Raising the value in the gas-price field is not enough on EIP-1559 chains. A transaction whose maxFeePerGas is under the current base fee is invalid until the base fee falls, not merely low priority. You must raise maxFeePerGas above base fee plus your intended priority fee, or replace the transaction.
How do I set maxFeePerGas and maxPriorityFeePerGas correctly?
Read the current base fee first, then set maxFeePerGas = 2 × base + tip and maxPriorityFeePerGas = tip. The tip should track the 60th percentile of recent effective tips, not a guess. Leaving the priority fee at 1 gwei while others pay 3 is a common mistake.
Why was my replacement transaction dropped silently?
Most clients require both fees to rise by at least 10% for a replacement. Below that threshold the replacement is dropped silently. Broadcast the replacement to the same node and to at least two others.
How do I cancel a stuck transaction instead of replacing it?
If the transaction no longer matters, send 0 ETH to yourself at the same nonce with the same fee bump. This is cheaper than pushing a doomed swap through. It uses the same replacement rules, so both fees must rise enough to be accepted.
How many times should I try replacing a transaction before giving up?
Cap replacement attempts at five per nonce. Beyond that, the base fee has usually moved enough that cancelling and re-planning is cheaper than chasing the transaction.











