DEV Community

Mandie Brugman
Mandie Brugman

Posted on

What is SyncSwap: trading from your wallet instead of a CEX

SyncSwap is a decentralized exchange where you swap tokens from your own wallet against liquidity pools; this article explains what changes when you trade there after using a centralized exchange. The SyncSwap exchange is an example of this wallet-to-pool model: smart contracts hold pooled tokens and calculate the trade price. You sign the swap yourself, and the tokens you receive go to your wallet rather than an exchange account.

How SyncSwap moves a trade through a liquidity pool

SyncSwap takes a trade you authorize with your wallet, exchanges tokens through a pool, and sends the output to your wallet address. On a centralized exchange, you first deposit funds that the exchange holds for you. Trades usually match buyers and sellers through an order book, and the resulting balance appears in your exchange account. To use those tokens elsewhere, you request a withdrawal.

A liquidity pool works differently. Liquidity providers deposit pairs of tokens into a smart contract and earn trading fees when people use the pool. Your swap trades against those pooled tokens, so you do not wait for another customer to place a matching order. Your wallet controls your funds before the trade and the tokens received afterward; the contract holds the tokens supplied to the pool.

In a Classic Pool, the amounts of each token in reserve shape the price. Buying USDC with ETH removes USDC and adds ETH, changing the reserve ratio as the trade proceeds. A larger trade takes more from the pool and therefore gets a worse average rate than a smaller trade under the same conditions. SyncSwap also offers Stable Pools, which use a different pricing approach for tokens intended to stay close in value.

Before authorizing a swap, three details have distinct jobs:

  • Quoted output: An estimate based on the pool’s current state. Other trades can change the pool before yours completes.
  • Minimum received: The lowest output you agree to accept. Compare it with the quote so you know how much change you are allowing.
  • Network gas: The cost of processing your onchain transaction. On zkSync Era, you need ETH for gas as well as any ETH you plan to swap.

An ETH to USDC swap on zkSync Era

Say you have ETH in MetaMask on zkSync Era and want USDC. Connect MetaMask to SyncSwap, choose ETH as the token to spend and USDC as the token to receive, then set the amount. Review the minimum USDC you could receive before signing the transaction in your wallet. The ETH must be on zkSync Era: a balance on another network cannot fund this swap simply because the same wallet address appears there.

After you sign and the network confirms the swap, the pool receives your ETH and sends USDC to your wallet address. The final amount depends on the pool when your transaction executes, subject to the minimum you accepted. If the pool cannot meet that minimum, the swap fails, although the attempted onchain transaction can still use gas.

Now change one detail: suppose you enter a much larger ETH amount while the pool’s reserves stay the same. The average rate becomes less favorable because your trade moves the reserve ratio further. Your wallet still authorizes the trade, and any successful output still goes directly to that wallet. Trade size changes the rate you may get, not who controls the received tokens.

What receiving tokens in your wallet changes

Receiving USDC directly means there is no separate withdrawal request or withdrawal fee after the swap. On a centralized exchange, a completed trade normally gives you an account balance; moving that balance to a wallet is another action. After an onchain swap, the USDC is already at your address on zkSync Era. You can use it from that wallet for another onchain transaction, provided you have the gas that transaction needs.

Gas and a withdrawal fee are different costs. Gas pays the network to process your swap, whether you plan to keep the USDC or use it next. The absence of a withdrawal step does not make the swap free. It means there is no exchange-held balance to release before you can use the tokens in your wallet.

That direct control also makes your checks consequential. Confirm the token, network, amount and minimum received before signing. A confirmed swap cannot be reversed by a support desk, and a lost seed phrase cannot be recovered by one. Keep the phrase secure because it is what lets you regain control of the wallet.

Related questions

Is SyncSwap the same as ZKSwap?

No. ZKSwap is a separate decentralized exchange with a similar name. Treat the names as identifying different protocols when deciding where to connect your wallet or supply liquidity.

Do I need an account to use SyncSwap?

No exchange account is needed for a wallet swap. You connect a compatible wallet and authorize transactions with it. You still need tokens on the network where you intend to trade and enough of that network’s gas token to submit the transaction.

Which networks does SyncSwap run on?

SyncSwap launched on zkSync Era and also runs on Linea and Scroll. Choose the network that holds the tokens you want to trade, then consider its pools and gas requirements. A token balance on one network is separate from a balance on another, even when both use the same wallet address.

Top comments (0)