DEV Community

Kevin
Kevin

Posted on

SyncSwap: 4 Questions Before You Swap or Add Liquidity

SyncSwap is a decentralized exchange for swapping tokens and supplying liquidity through onchain pools. The key condition is that your wallet holds the assets on a supported network, plus enough gas to submit a transaction. SyncSwap quotes trades and lets you deposit into SyncSwap liquidity pools from that wallet.

How Does SyncSwap Turn a Quote Into a Trade?

A quote estimates the output available from a route through one or more pools. In a Classic pool, the reserves follow the constant product rule, x × y = k: taking tokens out makes the next unit more expensive. The pool fee reduces the effective input before that calculation, so a larger trade gets a worse average rate even if the displayed spot price has not moved.

Say a Classic pool holds 100 ETH and 200,000 USDC, and its fee is 0.3% for this example. Swapping 1 ETH leaves 0.997 ETH as effective input and returns about 1,974 USDC, before gas, against a 2,000 USDC spot price. Roughly 0.3% of the difference is the fee; most of the rest is price impact from the trade changing the reserve ratio.

Stable pools use a flatter curve near the expected price of closely matched assets, which can reduce price impact there. That advantage fades if a token loses its peg or the pool becomes unbalanced. A route through two pools can still beat a direct pool, but each hop adds a fee, so judge the final output rather than the number of hops.

When you sign, the router takes the approved input token, deposits it through the Vault, executes the pool swaps and sends the output to your chosen recipient. The Vault tracks pool balances inside the protocol; it does not turn a token on one chain into a token on another. The transaction either meets its minimum output condition or reverts.

How Do You Make a Swap on the Right Chain?

Start with the network that holds your input token, then connect your wallet and select the exact token contracts. SyncSwap supported chains include zkSync Era and Linea, but a USDC balance on one is separate from a USDC balance on the other. Switching the wallet network only changes what you view; moving funds requires a bridge or a withdrawal to the intended network.

For a typical ETH-to-USDC swap on zkSync Era, leave some ETH uncommitted for gas, enter the amount and inspect the proposed route. Check the output token’s contract address if several tokens share a symbol. Then compare the estimated output, price impact, pool fee and minimum received before signing.

An ERC-20 input may require a separate approval transaction before the swap. An exact-amount approval limits what the router can spend later, while a larger allowance saves another approval if you expect repeat trades. Confirm the spender and allowance in the wallet prompt; an approval alone does not execute the trade.

After signing the swap, check its confirmed transaction and your wallet balance. If the quote disappears, the balance looks wrong or the transaction fails, first check the selected chain, token contract, allowance and remaining gas. Requote before retrying: pool reserves may have changed while you were deciding.

What Sets the Cost and Minimum Received?

Your effective cost is the pool fees along the route, price impact and network gas, plus any separate approval or transfer needed to get funds onto that chain. SyncSwap trading fees depend on the pool and can differ by route; the displayed output is the useful figure because it already reflects the pool calculation. Gas is paid even when a submitted swap reverts, so include it when a small trade looks marginal.

Slippage tolerance sets the lowest output you will accept relative to the quote. At a quoted 1,000 USDC, a 0.5% tolerance makes the minimum about 995 USDC; it does not improve the quoted price or cap price impact already shown in that quote. For a liquid pair, 0.1%–0.5% is a reasonable starting range, then adjust only if normal price movement causes failures.

A large price impact figure is a reason to inspect pool depth or reduce the trade size, not simply raise slippage. A thin pool can give a poor rate and still execute within a generous tolerance. If the market moves past your minimum before inclusion, the swap reverts and the network still charges gas.

When Does Providing Liquidity Make Sense?

Providing liquidity makes sense when you want exposure to both pool assets and expect your share of trading fees to justify the changing token mix. Select the pair and pool type, review its reserves, fee and trading volume, then enter the deposit amounts. For a balanced Classic deposit, the pool’s current ratio determines how much of each token you can use; an uneven deposit may incur a fee or leave one token unused.

In a Classic or Stable pool, the LP tokens represent your share of the pool, including fees retained in its reserves. When traders change the reserves, your share changes with them. If one asset doubles in external price from an initially equal-value Classic position, that position is about 5.7% below simply holding the two original amounts before earned fees.

Stable liquidity has a different sharp edge: if one asset depegs, traders can leave the pool holding more of the weaker asset. If a concentrated position is available, its price range adds another decision; outside that range, the position can become entirely one asset and stop earning swap fees until price returns. Check the position type before assuming every pool earns fees in the same way.

To exit, remove the position and review the amounts of each token you will receive at current pool balances. A single-token exit may include an internal swap and its price impact, while a proportional exit returns both assets. I would make a swap only after checking the net output and minimum received; for liquidity, I would first decide whether I want to hold the pool’s changing mix of tokens.

Top comments (0)