Jump to content
Crypto Desk Report

Crypto markets, protocols and policy

Router Checks Behind Swap Reverts

Why is my SyncSwap swap failing? Most reverts come from minimum-output, deadline or allowance checks; trace the error, then adjust slippage, timing or approval.

Crypto Desk Report Editorial#e960da5 min read

Router Checks Behind Swap Reverts

SyncSwap swaps usually fail when the router’s minimum-output or deadline check fails, or when the input token allowance is missing or too small. The trade runs atomically: if a check fails, the attempted swap’s state changes are rolled back, as EIP-140’s description of the EVM REVERT instruction explains. For more on what SyncSwap lets users do—trade tokens and access liquidity pools—visit SyncSwap; the Uniswap developers’ explanation of swap protections also sets out how minimum output and deadlines work in a router. The key is to match the revert to the check that failed before changing the trade.

SyncSwap minimum-output reverts: compare the quote with execution

A swap can revert when the tokens delivered at execution fall below the minimum output set from the quote. That minimum protects the trader from receiving less than the accepted amount, but it can become unreachable as market conditions change while the transaction is pending.

Suppose a quote estimates 100 output tokens and the slippage setting allows a small reduction. If other trades move the price before yours is included, the pool may return less than the router’s minimum. The router then reverts instead of completing at a worse price. This is the trade-off: tighter slippage offers stronger price protection but makes a pending swap more likely to fail; wider slippage gives execution more room but accepts a less favorable result.

Read the explorer’s transaction status and any decoded error. An output-related revert points toward the minimum received check. Request a fresh quote, consider whether the route or token pair still makes sense, and adjust slippage only to a level you are willing to accept. Raising it blindly can turn a protective failure into an unexpectedly poor trade.

Deadline expiry: a pending swap can go stale

A deadline revert means the transaction reached execution after its permitted time. The router checks the deadline against the block timestamp when the transaction is included, not when you signed or submitted it.

That distinction explains a common surprise: a swap can remain pending with enough slippage tolerance and still fail. The market price may stay within the allowed range, but if inclusion happens after the deadline, the time check independently rejects the trade. Slippage and deadline are separate protections; satisfying one does not satisfy the other.

When the explorer shows an expired or deadline-related error, do not keep waiting on that transaction. Once it has reverted, refresh the quote and submit a new transaction with a valid deadline. If transactions are taking longer to be included, review the wallet’s transaction settings and the current network conditions before resubmitting. A longer deadline reduces expiry risk but leaves the quote exposed to changing prices for longer, so keep the minimum-output protection in view.

Allowance and token behavior: confirm the input can reach the Vault

A missing or insufficient ERC-20 allowance can make the transfer into the Vault fail. The allowance is the token permission for a spender to move tokens from your wallet; it must cover the amount the swap is trying to use.

If the explorer points to a transfer, allowance, or authorization failure, check that MetaMask is connected to the intended account and that the input token approval is for the relevant spender and amount. Approve the input token first if the allowance is absent or too small, then retry the swap. An approval is a separate transaction, so confirm it has succeeded before submitting the trade again.

Fee-on-transfer tokens add another complication: the amount that arrives can be lower than the amount the pool expects to receive. That shortfall can make an output check fail even when the quoted price has not moved. Slippage that covers the token tax may help only when the route and router can handle the token’s transfer behavior. If a fresh quote and a reasonable tolerance still fail, do not keep widening slippage; verify the token contract and consider a different token or route.

Use the revert and transaction state to choose the next move

The explorer error and transaction state help separate a failed swap from a transaction that is still pending or never executed. A confirmed revert means the attempted trade was rolled back, although the transaction may still have consumed gas. It does not mean the output tokens were received.

  • Output too low: refresh the quote and reassess slippage or token choice.
  • Expired: submit a fresh swap with a valid deadline.
  • Allowance or transfer failure: approve the input token or investigate its transfer behavior.

These checks are related but independent: a fresh quote addresses price movement, a valid deadline addresses delay, and an adequate allowance lets the router transfer the input. On zkSync Era, read the transaction details on the corresponding block explorer and compare the reported error with these causes. If the revert remains unexplained after confirming the token contract, allowance, deadline and minimum output, contact the project’s support with the transaction hash and the error details. Then choose the next action from the failed check: refresh the quote, correct the approval, or stop using a token whose transfer behavior remains unclear.