Skip to content
Crypto Bulletin

Markets, protocols and policy news

ID f175c6

Reset a stuck SushiSwap token approval by clearing the nonce first

How to reset a stuck SushiSwap token approval: clear the pending nonce, zero the allowance, then approve again.

Crypto Bulletin Newsroom 2 min read

Reset a stuck SushiSwap token approval by clearing the nonce first

Reset a stuck SushiSwap token approval by resolving the pending nonce first, then sending approve(spender, 0) before you request a fresh approval. The ERC-20 specification is the standard behind that: approve(spender, 0) clears a spender’s allowance. An approval is an ERC-20 allowance that tells the token contract how many tokens the router may spend from your wallet. The nonce is the reason a fresh approval is not the first move: Ethereum processes an EOA’s transactions in nonce order, so a later approval queues behind the stuck transaction until that nonce clears. This applies to standard ERC-20 approvals from an EOA.

Work from the stalled transaction, not from the allowance. With a signing wallet, native gas, and a verified spender address in hand, follow the stalled transaction through these steps:

  1. Identify the chain, the owner EOA, the token contract, the spender, and the blocking nonce. The pending transaction using that nonce is what has to clear before anything else moves.
  2. Replace or cancel the pending transaction using that same nonce. Send a replacement with the same nonce and a higher gas price, or cancel by sending that nonce to yourself with zero value and a higher gas price. Wait for the receipt; the mempool entry must be gone.
  3. Read the resulting allowance with allowance(owner, spender). If it is already zero, skip the zeroing call. If it is nonzero, send approve(spender, 0) to the token contract from the owner EOA.
  4. Simulate that zeroing call before sending it. Tokens with strict allowance rules revert when you move directly from one nonzero allowance to another, so the zeroed allowance is the required intermediate state. Confirm the zero by reading allowance again.
  5. Approve the exact base-unit amount the swap needs. Send approve(spender, amount) to the same token contract, then verify the receipt and read the allowance once more. The reset is complete when the allowance reads the intended value for the intended spender.

For an approval that has to land on SushiSwap’s router, the exchange’s swap flow is the matching route because it requests approval for that router. Once the zero state is confirmed, the path to the fresh approval is how to use sushiswap.

A later swap failure after a confirmed allowance points at execution, not permission. Check the router path and the token pair before changing the allowance again.