Pending Base Swaps: Diagnosis and Recovery
A pending swap on Base is an unconfirmed transaction; a failed swap is already included but its contract call reverted. That distinction decides whether to wait, replace the transaction, or fix the swap conditions and submit again. A wallet’s spinner alone cannot tell you which state you are in.
Is the transaction pending, dropped, or reverted?
Start with the transaction hash in a Base block explorer, then check its receipt and nonce. If no receipt exists, the transaction has not been included; if the receipt has status 0, it was included and reverted. A missing result can also mean the wallet or RPC endpoint lost track of the hash, so compare the sender address and nonce against another Base RPC or explorer before resubmitting.
This check matters when using BaseSwap: retrying a swap with a new nonce while the original is still pending can leave two trades queued. The first included transaction consumes that nonce, and the second same-nonce transaction cannot also execute. The Base documentation describes nonce queries as the way to determine an account’s transaction count; EIP-1559 defines the fee fields that govern a replacement’s gas bid.
A revert is different: the transaction consumed gas, but the swap state changes did not persist. For a router swap, a common cause is a minimum-output condition that the pool can no longer satisfy after the price moves; a deadline that has passed or an allowance that is too small can also revert the call. The explorer’s decoded error, if available, is useful, but the receipt status and token balances are stronger evidence than a wallet’s generic “failed” message.
What should you do with a pending transaction?
For a genuinely pending hash, first check whether the sender’s nonce is still unconfirmed. A later transaction from that wallet is normally blocked behind the gap, even if its gas bid is generous. Base blocks arrive quickly under normal conditions, so a transaction that remains pending well beyond the wallet’s usual confirmation time deserves a nonce and fee check rather than repeated clicking.
- Find the transaction hash. Open it on a Base explorer and record the sender, nonce, status, and fee fields.
- Compare the account nonce. Check the latest confirmed nonce and, where supported, the pending nonce. If the transaction’s nonce is already below the confirmed count, it has been consumed; refresh the explorer and inspect the receipt.
- Decide whether to wait or replace. If the nonce is still pending and the transaction fee cap is below current Base conditions, use the wallet’s speed-up function to rebroadcast the same transaction with the same nonce and higher fee fields. Wallets and RPC nodes apply different replacement thresholds, so there is no universal percentage that guarantees acceptance.
- Cancel only if the wallet supports a same-nonce replacement. A cancellation is typically a zero-value self-transfer using the stuck transaction’s nonce and a higher fee bid. It competes with the original; if the swap is included first, cancellation cannot undo it.
- Verify the result before retrying the swap. Wait for the replacement or cancellation receipt, then confirm the nonce is consumed and check token balances. Only then build a fresh swap.
Changing the nonce manually is usually the wrong fix: it may create a nonce gap and hold later transactions behind it. I would use the wallet’s replacement flow, because it preserves the nonce and transaction signing details that the wallet already knows.
How do you fix a swap that reverted?
Once the failed receipt is confirmed, resubmit only after correcting the reason for the revert. If the route moved beyond the configured minimum output, request a fresh quote and choose a slippage tolerance that reflects the token’s volatility and pool depth; increasing it blindly can accept a materially worse execution. For a deadline failure, use a fresh transaction with a new deadline rather than attempting to revive the mined call.
Check that the wallet is on Base and holds enough ETH for the network fee, and that the allowance covers the input amount if the token requires approval. BaseSwap can provide the swap interface, but it cannot make a reverted onchain call succeed retroactively; the contract evaluates the route and limits at execution time. Before acting, ask yourself: have I confirmed the transaction’s onchain state and nonce, or am I reacting to the wallet’s label alone?
Comments
Post a Comment