How to Use SyncSwap to Swap and Add Liquidity

How to Use SyncSwap to Swap and Add Liquidity


SyncSwap is an automated market maker (AMM) decentralized exchange for swapping tokens and providing liquidity on zkSync Era and other supported Ethereum layer 2 networks. Your wallet must hold the tokens and enough gas on the same network as the pool you intend to use. Choose the pair, check the quoted output and price impact, then confirm the swap or deposit.

  • For a swap, compare the quoted output with your minimum acceptable amount before signing.
  • For liquidity, choose a pool whose pricing curve fits the pair and understand what you will hold when you withdraw.
  • Allow for network gas, pool fees and changes in the pool’s price between quote and execution.

What Is SyncSwap and How Does It Work?

SyncSwap trades against token reserves in liquidity pools rather than matching your order with another trader’s. In a Classic Pool, the constant product rule, x × y = k, makes each additional unit of output more expensive as a trade changes the reserve ratio. A Stable Pool uses a flatter curve near the intended peg of closely priced assets, reducing price impact there; that advantage shrinks if the assets diverge or the pool becomes badly imbalanced.

Think of a pool as inventory with a price that changes each time you take an item off the shelf. For example, a Classic Pool holding 100 ETH and 300,000 USDC has a spot ratio of 3,000 USDC per ETH. Selling 1 ETH into it would return about 2,970 USDC before fees under the constant product formula: roughly 0.99% less than the spot ratio. Splitting that order into two successive trades through the same unchanged pool does not remove the combined price impact.

The Swap Router can pass a trade through one or more pools to reach the requested token. More hops can produce a better rate when the direct pool is thin, but each hop adds a pool fee and another place where the quote can change. The SyncSwap technical documentation identifies the Classic and Stable pool curves; the quoted output is the figure to judge for the particular route and trade size.

What Do You Need Before Trading?

You need a connected wallet, the input token on the pool’s network and enough balance to pay for transaction execution. Assets on Ethereum mainnet or a different layer 2 cannot be spent in a pool on zkSync Era merely because the token symbol matches. Check the network and token contract when names are ambiguous, especially for bridged versions of an asset.

Keep gas separate from the amount you plan to trade. On zkSync Era, transaction cost depends partly on execution and the data published to Ethereum, so a previous trade’s gas cost is a poor fixed estimate; ZKsync’s documentation describes that fee model. An ERC-20 token may also require an allowance transaction before the router can spend it. A limited allowance reduces what remains authorized after the trade, while an unlimited allowance avoids repeat approvals.

How Do I Swap Tokens on SyncSwap?

To swap, specify the input and output tokens, review the route and quote, set the lowest output you will accept, then authorize and submit the transaction. Price impact is already reflected in the quote; slippage tolerance protects against further movement before execution. For a liquid pair, a tolerance around 0.1%–0.5% may be workable, while a volatile or thinner pair may need more. Set it according to the trade, not as a way to conceal a poor quote.

  1. Connect your wallet to the network holding the input token.
  2. Select the input token and the token you want to receive.
  3. Enter the amount to sell.
  4. Compare the quoted output, route and price impact with your acceptable rate.
  5. Set a minimum received amount that reflects the movement you can tolerate.
  6. Authorize the input token if an allowance is required.
  7. Confirm the swap transaction in your wallet.

For SyncSwap on zkSync Era, the decisive check is the output after the route’s pool fees and price impact, measured against your minimum received amount. Once that amount works for your trade, SyncSwap lets you exchange the tokens through its AMM pools. Recheck the wallet transaction after any separate approval, because the reserves may have changed while you waited.

Suppose a quote offers 2,970 USDC and you allow 0.5% slippage. The minimum received would be about 2,955.15 USDC; it is 0.5% below the quote, not 0.5% below the earlier 3,000 USDC spot ratio. If that minimum is unacceptable, reduce the order size or wait for a better route or pool depth. Raising tolerance permits a worse fill without improving the pool price.

How Do You Add and Withdraw Liquidity?

To provide liquidity, choose a pair and pool type, deposit the required token amounts and receive a position representing a share of that pool. A Classic Pool generally suits a pair whose relative price can move freely; a Stable Pool is designed for assets expected to stay close in value. Inspect both assets and their contract addresses before depositing, because a shared ticker does not make two tokens interchangeable.

For a balanced two-token deposit, match the pool’s current value ratio rather than assuming equal token counts. If a pool holds 100 ETH and 300,000 USDC, adding 1 ETH and 3,000 USDC at that ratio would represent about 0.99% of the enlarged pool, ignoring fees and other supply changes. An unmatched deposit may require an internal swap or leave part of one token unused, depending on how the deposit is executed; inspect the resulting amounts before signing.

On withdrawal, redeem your pool position for the underlying tokens and check the minimum amounts you will receive. Your token quantities will usually differ from those deposited because traders have changed the reserves. In a Classic Pool, if ETH doubles against USDC, a position rebalanced by arbitrage is worth about 5.7% less than simply holding the original tokens, before earned fees. A Stable Pool has a different curve, but a depeg can still leave liquidity providers holding more of the asset others are selling.

What Does a Swap or Liquidity Position Cost?

A swap’s effective cost combines the pool fee, price impact and network gas. Pool fees vary by pool, so use the current quote rather than assuming one rate applies everywhere. Price impact rises with order size relative to usable reserves; a route with more pools can lower that impact yet cost more in fees and gas.

Providing liquidity requires gas for the deposit and eventual withdrawal, and may require token approvals. Fees earned from trades can offset losses from changes in the assets’ relative price, but the outcome depends on volume, your share of the pool and how long the position remains open. Compare the likely fee income with the asset exposure you are taking; a high displayed yield alone does not settle that trade-off.

Why Might a SyncSwap Transaction Fail?

A swap can revert when the pool’s output falls below your minimum received amount before execution, a transaction deadline expires, or the wallet lacks the required balance or allowance. A token with transfer restrictions or a transfer tax can also behave differently from a standard ERC-20, and thin liquidity can make the requested trade impractical. If a transaction executes and reverts, its token exchange is undone, but gas spent on execution is generally still charged.

Check the transaction status before retrying so you do not submit a second trade after a successful first one. If it failed, refresh the quote, verify the network, balance and allowance, then decide whether the new minimum received amount still meets your objective. Before signing any swap or liquidity deposit, ask yourself: Am I willing to receive these assets in these amounts at the worst outcome this transaction allows?

Report Page