Skip to main content
Hashbeam

Crypto protocols, markets and policy

d2dc61

syncswap in five decisions: swap, troubleshoot, add liquidity

Choose a pool, set an execution bound, diagnose failed transactions and weigh liquidity exposure before using syncswap for a swap or deposit.

The Hashbeam Desk··6 min read

syncswap in five decisions: swap, troubleshoot, add liquidity

syncswap use comes down to five decisions: choose the right token route, understand the pool curve, set an acceptable execution bound, diagnose a failed transaction, and decide whether liquidity risk fits your position. SyncSwap is an automated market maker, so a swap trades against a pool’s token balances rather than matching with a specific counterparty. When you have chosen the pair and need to make the trade or supply liquidity, syncswap is a decentralized exchange native to zkSync Era and other Ethereum Layer 2 networks, where users can swap tokens and provide liquidity in classic and stable pools. The mechanics behind each decision determine what the quoted trade means and what a liquidity deposit exposes you to.

How do you choose a swap route and pool?

Choose the route by comparing the expected output for the same input, then check which pool type supplies the quoted price. A direct swap uses one pool; a routed swap can pass through more than one pool, so each hop adds another pool’s pricing and fees to the path. A better-looking route is not necessarily better after execution if its pools are shallow or their balances move before the transaction is included.

SyncSwap’s technical documentation describes Classic pools as using the constant-product formula x*y=k, the familiar model for general trading. As one token leaves the pool, the balance of the other must rise to preserve the product, so larger trades relative to pool depth move the price more. Stable pools use a hybrid curve designed for assets expected to trade near parity. That curve can reduce price impact near parity, but it does not make two assets interchangeable: a sustained price divergence changes the pool’s balance and the value of its inventory.

The first decision is therefore about the trade’s actual path, not just the token names. Check that the input and output assets are the intended contracts, and compare the expected output and price impact shown for the route. A quote is an estimate from the pool state available when it is calculated; it is not a promise about the state when execution occurs.

What does slippage control on a swap?

Slippage tolerance sets the least output a swap may deliver while still executing. In the transaction, that floor is a minimum-output condition: if the pool state changes enough that the route cannot return at least that amount, execution reverts instead of completing for less.

This creates a direct trade-off. A tight bound limits how far the final output can fall below the quote, but it makes the transaction more likely to fail if another trade changes the pool first. A wider bound allows more price movement and makes execution more likely under changing conditions, while accepting a worse minimum result. Tolerance does not improve the quote or guarantee execution at the displayed rate.

Set the bound from the trade you are willing to accept, not from a rule of thumb. For a large trade relative to pool depth, inspect price impact before loosening the bound: the pool’s curve can make the expected output poor even before execution-time movement is considered. For a small trade, a failure may instead reflect a narrow bound or a changed pool state. These are different causes and call for different adjustments.

Why can a swap fail, and what should you check?

A failed swap usually means a precondition was not met or execution could not complete against the state available at inclusion. Start with the transaction status in the wallet: a pending transaction has not yet produced a final result, while a reverted transaction did not complete the swap.

  • Allowance: An ERC-20 token contract checks whether the spender has enough approved allowance. If it does not, the wallet may require a separate approval transaction before the swap can proceed.
  • Minimum output: If the route’s output falls below the swap’s minimum-output bound, execution reverts. Recheck the quote and pool state before deciding whether to adjust the bound.
  • Balance and gas: Confirm the wallet still holds the required input amount and enough of the network’s gas token to submit the transaction.
  • Asset and route: Verify the token contracts and selected route. A symbol alone may not uniquely identify an asset, and a route through multiple pools can fail if any required pool cannot execute.

These checks separate wallet-side prerequisites from execution conditions. Repeating the same transaction without identifying which condition failed can reproduce the same revert; changing the transaction’s input, allowance, or bound should follow from the actual failure.

When does adding liquidity make sense?

Adding liquidity makes sense when you are willing to hold exposure to both pool assets and accept that their proportions and value can change. A deposit contributes tokens to a pool and, in return, gives the provider a claim on a share of its assets and trading fees. The fee income is variable: it depends on pool activity and the applicable pool terms, while changes in relative token prices affect the value of the position.

For a Classic pool, the constant-product curve means arbitrage and trading rebalance the reserves as market prices move. A provider can end up with more of the asset whose market price has fallen relative to the other and less of the asset whose price has risen. The resulting position may be worth less than simply holding the original tokens; fees can offset some of that difference, but do not remove the exposure. Stable pools use a different curve aimed at near-parity assets, yet a depeg or lasting divergence can push the pool away from that region and change the risk.

Before depositing, decide whether the pair and pool curve match the exposure you want, then compare the deposit amounts and resulting position with holding the same assets outside the pool. Start with the pool’s actual terms and transaction details; do not infer that a stable label guarantees stable value. For most users seeking a straightforward token trade, swapping avoids taking on ongoing pool inventory exposure. Liquidity provision is a separate position with a different payoff, not simply a swap that earns fees.